Skip to content

GATE CS System Calls questions

Practise System Calls questions for GATE CS. Explore official PYQs and original topic-wise quizzes, check answers and view available solutions. Free, no sign-in.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

14 on this page
Official PYQ2026Operating SystemSystem CallsNAT · 2 marks
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 < 3; i++) { if (fork() == 0) { continue; } break; } printf("Hello!"); return 0; } The total number of times that the printf statement gets …
Official PYQ2024Operating SystemSystem CallsNAT · 2 marks
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){ fork (); printf("hello"); wait (NULL) ; X-- ; } The total number of times the printf statement is executed is __________.
Official PYQ2023Operating SystemSystem CallsMSQ · 1 mark
Which one or more of the following options guarantee that a computer system will transition from user mode to kernel mode?
Official PYQ2021Operating SystemSystem CallsMSQ · 1 mark
Which of the following standard CC library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux\text{UNIX/Linux} operating system?
Official PYQ2019Operating SystemSystem CallsNAT · 1 mark
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 ________________ .
Official PYQ2018Operating SystemSystem CallsMCQ · 1 mark
The following are some events that occur after a device controller issues an interrupt while process LL is under execution. P. The processor pushes the process status of LL onto the control stack Q. The processor finishes the execution of the current instruction R. The processor executes the interrupt service routine S. The processor pops the process …
Official PYQ2012Operating SystemSystem CallsMCQ · 1 mark
A process executes the code fork(); fork(); fork(); The total number of child processes created is
Official PYQ2011Operating SystemSystem CallsMCQ · 1 mark
A computer handles several interrupt sources of which of the following are relevant for this question. Interrupt from CPU temperature sensor (raises interrupt if CPU temperature is too high) Interrupt from Mouse (raises Interrupt if the mouse is moved or a button is pressed) Interrupt from Keyboard (raises Interrupt if a key is pressed or released) Interrupt …
Official PYQ2008Operating SystemSystem CallsMCQ · 1 mark
A process executes the following code for(i=0; i<n; i++) fork(); The total number of child processes created is
Official PYQ2005Operating SystemSystem CallsMCQ · 1 mark
Consider the following code fragment: if (fork() == 0) { a = a + 5; printf("%d, %p n", a, &a); } else { a = a - 5; printf ("%d, %p n", a,& a); } Let u,vu,v be the values printed by the parent process and x,yx,y be the values printed by the child process. Which one of the following is TRUE?
Official PYQ2001Operating SystemSystem CallsMCQ · 1 mark
A processor needs software interrupt to
Official PYQ1998Operating SystemSystem CallsMCQ · 1 mark
Which of the following devices should get higher priority in assigning interrupts?
Official PYQ1997Operating SystemSystem CallsMCQ · 1 mark
When an interrupt occurs, an operating system
Official PYQ1993Operating SystemSystem CallsNAT · 1 mark
The details of an interrupt cycle are shown in figure. Given that an interrupt input arrives every 11 msec, what is the percentage of the total time that the CPU devotes for the main program execution.