15 Qs · since 2011 · 16 marks · 0.6 marks/paperStandard yield
GATE evaluates the 'Processes' topic primarily through the standard 5-state process lifecycle (New, Ready, Running, Blocked/Waiting, Terminated) and the valid/invalid transitions b… Guide
fork() system call is always successful in creating a process.
int main () {
int i;
for (i = 0; i < 3; i++){
if (fork() == 0){
continue;
}
break;
}
printf("Hello!");
return 0;
}…#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 _______.fork();
fork();
fork();
The total number of child processes created isTopic guide
GATE evaluates the 'Processes' topic primarily through the standard 5-state process lifecycle (New, Ready, Running, Blocked/Waiting, Terminated) and the valid/invalid transitions between these states. Questions consistently test the exact path of a process during execution, preemption, and I/O invocation. Recent trends show a progression from purely theoretical transition checks (MCQ/MSQ) to procedural tracing of state changes in C code execution (NAT).
Process State Transition Validity
common · mixed · 1 marks · 2024, 2020
Questions present either a list of statements or transition pairs (e.g., Blocked to Running, Ready to Waiting) and ask to identify which transitions are valid, invalid, or possible under preemptive/non-preemptive models.
Code-Based Process Lifecycle Tracing
occasional · NAT · 1 marks · 2025
A C program containing system calls or standard I/O functions (such as scanf and printf) is provided, requiring the candidate to trace loop iterations and count how many times a process transitions between Running, Blocked, and Ready queues.
Thread Context Switch State Identification
rare · MSQ · 1 marks · 2023
Identifying which hardware registers, memory structures, and control blocks are saved/restored during an intra-process thread switch versus an inter-process context switch.
Process State Capacity vs Hardware Bounds
occasional · MCQ · 1 marks · 2015
Questions evaluating the theoretical maximum or limit on the number of processes in a specific state (e.g., Ready vs Running) relative to system parameters like CPU count ().
Thread Resource Sharing Identification
occasional · MCQ · 1 marks · 2017
Questions listing execution context elements (registers, stack, program counter, address space, file descriptors) and asking which are shared vs private among threads of the same process.
Thread Resource Sharing and Implementation Properties
rare · MSQ · 1 marks · 2024
Multi-statement conceptual evaluation assessing what resources (stack, heap, file descriptors, address space) are shared vs. private among threads, and implementation models (user space vs. kernel space).
Sequential Fork Process Counting
rare · MCQ · 1 marks · 2012
Determining the number of processes (or child processes) spawned by executing a sequence of unconditional `fork()` system calls.
Process State Transition and Mandatory Context Switch Analysis
occasional · MSQ · 1 marks · 2024
Evaluating which hardware or software events (blocking system calls, page faults, timer ticks, unrelated device interrupts) strictly force a running process to yield the CPU and transition to a non-running state (Blocked/Ready) versus events that merely execute an ISR and resume the running process.
Thread Resource Sharing and Thread Management Models
common · MCQ · 1 marks · 2017, 2014, 2011
Evaluating conceptual assertions about what is thread-private (program counter, registers, stack) versus process-shared (address space, heap, global variables, open files), as well as differences between user-level and kernel-level threads (context switch overhead, blocking calls, scheduling).
Process Creation & fork() Execution Tracing
common · NAT · 1.5 marks · 2026, 2019
Code snippets with loops executing fork() under conditional checks (e.g., modulo conditions or return-value checks like fork() == 0 with break/continue), requiring calculation of total child processes created or the count of specific print statements.
Race Conditions and Interleaving on Shared Variables
occasional · NAT · 1 marks · 2019
Analyzing concurrent processes performing arithmetic updates on a shared variable under uniprocessor time-sharing to determine the extreme possible values (minimum, maximum, or their range) caused by arbitrary preemption between atomic load, calculate, and store instructions.
Total Ready Queue Entries (from I/O)
Used when calculating how many times a process enters the ready queue during its lifecycle, paying close attention to whether the initial process admission () is explicitly included or excluded in the stem.
Maximum Running Processes Bound
Used when determining the upper limit of processes actively executing in a system with CPUs.
Total Processes Created by Consecutive Forks
Used to find the total number of processes (including the initial parent process) after unconditional sequential `fork()` calls.
Total Child Processes Created
Used when the question specifically asks for the number of *child* processes created by an initial parent executing consecutive `fork()` calls.
Total Processes from Sequential Forks
When unconditional sequential fork() system calls are executed in a program without branching.
Child Processes Created from Sequential Forks
Used to find the count of newly spawned child processes excluding the initial parent process after sequential unconditional forks.
Transitioned from traditional 1-mark single-choice conceptual questions to MSQs testing multiple invalid transitions simultaneously, and finally to NAT code-tracing problems mapping C I/O calls directly to process state changes.
2025, 2024, 2020
Recent exams leverage the MSQ format to test multiple components of thread-private state (e.g., Stack Pointer, Program Counter, General Purpose Registers) simultaneously, penalizing superficial knowledge.
2023
Questions are conceptual 1-mark items testing core definition-level distinctions (Ready queue independence from CPU count, and thread-private vs thread-shared memory resources).
2017, 2015
Recent papers leverage the MSQ format to test multiple precise conceptual boundaries regarding thread memory organization, protection models, and implementation spaces in a single question.
2024
Focuses on fundamental understanding of exponential process tree doubling via successive `fork()` invocations.
2012
Recent papers introduced fine-grained MSQ conceptual questions checking precise OS kernel mechanisms, such as distinguishing between an interrupt service routine (ISR) execution and an actual process context switch.
2024
Earlier papers (2011-2017) focused predominantly on 1-mark theoretical MCQs assessing thread memory isolation and kernel vs. user thread behavior.
2017, 2014, 2011
Recent examinations heavily emphasize NAT questions involving precise code tracing of fork() control logic and deep execution order interleaving for shared memory concurrency.
2026, 2019
All recent PYQs on this specific topic are 1-mark Easy questions. Easy questions directly test whether a student remembers the 5-state diagram arrows. Moderate/Hard variations introduce loop tracing with conditional I/O statements, parent-child fork hierarchies, or mixed timer preemption with I/O blocking.