Process Management
GATE CSE & IT · 23 questions across 17 years (1993-2026) · 43% recurrence rate
Recurrence sparkline
1993–2026Difficulty mix
Question types
All 23 questions on Process Management
Consider the following program snippet. Assume that the program compiles and runs successfully. Further, assume that the fork( ) system call is always successful in creating a process. int main( ) { int i; for (i = 0; i...
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 when...
Consider a process P running on a CPU. Which one or more of the following events will always trigger a context switch by the OS that results in process P moving to a non-running state (e.g., ready, blocked)?
Which of the following process state transitions is/are NOT possible?
Consider the following code snippet using the fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors. int x = 3; while(x > 0) { for...
Which one or more of the following need to be saved on a context switch from one thread (T1) of a process to another thread (T2) of the same process?
Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?
Consider the following multi-threaded code segment (in a mix of C and pseudocode), invoked by two processes P1 and P2, and each of the processes spawns two threads T1 and T2: int x = 0; // global Lock L1; // global main(...
Consider the following statements about process state transitions for a system using preemptive scheduling. I. A running process can move to ready state. II. A ready process can move to ready state. III. A blocked proces...
The following C program is executed on a Unix/Linux system: #include < unistd.h > int main () { int i ; for (i=0; i<10; i++) if (i%2 == 0) fork ( ) ; return 0 ; } The total number of child processes created is _____.
The maximum number of processes that can be in $$Ready$$ state for a computer system with $$n$$ $$CPUs$$ is
A process executes the code fork $$\left( {\,\,\,} \right);$$ fork $$\left( {\,\,\,} \right);$$ fork $$\left( {\,\,\,} \right);$$ The total number of child processes created is
Let the time taken to switch between user and kernel modes of execution be $${t_1}$$ while the time taken to switch between two processes be $${t_2}$$. Which of the following is TRUE?
A thread is usually defined as a ''light weight process'' because an operating system $$(OS)$$ maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
A process executes the following code for (i = 0; i < n; i + +) fork ( ); The total number of child processes created is
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d, %d \n", a, &a); } else { a = a - 5; printf ("%d, %d \n", a, &a); } Let $$u,v$$ be the values printed by the parent process, and $$x,y$$ be t...
Draw the process state transition diagram of an $$OS$$ in which (i) each process is in one of the five states: created, ready, running, blocked (i.e. sleep or wait), or terminated, and (ii) only non-preemptive scheduling...
Which combination of the following features will suffice to characterize an $$OS$$ as a multi-programmed $$OS?$$ $$(a).$$ More than one program may be loaded into main memory at the same time for execution. $$(b).$$ If a...
Which of the following actions is/are typically not performed by the operating system when switching context from process $$A$$ to process $$B$$ ?
Listed below are some operating system abstractions (in the left column) and the hardware components. Which matching pairs is correct? $$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$$$\,\,\,\,\,\,\,\,\,\,$$ List-$${\rm...
When an interrupt occurs, an Operating System
The concurrent programming constructs fork and join are as below: Fork (label) which creates a new process executing from the specified label join (variable) which decrements the specified synchronization variable (by 1)...
A part of the system software, which under all circumstances must reside in the main memory is: