uiz Space

January 2026 term · Operating Systems · BSCS4022

Operating Systems End Term: 10 May 2026, Set 1 (January 2026 term)

The IIT Madras BS Operating Systems (Operating Systems) End Term paper sat on 10 May 2026, in the January 2026 term, set 1: 20 questions for 50 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
20
Marks
50
Duration
180 min
MCQ
12
MSQ
3
Numerical
5

Updated

Official paper: OS 10 May 26 · No negative marking.

Question 1

+4 marksOne correct option

Consider the below plots representing the order in which the requests are serviced by different disk scheduling algorithms.

Match the above plots with the corresponding disk scheduling algorithm.

  1. A

    (1) - C-SCAN, (2) - FCFS, (3) - SCAN, (4) - C-LOOK

  2. B

    (1) - C-LOOK, (2) - FCFS, (3) - SCAN, (4) - C-SCAN

  3. C

    (1) - SCAN, (2) - C-SCAN, (3) - C-LOOK, (4) - FCFS

  4. D

    (1) - C-LOOK, (2) - C-SCAN, (3) - FCFS, (4) - SCAN

Show answer

Correct answer

  • A

    (1) - C-SCAN, (2) - FCFS, (3) - SCAN, (4) - C-LOOK

Question 2

+4 marksOne correct option

Consider the following program. Assume execlp succeeds.

Which output order is guaranteed?

  1. A

    parent done appears before hello

  2. B

    hello appears before parent done

  3. C

    Only parent done appears

  4. D

    The order is non-deterministic

Show answer

Correct answer

  • B

    hello appears before parent done

Question 3

+4 marksOne correct option

Consider the following resource-allocation situation.
• Process P1 holds resource R1 and waits for R2. • Process P2 holds resource R2 and waits for R3. • Process P3 holds resource R3 and waits for R1. • None of the processes releases its currently held resource until it acquires the requested one.
Which deadlock condition is most directly exhibited by the waiting pattern above?

  1. A

    Mutual exclusion

  2. B

    Preemption

  3. C

    Circular wait

  4. D

    Time sharing

Show answer

Correct answer

  • C

    Circular wait

Question 4

+2 marksOne correct option

If the memory map for a device starts at address 0x40001000 and has a size of 8192 bytes, what is the last valid address in the memory map?

  1. A

    0x40002000

  2. B

    0x40002FFE

  3. C

    0x40002FFF

  4. D

    0x40003000

Show answer

Correct answer

  • C

    0x40002FFF

Question 5

+2 marksOne correct option

Consider that the following commands are executed in a shell with root (/) as the current directory.

What is the absolute path of the file report.txt?

  1. A

    /data/processed/report.txt

  2. B

    /data/raw/monthly/report.txt

  3. C

    /data/processed/monthly/report.txt

  4. D

    /monthly/report.txt

Show answer

Correct answer

  • C

    /data/processed/monthly/report.txt

Question 6

+2 marksOne correct option

In xv6 on RISC-V, which register contains the system call number when the user process traps into the kernel?

  1. A

    a0

  2. B

    a7

  3. C

    sp

  4. D

    sepc

Show answer

Correct answer

  • B

    a7

Question 7

+2 marksOne correct option

When a shell executes a command and then waits for it to finish before printing the next prompt, which sequence of system calls is most likely used?

  1. A

    exec → fork → wait

  2. B

    wait → fork → exec

  3. C

    fork → wait → exec

  4. D

    fork → exec → wait

Show answer

Correct answer

  • D

    fork → exec → wait

Question 8

+2 marksOne correct option

In a 64-bit RISC-V system, the scause register stores trap information. What will be the value of scause for an Environment call from U-mode?

  1. A

    0x0000000000000008

  2. B

    0x8000000000000008

  3. C

    0x0000000000000009

  4. D

    0x8000000000000009

Show answer

Correct answer

  • A

    0x0000000000000008

Question 9

+2 marksOne correct option

What is the major disadvantage of the First-Come, First-Served (FCFS) CPU scheduling algorithm?

  1. A

    Starvation of long processes

  2. B

    Convoy effect due to long CPU-bound processes

  3. C

    It always requires page replacement

  4. D

    It cannot be implemented without virtual memory

Show answer

Correct answer

  • B

    Convoy effect due to long CPU-bound processes

Question 10

+2 marksOne correct option

When a process successfully invokes the exec system call, which of the following definitely remains unchanged?

  1. A

    Program counter value

  2. B

    Address space contents

  3. C

    Process identifier (PID)

  4. D

    User stack contents

Show answer

Correct answer

  • C

    Process identifier (PID)

Question 11

+2 marksOne correct option

Consider the code segment (for xv6) given below.

What are the base address and the end address of the count reg?

  1. A

    The base address is 0xD200401A, and the end address is 0xD200401C.

  2. B

    The base address is 0xD2004018, and the end address is 0xD2004019.

  3. C

    The base address is 0xD200401A, and the end address is 0xD200401B.

  4. D

    The base address is 0xD2004026, and the end address is 0xD2004027.

Show answer

Correct answer

  • C

    The base address is 0xD200401A, and the end address is 0xD200401B.

Question 12

+3 marksOne correct option

Consider the following code snippet

Which of the following statements is correct?

  1. A

    The program creates three threads, each printing "Operating Systems" 50 times, and "Done" is printed only after all thread outputs are completed.

  2. B

    The program creates three threads, each printing "Operating Systems" 50 times, but "Done" may appear before some thread outputs.

  3. C

    The program creates one thread at a time due to pthread join, resulting in sequential execution.

  4. D

    The program prints "Operating Systems" exactly 50 times in total and then prints "Done".

Show answer

Correct answer

  • A

    The program creates three threads, each printing "Operating Systems" 50 times, and "Done" is printed only after all thread outputs are completed.

Question 13

+3 marksOne or more correct options

Consider the following processes in an xv6-like operating system:
• Process P1 is waiting in the ready queue. • Process P2 is currently executing on the CPU. • Process P3 is blocked waiting for disk I/O. • Process P4 has terminated, but its parent has not yet called wait().

Select all that apply.

  1. A

    P1 is in the RUNNABLE state.

  2. B

    P2 is in the RUNNING state.

  3. C

    P3 is in the SLEEPING state.

  4. D

    P4 is in the ZOMBIE state.

  5. E

    P3 is in the RUNNABLE state.

  6. F

    P4 is in the RUNNING state.

Show answer

Correct answers

  • A

    P1 is in the RUNNABLE state.

  • B

    P2 is in the RUNNING state.

  • C

    P3 is in the SLEEPING state.

  • D

    P4 is in the ZOMBIE state.

Question 14

+3 marksOne or more correct options

Assume that context switches can occur at any time during execution. The variable counter is shared between two concurrent threads/processes. Initial value: counter = 100
Program A R1 = counter R1 = R1 + 30 counter = R1
Program B R2 = counter R2 = R2 - 20 counter = R2
Which of the following can be the possible final values of counter?

Select all that apply.

  1. A

    80

  2. B

    110

  3. C

    130

  4. D

    90

  5. E

    100

  6. F

    120

Show answer

Correct answers

  • A

    80

  • B

    110

  • C

    130

Question 15

+3 marksOne or more correct options

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

Select all that apply.

  1. A

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

  2. B

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

  3. C

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

  4. D

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

  5. E

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

Show answer

Correct answers

  • A

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

  • B

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

  • C

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

Question 16

+2 marksNumerical answer

A system has 256 MiB of physical memory and uses a page size of 4 KiB. How many page frames are present in RAM?
Assume 1 MiB = 220 bytes and 1 KiB = 210 bytes.

Show answer

Correct answer: 65536

Question 17

+2 marksNumerical answer

Consider the following processes, all arriving at time 0 and entering the ready queue in the order shown below.

If the CPU scheduling policy is Round Robin with time quantum 2, what is the average response time?

Show answer

Correct answer: 3

Question 18

+2 marksNumerical answer

Consider the following processes scheduled using FCFS.

What is the average waiting time?

Show answer

Correct answer: 3.5

Question 19

+2 marksNumerical answer

Consider the following processes scheduled using non-preemptive SJF.

What is the average response time?

Show answer

Correct answer: 4

Question 20

+2 marksNumerical answer

A system uses a 32-bit virtual address space with a page size of 4 KiB and a single-level page table. How many entries are required in the page table?
Assume 1 KiB = 210 bytes

Show answer

Correct answer: 1048576