0% found this document useful (0 votes)
8 views3 pages

Process Scheduling and Context Switching Analysis

The document contains a series of questions related to operating systems, focusing on process management, scheduling algorithms, and context switching. It includes inquiries about process state transitions, CPU burst times, and the behavior of processes in a multiprogramming environment. Specific calculations and theoretical explanations are required to answer the questions posed.

Uploaded by

publish.bom
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views3 pages

Process Scheduling and Context Switching Analysis

The document contains a series of questions related to operating systems, focusing on process management, scheduling algorithms, and context switching. It includes inquiries about process state transitions, CPU burst times, and the behavior of processes in a multiprogramming environment. Specific calculations and theoretical explanations are required to answer the questions posed.

Uploaded by

publish.bom
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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?

You might also like