uiz Space

January 2026 term · Operating Systems · BSCS4022

Operating Systems Quiz 1: 15 March 2026 (January 2026 term)

The IIT Madras BS Operating Systems (Operating Systems) Quiz 1 paper sat on 15 Mar 2026, in the January 2026 term: 18 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
18
Marks
50
Duration
120 min
MCQ
16
MSQ
2

Updated

No negative marking.

Question 1

+3 marksOne correct option

If the memory map for a device starts from the offset 0x40002000 and has a size of 4096 bytes in a 32-bit addressing scheme, what will be the last address in the memory map?

  1. A

    0x40003000

  2. B

    0x40002EFF

  3. C

    0x40001FFF

  4. D

    0x40002FFF

Show answer

Correct answer

  • D

    0x40002FFF

Question 2

+3 marksOne correct option

Consider the following memory-mapped register code:

What are the access sizes of the

and

registers, respectively?

  1. A

    is 4-byte, and is 1-byte.

    (A figure from the original paper is missing from the source site.)

  2. B

    Both registers are 1-byte.

    (A figure from the original paper is missing from the source site.)

  3. C

    Both registers are 4-byte.

    (A figure from the original paper is missing from the source site.)

  4. D

    is 1-byte, and is 4-byte.

    (A figure from the original paper is missing from the source site.)

Show answer

Correct answer

  • A

    is 4-byte, and is 1-byte.

    (A figure from the original paper is missing from the source site.)

Question 3

+3 marksOne correct option

What will be the output behavior of the following xv6 code snippet?

  1. A

    Only will be printed.

    (A figure from the original paper is missing from the source site.)

  2. B

    Only will be printed.

    (A figure from the original paper is missing from the source site.)

  3. C

    Both lines will be printed, but the order is non-deterministic.

    (A figure from the original paper is missing from the source site.)

  4. D

    Parent always prints first, then child.

    (A figure from the original paper is missing from the source site.)

Show answer

Correct answer

  • C

    Both lines will be printed, but the order is non-deterministic.

    (A figure from the original paper is missing from the source site.)

Question 4

+3 marksOne correct option

Which of the following correctly describes the sequence of steps when a new process is forked in xv6?
(i) Allocate a new proc structure. (ii) Copy the parent’s memory space to the child. (iii) Set up the trapframe for the child process. (iv) Add the child to the ready queue.

  1. A

    (i) → (iii) → (ii) → (iv)

  2. B

    (ii) → (i) → (iii) → (iv)

  3. C

    (i) → (ii) → (iii) → (iv)

  4. D

    (iii) → (i) → (ii) → (iv)

Show answer

Correct answer

  • C

    (i) → (ii) → (iii) → (iv)

Question 5

+3 marksOne correct option

Consider image of the page table entry is given below and the code for kvminit in vm.c.

What will be the values of the first 5 bits (from the right) of the page table entry after the execution of

?

  1. A

    01110

  2. B

    00111

  3. C

    10110

  4. D

    10111

Show answer

Correct answer

  • B

    00111

Question 6

+3 marksOne correct option

Consider the following code snippet for the syscall function in kernel/syscall.c (RISC-V xv6):

Why does xv6 store the system call number in the

register before invoking the kernel?

  1. A

    To store the return value of the system call.

  2. B

    To indicate the number of bytes to be transferred.

  3. C

    To let the kernel identify which system call the user process is requesting.

  4. D

    To store the stack pointer for the child process.

Show answer

Correct answer

  • C

    To let the kernel identify which system call the user process is requesting.

Question 7

+3 marksOne correct option

When a user types the command

in a Linux shell, which of the following sequences of system calls is most likely to occur for executing the command and then returning control to the shell?

  1. A

    exec-fork-wait

  2. B

    wait-exec-fork

  3. C

    fork-wait-exec

  4. D

    fork-exec-wait

Show answer

Correct answer

  • D

    fork-exec-wait

Question 8

+4 marksOne correct option

A system has a virtual memory space of 8 GB and uses a single-level page table with 221 entries. What is the size of each page frame?

  1. A

    2 KB

  2. B

    4 KB

  3. C

    8 KB

  4. D

    16 KB

Show answer

Correct answer

  • B

    4 KB

Question 9

+4 marksOne correct option

Consider a system with 128 MB of physical memory and a 32-bit virtual address space. Given a page size of 8 KB, what will be the maximum number of page frames that can be present in RAM?

  1. A

    212 frames

  2. B

    213 frames

  3. C

    214 frames

  4. D

    215 frames

Show answer

Correct answer

  • C

    214 frames

Question 10

+4 marksOne correct option

What could be the possible output of the following program?

  1. A

    Child A: 4 Parent A: 6 Parent B: 14 Child B: 12

  2. B

    Parent A: 6 Child A: 4 Child B: 12 Parent B: 14

  3. C

    Parent A: 6 Parent B: 8 Child A: 3 Child B: 12

  4. D

    Child A: 2 Parent A: 6 Parent B: 14 Child B: 10

Show answer

Correct answer

  • B

    Parent A: 6 Child A: 4 Child B: 12 Parent B: 14

Question 11

+2 marksOne correct option

In RISC-V, during system calls, which register stores the current program counter?

  1. A

    accumulator

  2. B

    exception program counter

  3. C

    mstatus

  4. D

    None of these

Show answer

Correct answer

  • B

    exception program counter

Question 12

+2 marksOne correct option

Consider the given memory map.

The memory address 0x200003CD corresponds to ________

  1. A

    Mouse

  2. B

    Keyboard

  3. C

    Timers

  4. D

    Interrupt Controller

  5. E

    None of these

Show answer

Correct answer

  • A

    Mouse

Question 13

+2 marksOne correct option

State True or False:
In xv6, after a user process calls fork(), both the parent and child processes have separate copies of the trapframe, so changes in one do not affect the other.

  1. A

    True

  2. B

    False

Show answer

Correct answer

  • A

    True

Question 14

+2 marksOne correct option

In xv6, a running process can be preempted by the scheduler due to a timer interrupt. What is the resulting state transition of the process?

  1. A

    Running → Sleeping

  2. B

    Running → Zombie

  3. C

    Running → Runnable

  4. D

    State remains unchanged

Show answer

Correct answer

  • C

    Running → Runnable

Question 15

+2 marksOne correct option

When a process invokes the exec system call, which components in the Process Control Block (PCB) remain unchanged?

  1. A

    Page table entries

  2. B

    Process identifier (PID)

  3. C

    The value of the program counter

  4. D

    File descriptor table and memory information

Show answer

Correct answer

  • B

    Process identifier (PID)

Question 16

+2 marksOne correct option

Consider a process A that forks B, B forks C, and C forks D. Processes A and B keep running, but process C terminates before D finishes. Later, D also terminates. Which process is responsible for waiting for and reaping process D?

  1. A

    Process A

  2. B

    Process B

  3. C

    Process C

  4. D

    Process init

Show answer

Correct answer

  • D

    Process init

Question 17

+2 marksOne or more correct options

Select the functions present in kernel/trampoline.S, and are responsible for switching from kernel pagetable to process pagetable and vice versa.

Select all that apply.

  1. A

    userret

  2. B

    usertrapret

  3. C

    trampoline

  4. D

    usertrap

Show answer

Correct answers

  • A

    userret

  • C

    trampoline

Question 18

+3 marksOne or more correct options

Consider the following processes in an xv6-like operating system:
• Process P1 is ready to run and waiting in the run queue. • Process P2 is currently executing on the CPU. • Process P3 has called

waiting for an I/O event. • Process P4 has exited but its parent has not yet called

. Select all the correct statements about the states of the processes.

Select all that apply.

  1. A

    Process P1 is in the RUNNABLE state.

  2. B

    Process P2 is in the RUNNING state.

  3. C

    Process P3 is in the SLEEPING state.

  4. D

    Process P4 is in the ZOMBIE state.

  5. E

    Process P3 is in the RUNNING state.

  6. F

    Process P4 is in the RUNNABLE state.

Show answer

Correct answers

  • A

    Process P1 is in the RUNNABLE state.

  • B

    Process P2 is in the RUNNING state.

  • C

    Process P3 is in the SLEEPING state.

  • D

    Process P4 is in the ZOMBIE state.