MauryaHub PYQ Practice

cs4022_2024T2_Q1_NA.pdf

Operating System · Quiz 1 · May 2024

← 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.

Question 2 MCQ · 1.0 marks

State True or False In RISC-V, during system calls, the **mstatus** register stores the current mode of operation of the processor.
  1. TRUE
  2. FALSE

A published solution is not available for this question yet.

Question 3 MCQ · 1.0 marks

The **ecall** instruction in the xv6 operating system facilitates the transition of the CPU from user mode to supervisor mode.
  1. TRUE
  2. FALSE

A published solution is not available for this question yet.

Question 4 MCQ · 2.0 marks

What is a race condition in an operating system?
  1. Processes racing for CPU resources.
  2. Concurrent access leading to unpredictable results
  3. Incompatible hardware configurations.
  4. System instability due to competing tasks.

A published solution is not available for this question yet.

Question 5 MCQ · 2.0 marks

What is the primary purpose of the kvminit function in the xv6 operating system?
  1. Initializing the kernel’s virtual memory
  2. Initializing user-level page tables
  3. Configuring the interrupt vector table
  4. Managing process scheduling

A published solution is not available for this question yet.

Question 6 MCQ · 2.0 marks

State True or False. The **init** process, being the first process created by the system, can exit using the **exit** system call.
  1. TRUE
  2. FALSE

A published solution is not available for this question yet.

Question 7 MCQ · 2.0 marks

In the context of xv6 operating systems, what does the **zombie** state of a process refer to?
  1. A process that has terminated, but whose resources have not yet been deallocated by the operating system.
  2. A process that is suspended and waiting for user input.
  3. A process that is ready to run but is waiting for CPU time.
  4. None of these

A published solution is not available for this question yet.

Question 8 MCQ · 2.0 marks

In the xv6 operating system, if a timer interrupt occurs while a process is executing, what will be the state transition of the process?
  1. Running → Sleeping
  2. Running → Unused
  3. Running → Runnable
  4. State remains unchanged

A published solution is not available for this question yet.

Question 9 MCQ · 2.0 marks

[[IMAGE:e77da45d249bd7de_3_0]]
Source diagram or notation
  1. The number of CPUs supported by xv6 is 64.
  2. The size of each **struct proc** is 64 bytes.
  3. The array **proc** can dynamically resize to handle more than 64 processes.
  4. The system can handle a maximum of 64 processes simultaneously.

A published solution is not available for this question yet.

Question 10 MCQ · 3.0 marks

If the memory map for a device starts from the offset 0x30004000 and has a size of 512 bytes in a 32-bit addressing scheme, what will be the last address in the memory map?
  1. 0x30004100
  2. 0x300041FF
  3. 0x30004200
  4. 0x30003FFF

A published solution is not available for this question yet.

Question 11 MCQ · 3.0 marks

[[IMAGE:e77da45d249bd7de_4_1]]
Source diagram or notation
  1. Sizes of all the registers are 4-byte.
  2. Sizes of control register, data register, and status register are 2-byte, 4-byte, and 1-byte respectively.
  3. Sizes of control register, data register, and status register are 2-byte, 4-byte, and 2-byte respectively.
  4. Sizes of control register, data register, and status register are 16-byte, 32-byte, and 8-byte respectively.

A published solution is not available for this question yet.

Question 12 MCQ · 3.0 marks

[[IMAGE:e77da45d249bd7de_4_2]]
Source diagram or notation
  1. Both the parent and child processes execute the **pwd** command concurrently.
  2. The parent process waits for the child process to finish executing the **pwd** command.
  3. The parent process executes the **pwd** command and then waits for the child process to finish.
  4. None of these

A published solution is not available for this question yet.

Question 13 MCQ · 3.0 marks

What is the correct sequence of setting up first user process? (i) Find an unused proc entry. (ii) Create trapframe. (iii) Create empty user process page table. (iv) Create context for process.
  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 14 MCQ · 3.0 marks

Consider a process P1 that forks P2, P2 forks P3, and P3 forks P4. P1 and P2 continue to execute while P3 terminates. Now, what is the parent process of P4?
  1. Process P1
  2. Process P2
  3. Process init
  4. None of these

A published solution is not available for this question yet.

Question 15 MCQ · 3.0 marks

[[IMAGE:e77da45d249bd7de_6_3]]
Source diagram or notation
  1. The return address of the user space
  2. The number that is returned to the user space.
  3. The number that identifies the system call.
  4. The number that identifies the process

A published solution is not available for this question yet.

Question 16 MSQ · 3.0 marks

Which of the following actions are performed by **userinit**?
  1. It creates a page directory.
  2. It invokes **procinit**.
  3. It sets the process to a sleeping state.
  4. It allocates a **process id** and **trapframe**.
  5. It creates a user stack at 0X0.

A published solution is not available for this question yet.

Question 17 MSQ · 3.0 marks

Assume Process P2 and Process P4 are waiting for an input, Process P1 is running, and Process P3 was running before Process P1 and is now waiting for its turn to run. Select all the correct statements about the states of the processes.
  1. Process P2 is in the RUNNABLE state
  2. Process P4 is in the SLEEPING state.
  3. Process P1 is in the RUNNING state.
  4. Process P3 is in the SLEEPING state.
  5. Process P3 is in the RUNNABLE state.

A published solution is not available for this question yet.

Question 18 MCQ · 4.0 marks

Consider a system with a virtual memory space size of 8 GB and a single page table with 2\(^{18}\) entries. What is the size of each page frame?
  1. 32 MB
  2. 64 KB
  3. 16 KB
  4. 32 KB

A published solution is not available for this question yet.

Question 19 MCQ · 4.0 marks

Consider a system with 64 MB of physical memory and a 32-bit virtual address space. Given a page size of 4 KB, what will be the number of frames?
  1. 2\(^{16}\) frames
  2. 2\(^{14}\) frames
  3. 2\(^{12}\) frames
  4. 2\(^{18}\) frames

A published solution is not available for this question yet.

Question 20 MSQ · 4.0 marks

[[IMAGE:e77da45d249bd7de_8_4]]
Source diagram or notation
  1. Child 20 Child 15 Parent 15
  2. Child 20 Child 15 Parent 20
  3. Parent 20 Child 20 Child 15
  4. Parent 15 Child 20 Child 15       **RL** **Section Id :** 64065359410 **Section Number :** 2 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 8 **Number of Questions to be attempted :** 8 **Section Marks :** 40 **Display Number Panel :** Yes **Section Negative Marks :** 0 **Group All Questions :** No

A published solution is not available for this question yet.