Q1
there are five processes given below with their run time units. assume that all processes
arrive in numerical order at time 0 than answer the question given below.

Sponsored Links

p1 5
p2 4
p3 2
p4 1
p5 8

show the scheduling order for these processes under first-come-first-served, shortest-job
first, and round robin scheduling (quantum = 2)

Q2
a context switch is implemented by the kernel and it involves the copying of state
information between the processor and the process control block or thread control
block. is the context switch overhead of a user-level thread can be less than the
overhead for processes?

Q3
let us consider a code given below:

bounded-buffer problem

producer process

item nextProduced;

while(1){
nextProduced = getNewItem();
while(counter == BUFFER_SIZE);
buffer[in] = nextProduced;
in = (in+1) % BUFFER_SIZE;
counter++;
}

in the above code a variable counter has been used. please write down the purpose of
counter variable.

Q4
threads play important role during the execution of processes.you have to identify how
does a thread operate in the same way as that of process? mention at least 2 similarities
between a thread and a process?

Q5
how can you differentiate between the fifo & pipe?

Q6
differentiate entry section and remainder section.