Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : OPERATING SYSTEM (COMPUTER
BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
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.
Match the above plots with the corresponding disk scheduling algorithm.
Solution
Consider the following program. Assume execlp succeeds.

Which output order is guaranteed?
Which output order is guaranteed?
Solution
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?
- 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?
Solution
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?
Solution
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?
What is the absolute path of the file report.txt?
Solution
In xv6 on RISC-V, which register contains the system call number when the user process traps into the kernel?
Solution
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?
Solution
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?
Solution
What is the major disadvantage of the First-Come, First-Served (FCFS) CPU scheduling algorithm?
Solution
When a process successfully invokes the exec system call, which of the following definitely remains unchanged?
Solution
Consider the code segment (for xv6) given below.

What are the base address and the end address of the count reg?
What are the base address and the end address of the count reg?
Solution
Consider the following code snippet

Which of the following statements is correct?
Which of the following statements is correct?
Solution
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().
- 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().
Solution
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?
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?
Solution
Choose all correct statements regarding compiling and linking multiple C source files using gcc.
Solution
Inscript
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.
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.
Solution
Inscript
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?
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?
Solution
Inscript
Consider the following processes scheduled using FCFS.

What is the average waiting time?
Consider the following processes scheduled using FCFS.
What is the average waiting time?
Solution
Inscript
Consider the following processes scheduled using non-preemptive SJF.

What is the average response time?
Consider the following processes scheduled using non-preemptive SJF.
What is the average response time?
Solution
Inscript
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
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
Solution
Shape
Thickness [ / ]
3
All colors