Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : OPERATING SYSTEMS (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)
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
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?
Solution
Consider the following memory-mapped register code:

What are the access sizes of the
and
registers, respectively?
What are the access sizes of the
Solution
What will be the output behavior of the following xv6 code snippet?

Solution
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.
(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.
Solution
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
?
What will be the values of the first 5 bits (from the right) of the page table entry after the execution of
Solution
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?
Why does xv6 store the system call number in the
Solution
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?
Solution
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?
Solution
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?
Solution
What could be the possible output of the following program?

Solution
In RISC-V, during system calls, which register stores the current program counter?
Solution
Consider the given memory map.

The memory address 0x200003CD corresponds to ________
The memory address 0x200003CD corresponds to ________
Solution
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.
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.
Solution
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?
Solution
When a process invokes the exec system call, which components in the Process Control Block (PCB) remain unchanged?
Solution
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?
Solution
Select the functions present in kernel/trampoline.S, and are responsible for switching from kernel pagetable to process pagetable and vice versa.
Solution
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.
- Process P1 is ready to run and waiting in the run queue.
- Process P2 is currently executing on the CPU.
- Process P3 has called
- Process P4 has exited but its parent has not yet called
Select all the correct statements about the states of the processes.
Solution
Shape
Thickness [ / ]
3
All colors