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.
TRUE
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.
TRUE
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?
Processes racing for CPU resources.
Concurrent access leading to unpredictable results
Incompatible hardware configurations.
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?
Initializing the kernel’s virtual memory
Initializing user-level page tables
Configuring the interrupt vector table
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.
TRUE
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?
A process that has terminated, but whose resources have not yet been
deallocated by the operating system.
A process that is suspended and waiting for user input.
A process that is ready to run but is waiting for CPU time.
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?
Running → Sleeping
Running → Unused
Running → Runnable
State remains unchanged
A published solution is not available for this question yet.
Question 9 MCQ · 2.0 marks
[[IMAGE:e77da45d249bd7de_3_0]]

The number of CPUs supported by xv6 is 64.
The size of each **struct proc** is 64 bytes.
The array **proc** can dynamically resize to handle more than 64 processes.
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?
0x30004100
0x300041FF
0x30004200
0x30003FFF
A published solution is not available for this question yet.
Question 11 MCQ · 3.0 marks
[[IMAGE:e77da45d249bd7de_4_1]]

Sizes of all the registers are 4-byte.
Sizes of control register, data register, and status register are 2-byte, 4-byte,
and 1-byte respectively.
Sizes of control register, data register, and status register are 2-byte, 4-byte,
and 2-byte respectively.
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]]

Both the parent and child processes execute the **pwd** command concurrently.
The parent process waits for the child process to finish executing the **pwd**
command.
The parent process executes the **pwd** command and then waits for the child
process to finish.
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.
(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 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?
Process P1
Process P2
Process init
None of these
A published solution is not available for this question yet.
Question 15 MCQ · 3.0 marks
[[IMAGE:e77da45d249bd7de_6_3]]

The return address of the user space
The number that is returned to the user space.
The number that identifies the system call.
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**?
It creates a page directory.
It invokes **procinit**.
It sets the process to a sleeping state.
It allocates a **process id** and **trapframe**.
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.
Process P2 is in the RUNNABLE state
Process P4 is in the SLEEPING state.
Process P1 is in the RUNNING state.
Process P3 is in the SLEEPING state.
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?
32 MB
64 KB
16 KB
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?
2\(^{16}\) frames
2\(^{14}\) frames
2\(^{12}\) frames
2\(^{18}\) frames
A published solution is not available for this question yet.
Question 20 MSQ · 4.0 marks
[[IMAGE:e77da45d249bd7de_8_4]]

Child 20
Child 15
Parent 15
Child 20
Child 15
Parent 20
Parent 20
Child 20
Child 15
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.