0% found this document useful (0 votes)
18 views6 pages

OS Quiz - Quizizz

Uploaded by

suhaibkhan0828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views6 pages

OS Quiz - Quizizz

Uploaded by

suhaibkhan0828
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Worksheets Name

OS Quiz Class
Total questions: 20
Worksheet time: 6mins Date

1. In process creation, which of the following is responsible for copying the address space and process
environment of the parent to the child?

a) fork b) exec

c) clone d) spawn

2. Which of the following is a major problem with Race Conditions?

a) Consistent results from simultaneous operations. b) The execution outcome depends on the order of
thread/process execution.

c) Increased performance due to parallel processing. d) Simplified debugging of concurrent systems.

3. In a multithreaded process, which of the following resources is NOT shared among threads?

a) Heap b) Global variables

c) File descriptors d) Stack

4. Which of the following is TRUE for Paging?

a) Paging eliminates the problem of external b) Paging eliminates the need for virtual memory.
fragmentation.

c) Paging requires contiguous memory allocation. d) Paging can only be used in preemptive scheduling
systems.

5. Which of the following is an advantage of Segmentation over paging?

a) It simplifies page table management. b) It allows processes to be broken down into logical
units.

c) Segmentation requires more memory than paging. d) Segmentation is less efficient in managing memory
than paging.
6. Thrashing occurs when:

a) Thrashing occurs when the CPU is idle and not b) Thrashing occurs when there is insufficient disk
processing tasks. space for data storage.

c) Thrashing occurs when the network connection is d) Thrashing occurs when the system is overloaded
slow and data transfer is delayed. with processes and cannot keep the necessary data
in memory.

7. The concept of Monitors in concurrency control:

a) Monitors provide a mechanism for mutual exclusion b) Monitors are used exclusively for memory
and condition synchronization in concurrent management in programming.
programming.

c) Monitors allow multiple threads to execute d) Monitors are a type of hardware used to display
simultaneously without restrictions. program outputs.

8. Which of the following is TRUE for Mutexes?

a) Mutexes allow only one thread to access a resource b) Mutexes can be accessed by any number of
at a time. threads at the same time.

c) Mutexes allow multiple threads to access a resource d) Mutexes are used to increase the speed of thread
simultaneously. execution.

9. In a system with priority scheduling, which of the following is a common problem, and how is it resolved?

a) Overhead; resolved by increasing CPU time. b) Deadlock; resolved by resource allocation.

c) Inefficiency; resolved by reducing process priority. d) Starvation; resolved by aging.

10. In demand paging, the page fault rate is influenced by:

a) Locality of reference, page size, number of frames, b) Operating system type


and replacement algorithm.

c) CPU speed d) Disk space availability

11. Which of the following page replacement algorithms is theoretically optimal but impractical to implement, and
why?

a) Least Recently Used (LRU) Algorithm b) Optimal Page Replacement Algorithm

c) First-In-First-Out (FIFO) Algorithm d) Random Page Replacement Algorithm


12. In the context of deadlock recovery, why is process termination typically avoided as a first option?

a) It may cause cascading failures in other processes b) It does not guarantee that resources will be freed
due to dependency chains. for other processes.

c) Process termination guarantees no resource loss. d) Process termination is the only way to resolve a
deadlock.

13. Which of the following is TRUE regarding Belady’s anomaly in page replacement algorithms?

a) It is observed in the Least Recently Used (LRU) b) It describes the situation where more frames result
algorithm. in fewer page faults.

c) It occurs when adding more frames increases the d) Belady's anomaly guarantees better performance
number of page faults with more frames.

14. Given a system using segmented paging with a segment size of 64KB and a page size of 4KB, how many bits
are needed for the page offset, and

a) 12 bits for page offset, implying that each segment b) 4 bits for page offset, implying each page table
can contain up to 16 pages. entry points to a segment.

c) 12 bits for page offset, implying the system d) 10 bits for page offset, implying that the page tables
supports large page sizes. themselves are segmented.

15. Which of the following is true about a CPU-bound process?

a) Spends more time on computation b) Utilizes the CPU and I/O equally

c) A CPU-bound process can run faster with more d) A CPU-bound process is limited by the amount of
network bandwidth. RAM available.

16. Which of the following page replacement algorithms suffers from Belady's anomaly?

a) Second Chance b) LRU (Least Recently Used)

c) Optimal Page Replacement d) FIFO (First-In-First-Out)

17. In virtual memory, when the system spends most of its time swapping pages rather than executing
processes, this condition is known as:

a) Paging b) Fragmentation

c) Thrashing d) Overcommitment
18. What is a zombie process in Unix-like systems?

a) A zombie process is a process that has been b) A zombie process is a process that is currently
terminated and removed from the process table. running and consuming resources.

c) A zombie process is a process that is waiting for d) A zombie process is a process that has completed
user input before it can continue execution. execution but still has an entry in the process table,
waiting for its parent to read its exit status.

19. In UNIX, the file descriptor for standard input (stdin) is:

a) 3 b) 2

c) 0 d) 1

20. In a paged memory system, each page has a size of 4KB, and the address size is 32 bits. What is the
maximum number of pages?

a) 2^10 b) 2^20

c) 2^22 d) 2^12
Answer Keys

1. a) fork 2. b) The execution outcome 3. d) Stack


depends on the order of
thread/process execution.

4. a) Paging eliminates the 5. b) It allows processes to be 6. d) Thrashing occurs when the


problem of external broken down into logical system is overloaded with
fragmentation. units. processes and cannot keep the
necessary data in memory.

7. a) Monitors provide a 8. a) Mutexes allow only one 9. d) Starvation; resolved by


mechanism for mutual thread to access a resource at a aging.
exclusion and condition time.
synchronization in concurrent
programming.

10. a) Locality of reference, page 11. b) Optimal Page Replacement 12. a) It may cause cascading
size, number of frames, and Algorithm failures in other processes
replacement algorithm. due to dependency chains.

13. c) It occurs when adding more 14. d) 10 bits for page offset, 15. a) Spends more time on
frames increases the implying that the page computation
number of page faults tables themselves are
segmented.

16. d) FIFO (First-In-First-Out) 17. c) Thrashing 18. d) A zombie process is a


process that has completed
execution but still has an entry
in the process table, waiting
for its parent to read its exit
status.

19. c) 0 20. b) 2^20

You might also like