cs4022_2024T1_Q1_NA.pdf
Operating System · Quiz 1 · Jan 2024
← Course papers · Start practice / exam
This page contains the reliably extracted subset, not the complete original paper.
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
Question 136 MCQ · 1.0 marks
In monolithic kernels, there is direct communication between modules in the kernel by procedure
calls.
TRUE
FALSE
A published solution is not available for this question yet.
Question 137 MCQ · 1.0 marks
The **_entry** function in an operating system kernel like xv6 is called by each CPU core individually
during the boot process, and it initializes the stack for each CPU core separately.
TRUE
FALSE
A published solution is not available for this question yet.
Question 138 MCQ · 1.0 marks
“Daemons are deliberate orphan processes that become detached from user sessions and operate
in the background.”
TRUE
FALSE
A published solution is not available for this question yet.
Question 139 MCQ · 2.0 marks
If the memory map for the interrupt controller starts from the offset 0x20000000 and has a size of
256 bytes in a 32-bit addressing scheme then what will be the last address in the memory map?
0x200000FF
0x20000100
0x200001FF
0x20000200
A published solution is not available for this question yet.
Question 140 MCQ · 2.0 marks
Which instruction in the xv6 operating system facilitates the transition of the CPU from user mode
to supervisor mode?
jmp
syscall
ecall
None of these
A published solution is not available for this question yet.
Question 141 MCQ · 2.0 marks
[[IMAGE:946f4ac2b1bc2635_4_0]]

It is the memory address where the proc array begins.
It is the total number of processes launched since the system boot.
It is the number of CPU cores available to xv6.
It is the maximum number of concurrent processes supported.
A published solution is not available for this question yet.
Question 142 MCQ · 2.0 marks
[[IMAGE:946f4ac2b1bc2635_5_1]]

Managing process states
Handling timer interrupts
Managing system resources
Storing the return address for function calls
A published solution is not available for this question yet.
Question 143 MCQ · 2.0 marks
What is the correct sequence of tasks that takes place as part of memory initializationof the xv6
kernel before turning on paging?
(i) Creation of page frames
(ii) Creation of page tables for kernel
(iii) Add each chunk of 4KB physical memory to the freelist
(iv) Set the page table bits in the **satp** register
(i) → (ii) → (iii) → (iv)
(i) → (iii) → (ii) → (iv)
(ii) → (i) → (iii) → (iv)
(ii) → (i) → (iv) → (iii)
A published solution is not available for this question yet.
Question 144 MCQ · 2.0 marks
Select the incorrect statements regarding the **exit** function.
The **exit** function sets the state of the current process to **ZOMBIE**.
The **exit** function reparents the child processes to the init process using the
**reparent** function.
The **exit** function changes the context of the current process to the parent
process by returning the exit status to the **wait** function of the parent.
The **exit** function is responsible for closing all the opened files using **fileclose**
function.
A published solution is not available for this question yet.
Question 145 MCQ · 2.0 marks
Select all the incorrect statements regarding the **wait** function.
**wait** function runs an infinite loop until all the child processes of the parent
are terminated.
**wait** function returns when it finds a terminated child process.
**wait** function returns the exit status of the child to the parent.
**wait** function returns the **pid** of the terminated child.
A published solution is not available for this question yet.
Question 146 MCQ · 3.0 marks
[[IMAGE:946f4ac2b1bc2635_7_2]]

stack0 + 3 + 4 * 1024
stack0 + 3 * 4* 1024
stack0 + 2 * 4 * 1024
stack0 + 2 + 4 * 1024
A published solution is not available for this question yet.
Question 147 MCQ · 3.0 marks
Consider the size of the virtual memory space is 4 GB, and the number of entries in the page table
is 2\(^{21}\). What is the size of each page frame?
3MB
3KB
6KB
6MB
A published solution is not available for this question yet.
Question 148 MCQ · 3.0 marks
Consider the following lines of code. Identify the TRUE statements.
[[IMAGE:946f4ac2b1bc2635_8_3]]
(i) Output is parent : 0 child : 1
(ii) In the parent process, fork returns child pid, and in the child process, fork returns 0
(iii) **wait** returns the **PID** of an exiting parent process
(iv) When **fork** is called, all pages are easily shared between parent and child by copying the
parent’s page tables

(i), (ii), and (iii)
(i), (iii), and (iv)
[[IMAGE:946f4ac2b1bc2635_9_4]] (i), (ii), and (iv)

(ii), (iii), and (iv)
A published solution is not available for this question yet.
Question 149 MCQ · 3.0 marks
Find the correct match for the following functions.
[[IMAGE:946f4ac2b1bc2635_9_5]]

[[IMAGE:946f4ac2b1bc2635_9_6]]

[[IMAGE:946f4ac2b1bc2635_9_7]]

[[IMAGE:946f4ac2b1bc2635_9_8]]

[[IMAGE:946f4ac2b1bc2635_9_9]]

A published solution is not available for this question yet.
Question 150 MCQ · 3.0 marks
Consider a system with 32 MB of physical memory and a 32-bit virtual address space. Given a page
size of 2 KB, what will be the number of frames?
2\(^{32}\) frames
2\(^{14}\) frames
2\(^{20}\) frames
2\(^{15}\) frames
A published solution is not available for this question yet.
Question 151 MSQ · 2.0 marks
Assume process A is waiting for an input, process B is running, and process C was running before
process B and is now waiting for its turn to run. Select all the correct statements from below.
A is in RUNNABLE state
A is in SLEEPING state
C is in RUNNABLE state
C is in SLEEPING state
A published solution is not available for this question yet.
Question 152 MSQ · 2.0 marks
Select all the correct statements about the first process in xv6 **(sbin/init).**
**init** process uses **fork** system call to create child processes and loads the other
programs using **exec** system call in the child processes.
The **init** process uses the **exec** system call to create child processes.
**init** process is created by a **fork** system call using **ecall** instruction.
**init** process is created by an **exec** system call using **ecall** instruction.
A published solution is not available for this question yet.
Question 153 MSQ · 3.0 marks
Which of the following can be possible output of the following lines of code?
[[IMAGE:946f4ac2b1bc2635_12_10]]

Child 30
Child 25
Parent 30
Child 30
Child 25
Parent 25
Parent 30
Child 30
Child 25
Parent 25
Child 30
Child 25
A published solution is not available for this question yet.
Question 154 MCQ · 2.0 marks
Consider the code segment (for xv6) given below.
[[IMAGE:946f4ac2b1bc2635_13_11]]
Based on the above data, answer the given subquestions.
[[IMAGE:946f4ac2b1bc2635_13_12]]


The base address is 0x00000000, and content is 0x0000.
The base address is 0x00000000, and content is 0x7D.
The base address is 0xA0004000, and content is 0x0000.
The base address is 0xA0004000, and content is 0x007D.
A published solution is not available for this question yet.
Question 155 MCQ · 3.0 marks
Consider the code segment (for xv6) given below.
[[IMAGE:946f4ac2b1bc2635_13_11]]
Based on the above data, answer the given subquestions.
[[IMAGE:946f4ac2b1bc2635_14_13]]


[[IMAGE:946f4ac2b1bc2635_14_14]]

[[IMAGE:946f4ac2b1bc2635_14_15]]

[[IMAGE:946f4ac2b1bc2635_14_16]]

[[IMAGE:946f4ac2b1bc2635_14_17]]

A published solution is not available for this question yet.
Question 156 NAT · 3.0 marks
Consider the following code for **kvminit** function in **vm. c.**
[[IMAGE:946f4ac2b1bc2635_15_18]]
Based on the above data, answer the given subquestions.
[[IMAGE:946f4ac2b1bc2635_16_19]]


A published solution is not available for this question yet.
Question 157 MCQ · 3.0 marks
Consider the following code for **kvminit** function in **vm. c.**
[[IMAGE:946f4ac2b1bc2635_15_18]]
Based on the above data, answer the given subquestions.
[[IMAGE:946f4ac2b1bc2635_16_20]]
What will be the values of the first 5 bits (from the right) of the page table entry after the execution
of **kvmmap(KERNBASE, KERNBASE, (uint64)etext-KERNBASE, PTE_R |PTE_X); .**


01110
10111
01011
10110
**DL(CV)**
**Section Id :** 64065351460
**Section Number :** 11
**Section type :** Online
**Mandatory or Optional :** Mandatory
**Number of Questions :** 19
**Number of Questions to be attempted :** 19
**Section Marks :** 36
**Display Number Panel :** Yes
**Section Negative Marks :** 0
**Group All Questions :** No
**Enable Mark as Answered Mark for Review and**
Yes
**Clear Response :**
**Maximum Instruction Time :** 0
A published solution is not available for this question yet.