4 Qs · 2011–2024 · 5 marks · 0.2 marks/paperStandard yield
GATE tests System Calls through two primary angles: conceptual understanding of dual-mode operation (distinguishing user-level library routines and mode switches from true kernel-l… Guide
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) {
fork();
printf("hello");
wait(NULL);
x--;
}…Topic guide
GATE tests System Calls through two primary angles: conceptual understanding of dual-mode operation (distinguishing user-level library routines and mode switches from true kernel-level traps and process switches) and algorithmic tracing of process control system calls like fork() and wait(). Recent papers feature multi-select questions (MSQs) probing which events or C standard library functions strictly trigger kernel transitions, alongside numerical answer type (NAT) questions involving state-tree tracing over loops of system calls.
Dual Mode Execution & Mode Switching Overheads
common · mixed · 1 marks · 2023, 2011
Comparing the overhead and semantics of a user-to-kernel mode switch against a full process context switch, or identifying conditions (traps, page faults, interrupts) that mandate switching CPU execution levels.
Standard Library vs Kernel System Call Invocation
occasional · MSQ · 1 marks · 2023, 2021
Evaluating standard C library functions (e.g., malloc, exit, sleep, strlen) to determine whether they execute entirely in user space or strictly necessitate invoking underlying system calls (brk, mmap, exit_group, nanosleep).
Process Creation & Control Flow Tracing (fork/wait)
common · NAT · 2 marks · 2024
Tracing loop structures or sequential invocations containing fork(), wait(), and I/O statements to compute total processes generated or total execution counts of specific statements.
Total Processes after n successive fork() calls without condition branches
Used when unconditional fork() calls execute in sequence or across iterations of a loop.
Cumulative Loop Statement Executions across Doubling Iterations
Used when each process in iteration executes a fork() followed by a print statement for iterations starting from 1 initial process.
Early questions tested straightforward comparative qualitative properties of context switching via single-choice MCQs.
2011
The introduction of MSQs led to deeper testing of POSIX/C standard library behavior vs actual OS system calls, repeatedly using malloc() as a key distractor.
2023, 2021
Recent exams shifted quantitative tracing of fork() and wait() loops into 2-mark NAT format requiring rigorous step-by-step tree tracing.
2024
Easy questions test direct definitions (e.g., mode switch is faster than process switch, or system call transitions mode). Medium questions require distinguishing user-space library buffering/allocation (malloc) from kernel calls (sleep, exit) or tracing concurrent fork() loops over multiple iterations without arithmetic slips.