MauryaHub PYQ Practice

Operating System · End Term · Jan 2026 · FN

Operating System · End Term · Jan 2026 FN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 20 published solutions

Question 2 MCQ · 3.0 marks

Consider that the following commands are executed in a shell with root (/) as the current directory.
Source diagram or notation
What is the absolute path of the file README.md?
6406536961578.
/project/src/README.md
6406536961579.
/project/docs/README.md
6406536961580.
/project/assets/docs/README.md
6406536961581.
/README.md

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 3.0 marks

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 R4. • Process P4 holds resource R4 and waits for R1. • None of the processes releases its held resource until it acquires the requested one. Which deadlock condition is most directly illustrated by the waiting pattern above?
6406536961582.
Mutual exclusion
6406536961583.
Preemption
6406536961584.
Circular wait
6406536961585.
Time sharing

A published solution is not available for this question yet.

Report a correction for Q3

Question 4 MCQ · 3.0 marks

If the memory map for a device starts at address 0x50002000 and has a size of 4096 bytes, what is the last valid address in the memory map?
6406536961586.
0x50002FFE
6406536961587.
0x50002FFF
6406536961588.
0x50003000
6406536961589.
0x50002000

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 3.0 marks

Consider the following program. Assume execlp succeeds.
Source diagram or notation
Which output order is guaranteed?
6406536961636.
parent ready appears before hello
6406536961637.
hello appears before parent ready
6406536961638.
Only parent ready appears
6406536961639.
The order is non-deterministic

A published solution is not available for this question yet.

Report a correction for Q5

Question 6 MSQ · 3.0 marks

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 keyboard I/O. • Process P4 has terminated, but its parent has not yet called wait(). Select all correct statements.
6406536961590.
P1 is in the RUNNABLE state.
6406536961591.
P2 is in the RUNNING state.
6406536961592.
P3 is in the SLEEPING state.
6406536961593.
P4 is in the ZOMBIE state.
6406536961594.
P3 is in the RUNNABLE state.
6406536961595.
P4 is in the RUNNING state.

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MSQ · 3.0 marks

Consider the following solution for the critical section problem using a shared variable turn. Initial value: turn = 1
Source diagram or notation
Which of the following statements are correct?
6406536961601.
Mutual exclusion is guaranteed.
6406536961602.
The solution satisfies the progress condition.
6406536961603.
Bounded waiting is guaranteed.
6406536961604.
Deadlock can occur if one process is slow.

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MSQ · 3.0 marks

Assume that context switches can occur at any time during execution. The variable counter is shared between two concurrent programs. Initial value: counter = 150
Source diagram or notation
Which of the following can be the possible final values of counter?
6406536961605.
115
6406536961606.
135
6406536961607.
170
6406536961608.
150
6406536961609.
155
6406536961610.
185

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MSQ · 3.0 marks

Choose all correct statements regarding compiling and linking multiple C source files using gcc.
6406536961619.
gcc file1.c file2.c -o output produces an executable named output.
6406536961620.
gcc -c file1.c file2.c produces file1.o and file2.o.
6406536961621.
gcc file1.o file2.o -o output links the object files into an executable named output.
6406536961622.
gcc -c file1.c file2.c -o output produces an executable named output.
6406536961623.
gcc file1.o file2.o -c -o output produces an executable named output.

A published solution is not available for this question yet.

Report a correction for Q9

Question 10 NAT · 1.5 marks

A system has 128 MiB of physical memory and uses a page size of 4 KiB. How many page frames are present in RAM? Assume 1 MiB = 2\(^{20}\) bytes and 1 KiB = 2\(^{10}\) bytes.

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 NAT · 1.5 marks

Consider the following processes, all arriving at time 0 and entering the ready queue in the order shown below.
Source diagram or notation
If the CPU scheduling policy is Round Robin with time quantum 3, what is the average response time?

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MCQ · 2.0 marks

Consider the code segment (for xv6) given below.
Source diagram or notation
What are the base address and the end address of data_reg?
6406536961597.
The base address is 0xE3005018, and the end address is 0xE300501A.
6406536961598.
The base address is 0xE3005018, and the end address is 0xE300501B.
6406536961599.
The base address is 0xE3005006, and the end address is 0xE3005009.
6406536961600.
The base address is 0xE3005024, and the end address is 0xE3005027.

A published solution is not available for this question yet.

Report a correction for Q12

Question 13 MCQ · 2.0 marks

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?
6406536961611.
exec → fork → wait
6406536961612.
wait → fork → exec
6406536961613.
fork → wait → exec
6406536961614.
fork → exec → wait

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MCQ · 2.0 marks

Consider the following code snippet.
Source diagram or notation
Which of the following statements is correct?
6406536961615.
The program creates two threads, each printing OS Lab 40 times, and Complete is printed only after both threads finish.
6406536961616.
The program creates two threads, but Complete may appear before some thread outputs.
6406536961617.
The program prints OS Lab exactly 40 times in total and then prints Complete.
6406536961618.
The program executes the two threads sequentially because pthread_create() blocks.

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MCQ · 2.0 marks

In xv6 on RISC-V, which register contains the system call number when the user process traps into the kernel?
6406536961625.
a0
6406536961626.
a7
6406536961627.
sp
6406536961628.
sepc

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 MCQ · 2.0 marks

Given the hexadecimal representation of the first few bytes of different files, identify the executable ELF file.
6406536961630.
7F 45 58 45 01 01 01 00
6406536961631.
7F 50 44 46 01 01 01 00
6406536961632.
7F 45 4C 46 02 01 01 00
6406536961633.
7F 4A 50 47 01 01 01 00

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 MCQ · 2.0 marks

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 S-mode?
6406536961640.
0x8000000000000009
6406536961641.
0x0000000000000009
6406536961642.
0x0000000000000008
6406536961643.
0x8000000000000008

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 NAT · 2.0 marks

Consider the following processes scheduled using FCFS.
Source diagram or notation
What is the average waiting time?

A published solution is not available for this question yet.

Report a correction for Q18

Question 19 NAT · 2.0 marks

A system uses a 32-bit virtual address space with a page size of 8 KiB and a single-level page table. How many entries are required in the page table? Assume 1 KiB = 2\(^{10}\) bytes.

A published solution is not available for this question yet.

Report a correction for Q19

Question 20 NAT · 3.0 marks

Consider the following processes scheduled using non-preemptive SJF.
Source diagram or notation
What is the average response time?

A published solution is not available for this question yet.

Report a correction for Q20

Question 21 MCQ · 4.0 marks

Consider the below plots representing the order in which the requests are serviced by different disk scheduling algorithms.
Source diagram or notation
Match the above plots with the corresponding disk scheduling algorithm.
6406536961644.
(1) – C-LOOK, (2) – C-SCAN, (3) – SCAN, (4) – SSTF
6406536961645.
(1) – C-SCAN, (2) – FCFS, (3) – SSTF, (4) – C-LOOK
6406536961646.
(1) – SSTF, (2) – SCAN, (3) – C-SCAN, (4) – C-LOOK
6406536961647.
(1) – FCFS, (2) – C-LOOK, (3) – SSTF, (4) – SCAN

A published solution is not available for this question yet.

Report a correction for Q21