uiz Space

January 2026 term · Operating Systems · BSCS4022

Operating Systems Quiz 2: 12 April 2026 (January 2026 term)

The IIT Madras BS Operating Systems (Operating Systems) Quiz 2 paper sat on 12 Apr 2026, in the January 2026 term: 17 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
17
Marks
50
Duration
120 min
MSQ
4
MCQ
9
Numerical
4

Updated

Official paper: OS 06 Apr 26 · No negative marking.

Question 1

+3 marksOne or more correct options

Which of the following statements are correct?

Select all that apply.

  1. A

    Mutual exclusion is guaranteed.

  2. B

    The solution satisfies the progress condition.

  3. C

    Bounded waiting is guaranteed.

  4. D

    Deadlock can occur if one process is slow.

Show answer

Correct answers

  • A

    Mutual exclusion is guaranteed.

  • C

    Bounded waiting is guaranteed.

Question 2

+3 marksOne or more correct options

Select all the correct statements.

Select all that apply.

  1. A

    Mutexes use busy wait while trying to acquire the lock.

  2. B

    Mutexes can be also implemented with spinlocks

  3. C

    A blocking semaphore with S initialized to 1 is similar to a mutex.

  4. D

    The Thundering herd problem of the mutexes can be solved using a queue.

Show answer

Correct answers

  • C

    A blocking semaphore with S initialized to 1 is similar to a mutex.

  • D

    The Thundering herd problem of the mutexes can be solved using a queue.

Question 3

+3 marksOne or more correct options

Choose all the correct statements regarding compiling and linking multiple C source files using gcc

Select all that apply.

  1. A

    The command gcc file1.c file2.c -o output produces an executable named output.

  2. B

    The command gcc -c file1.c file2.c -o output produces an executable named output.

  3. C

    The command gcc -c file1.c file2.c produces file1.o and file2.o.

  4. D

    The command gcc file1.o file2.o -c -o output produces an executable named output.

  5. E

    The command gcc file1.o file2.o -o output links the object files into an executable named output.

Show answer

Correct answers

  • A

    The command gcc file1.c file2.c -o output produces an executable named output.

  • C

    The command gcc -c file1.c file2.c produces file1.o and file2.o.

  • E

    The command gcc file1.o file2.o -o output links the object files into an executable named output.

Question 4

+3 marksOne correct option

Two processes P1 and P2 are competing for two shared R1 and R2.
• P1 holds R1 and waits for R2. • P2 holds R2 and waits for R1.
Both processes wait indefinitely and none of them can proceed. Which of the following problem(s) is/are illustrated in the above scenario?

  1. A

    Starvation

  2. B

    Deadlock

  3. C

    Mutual exclusion

  4. D

    Busy waiting

Show answer

Correct answer

  • B

    Deadlock

Question 5

+3 marksOne correct option

Given the hexadecimal representation of the first few bytes of different files, identify the executable file (ELF file) from the options below. (Hint: The ASCII value of ’E’ = 69, ’L’ = 76, and ’F’ = 70)(Hint: ELF → 45 4C 46)

  1. A

    7F 41 42 43 01 01 01 00

  2. B

    7F 45 58 45 02 01 01 00

  3. C

    7F 50 4C 54 02 01 01 00

  4. D

    7F 45 4C 46 01 01 01 00

Show answer

Correct answer

  • D

    7F 45 4C 46 01 01 01 00

Question 6

+3 marksOne correct option
  1. A

    0x0000000000000005

  2. B

    0x0000000000000009

  3. C

    0x8000000000000005

  4. D

    0x8000000000000009

Show answer

Correct answer

  • C

    0x8000000000000005

Question 7

+2 marksOne correct option

State True or False: In inter-process communication (IPC) using shared memory, the commonly used system calls are send and receive.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • B

    False

Question 8

+2 marksOne correct option

If the exec system call is invoked as exec("/analyze", "data.txt", "config.json", "log.txt", "result.out");, then what are the values of the argc and argv[3] respectively?

  1. A

    4, "config.json"

  2. B

    5, "data.txt"

  3. C

    5, "log.txt"

  4. D

    4, "result.out"

Show answer

Correct answer

  • C

    5, "log.txt"

Question 9

+2 marksOne correct option

In the following code snippet, a child process is created to execute the ls -l /home command. Identify the correct system call that should be used at LINE-1.

  1. A

    execlp

  2. B

    execl

  3. C

    execv

  4. D

    execvp

Show answer

Correct answer

  • A

    execlp

Question 10

+2 marksOne correct option

Match the following

  1. A

    a - 1, b - 2, c - 3

  2. B

    a - 2, b - 1, c - 3

  3. C

    a - 2, b - 3, c - 1

  4. D

    a - 1, b - 3, c - 2

Show answer

Correct answer

  • D

    a - 1, b - 3, c - 2

Question 11

+2 marksOne correct option

What is a major disadvantage of the First Come First Serve (FCFS) scheduling algorithm in operating systems?

  1. A

    Starvation of process

  2. B

    Convoy effect caused by long processes

  3. C

    Requires knowledge of burst time in advance

  4. D

    Frequent context switching

Show answer

Correct answer

  • B

    Convoy effect caused by long processes

Question 12

+2 marksOne correct option

Which of the following statements correctly describes a key difference between the First-Come-First-Serve (FCFS) and Round Robin (RR) CPU scheduling algorithms?

  1. A

    FCFS uses a fixed time quantum, while Round Robin does not.

  2. B

    FCFS is non-preemptive, while Round Robin is preemptive.

  3. C

    Round Robin always selects the process with the shortest burst time.

  4. D

    Both FCFS and Round Robin are non-preemptive scheduling algorithms.

Show answer

Correct answer

  • B

    FCFS is non-preemptive, while Round Robin is preemptive.

Question 13

+4 marksOne or more correct options

Assume that context switches can occur at any time during the execution of the following code snippet. The variable counter is shared between two programs. Which of the following can be the possible final values of counter? Initial value of counter = 200

Select all that apply.

  1. A

    185

  2. B

    160

  3. C

    225

  4. D

    200

  5. E

    240

  6. F

    175

Show answer

Correct answers

  • A

    185

  • B

    160

  • C

    225

Question 14

+4 marksNumerical answer

Consider the following code snippet from Bakery Algorithm.

Considering that there are 5 processes, and initially num[0]=3, num[1]=0, num[2]=5,num[3]=2, num[4]=4, If Process 3 (num[2]) starts executing its critical section and then unlocks, what will be the new value of num[2] after P3 finishes execution?
Note: Enter your answer in decimal.

Show answer

Correct answer: 0

Question 15

+4 marksNumerical answer

Consider a set of 5 processes with the following arrival and burst times.

If the CPU scheduling policy used is Round Robin with a time quantum of 3 units, what will be the average response time?
Note: Enter your answer in decimal.

Show answer

Correct answer: 6

Question 16

+4 marksNumerical answer

Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and requiring the following CPU burst times to complete.

Assuming that the system employs the First-Come-First-Served (FCFS) scheduling algorithm, what will be the average waiting time?
Note: Enter your answer in decimal.

Show answer

Correct answer: 5.75

Question 17

+4 marksNumerical answer

Consider a system with four processes, P1, P2, P3, and P4, arriving at different times and requiring the following CPU burst times:

Assuming that the system employs the Shortest Job First (SJF) scheduling algorithm, calculate the average response time.
Note: Enter your answer in decimal.

Show answer

Correct answer: 3.25