MauryaHub PYQ Practice

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.
  1. TRUE
  2. 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.
  1. TRUE
  2. 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.”
  1. TRUE
  2. 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?
  1. 0x200000FF
  2. 0x20000100
  3. 0x200001FF
  4. 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?
  1. jmp
  2. syscall
  3. ecall
  4. None of these

A published solution is not available for this question yet.

Question 141 MCQ · 2.0 marks

[[IMAGE:946f4ac2b1bc2635_4_0]]
Source diagram or notation
  1. It is the memory address where the proc array begins.
  2. It is the total number of processes launched since the system boot.
  3. It is the number of CPU cores available to xv6.
  4. 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]]
Source diagram or notation
  1. Managing process states
  2. Handling timer interrupts
  3. Managing system resources
  4. 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
  1. (i) → (ii) → (iii) → (iv)
  2. (i) → (iii) → (ii) → (iv)
  3. (ii) → (i) → (iii) → (iv)
  4. (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.
  1. The **exit** function sets the state of the current process to **ZOMBIE**.
  2. The **exit** function reparents the child processes to the init process using the **reparent** function.
  3. 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.
  4. 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.
  1. **wait** function runs an infinite loop until all the child processes of the parent are terminated.
  2. **wait** function returns when it finds a terminated child process.
  3. **wait** function returns the exit status of the child to the parent.
  4. **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]]
Source diagram or notation
  1. stack0 + 3 + 4 * 1024
  2. stack0 + 3 * 4* 1024
  3. stack0 + 2 * 4 * 1024
  4. 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?
  1. 3MB
  2. 3KB
  3. 6KB
  4. 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
Source diagram or notation
  1. (i), (ii), and (iii)
  2. (i), (iii), and (iv)
  3. [[IMAGE:946f4ac2b1bc2635_9_4]] (i), (ii), and (iv)
    Source diagram or notation
  4. (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]]
Source diagram or notation
  1. [[IMAGE:946f4ac2b1bc2635_9_6]]
    Source diagram or notation
  2. [[IMAGE:946f4ac2b1bc2635_9_7]]
    Source diagram or notation
  3. [[IMAGE:946f4ac2b1bc2635_9_8]]
    Source diagram or notation
  4. [[IMAGE:946f4ac2b1bc2635_9_9]]
    Source diagram or notation

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?
  1. 2\(^{32}\) frames
  2. 2\(^{14}\) frames
  3. 2\(^{20}\) frames
  4. 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.
  1. A is in RUNNABLE state
  2. A is in SLEEPING state
  3. C is in RUNNABLE state
  4. 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).**
  1. **init** process uses **fork** system call to create child processes and loads the other programs using **exec** system call in the child processes.
  2. The **init** process uses the **exec** system call to create child processes.
  3. **init** process is created by a **fork** system call using **ecall** instruction.
  4. **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]]
Source diagram or notation
  1. Child 30 Child 25 Parent 30
  2. Child 30 Child 25 Parent 25
  3. Parent 30 Child 30 Child 25
  4. 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]]
Source diagram or notationSource diagram or notation
  1. The base address is 0x00000000, and content is 0x0000.
  2. The base address is 0x00000000, and content is 0x7D.
  3. The base address is 0xA0004000, and content is 0x0000.
  4. 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]]
Source diagram or notationSource diagram or notation
  1. [[IMAGE:946f4ac2b1bc2635_14_14]]
    Source diagram or notation
  2. [[IMAGE:946f4ac2b1bc2635_14_15]]
    Source diagram or notation
  3. [[IMAGE:946f4ac2b1bc2635_14_16]]
    Source diagram or notation
  4. [[IMAGE:946f4ac2b1bc2635_14_17]]
    Source diagram or notation

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]]
Source diagram or notationSource diagram or notation

    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); .**
    Source diagram or notationSource diagram or notation
    1. 01110
    2. 10111
    3. 01011
    4. 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.