Encerrado

knowledge about operating system needed

nswer the following:

1 1. what are the advantages of a Virtual Machine architecture?

2. Depending on whether the information should be stored in a Process Control Block (PCB) or a Thread Control Block (TCB), enter PCB or TCB for each of the following five resources:

Stack

Memory allocation

Open files

Program Counter (Instruction Counter)

Registers

3. Given the following description of the life of a process, indicate its state at each point in time and indicate (yes or no) whether the event requires a context switch. Assume that:

• multiple processes are in the system,

• another process is running when this process arrives

• other processes are ready to run when this process blocks

• another process is ready to run when this process completes.

For EACH of these 9 events, tell its STATE, and answer YES/NO whether a context switch is involved for each:

Process is being created

Process is put into the ready queue

Process is given the CPU

Process executes a read from the disk

Disk read completes

Process is given the CPU

Process A is preempted by higher-priority process B

Process is given the CPU

Process completes

4. Describe the condition that results from the code below, where A and B are semaphores.

Process 1:

Acquire (A) (successful)

Request(B)

--------------------------------

Process 2:

Acquire( B ) (successful)

Request(A )

5. Consider this pseudocode below with a bounded buffer of size of 2.

empty and full are semaphores.

Producer:

while( true )

{ …

acquire( empty )

// insert item in buffer

release( full ) …

}

----------------------------

Consumer:

while( true )

{ …

acquire( full )

// remove item from buffer

release( empty )

}

What initial value should be given to each of these semaphores?

empty _______

full _______

6. For each of the following six instructions, indicate whether the instruction should be restricted to kernel mode or available in user mode. Explain your selection for each instruction.

a. Read shared memory ________

b. Read from disk ________

c. Read the clock ________

d. Change to kernel mode ________

e. Turn off interrupts ________

f. Change to user mode ________

7. list the three requirements, and explain how each is satisfied by this algorithm. The algorithm assumes two processes, 0 and 1.

boolean flag0 = false; // flag for process 0

boolean flag1 = false; // flag for process 1

int turn = 0;

Code for Process 0

while ( true )

{

flag0 = true; // indicate interest in critical section

turn = 1; // set turn to other process

while ( flag1 == true && turn == 1 ); // wait if process 1

// wants critical section

// and it is

// process 1’s turn

// execute critical section

flag0 = false; // indicate no interest in critical section

}

8. In the bounded buffer solution shown in Figures 5.9 and 5.10 (pp. 219-220), if the order of the first two wait instructions in the consumer process were reversed. In other words, the consumer process would begin:

do {

wait ( mutex );

wait ( full );

Would the solution still be correct? Explain why or why not.

9. Compare context switching between processes to context switching between threads.

Habilidades: Engenharia, Linux, Microsoft, Teste de Software, UNIX

Ver mais: virtual int, six producer, requirements needed for engineering, queue algorithm in c, priority queue algorithm in c, priority algorithm in c, how to be a producer, explain algorithm, algorithm for priority queue in c, simulation code priority queue, english writer needed website knowledge, source code priority queue, codeigniter cakephp higher quality code, operating knowledge, code google finance flex code, code build exe source code, morse code translation translate morse code english, code review charting flex code, convert rmcobol source code net cobol source code

Acerca do Empregador:
( 121 comentários ) Calcutta, India

ID do Projeto: #10377289

8 freelancers estão ofertando em média ₹276/hora para este trabalho

₹263 INR / hora
(34 Comentários)
4.9
₹277 INR / hora
(4 Comentários)
3.0
thasleemreyasm

I have well knowledge in doing such kind of jobs and i will do my level best.............................

₹388 INR / hora
(1 Comentário)
0.4
satyarohit000

I have done BE in computer science ,and GATE 2016 qualified,having knowledge of all computer subject including operating system.

₹333 INR / hora
(0 Comentários)
0.0
vu2sar

Satisfaction Guaranteed!

₹222 INR / hora
(0 Comentários)
0.0
₹111 INR / hora
(0 Comentários)
0.0
hiresmart

hi , this is my new account ,confirm it and message me to process the rest.i have done bid on this project.

₹333 INR / hora
(0 Comentários)
0.0
rich872005

I am an academician in engineering college. I have taught Operating system to my students. I can answer these question. and can complete the job

₹277 INR / hora
(0 Comentários)
0.0