Note: Explain your answer for every questions.
1.
1. Let the time taken to switch between user and kernel modes of execution be while the time
taken to switch between two processes be. Which of the following is TRUE?
2. The process state transition diagram in Figure is representative of
3. Consider the following four processes with arrival times (in milliseconds) and their length of
CPU bursts (in milliseconds) as shown below:
These processes are run on a single processor using preemptive Shortest Remaining Time
First scheduling algorithm. If the average waiting time of the processes is 1 millisecond, then
the value of Z is _____.
4. Suppose in a multiprogramming environment, the following C program segment is executed.
A process goes into I/O queue whenever an I/O related operation is performed. Assume that
there will always be a context switch whenever a process requests for an I/O, and also
whenever the process returns from an I/O. The number of times the process will enter the
ready queue during its lifetime (not counting the time the process enters the ready queue
when it is run initially) is _________ . (Answer in integer)
int main( )
{
int x = 0,i=0;
scanf("%d", &x);
for(i=0; i<20;i++)
{
x=x+20;
printf("%d\n", x);
}
return 0;
}
5. Which of the following process state transitions is/are NOT possible?
6. Which one or more of the following needs to be saved on a context switch from one thread
(T1) of a process to another thread (T2) of the same process?