wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MockTestOperatingSystem

Total questions: 81

Worksheet time: 27mins

Name
Class
Date
1.

Which layer of a computer system directly interacts with the hardware components?

a)

Application Programs

b)

System Programs

c)

Hardware

d)

Operating System

2.

Which of the following is considered the primary purpose of an Operating System?

a)

To increase hardware cost

b)

To act as an intermediary between a computer user and the computer hardware

c)

To serve as a Control Program

d)

To generate data visualization graphics

3.


A Batch Operating System is characterized by processing jobs in:

a)

A prioritized, first-come-first-served manner

b)

Real-time, instantaneous order

c)

Groups, without direct interaction between the user and the jobs

d)

Time slices, allowing multiple users to share resources simultaneously

4.

Which feature of an Operating System is responsible for continually ensuring that the system is operating correctly by monitoring hardware and software for possible errors?

a)

Resource Allocation

b)

I/O Operations

c)

Memory Management

d)

Error Detection and Handling

5.

The operating system's ability to run multiple processes seemingly simultaneously, managed by rapid context switching, is the primary characteristic of which classification of OS?

a)

Concurrent Operating Systems

b)

Real-time Operating Systems

c)

Distributed Operating Systems

d)

Single-tasking Operating Systems

6.

Which type of User Interface is characterized by commands or codes being entered at a command prompt to perform operations?

a)

Graphical User Interface (GUI)

b)

Command Line Interface (CLI)

c)

Batch Interface

d)

Voice User Interface (VUI)

7.

A primary advantage of implementing OS Virtualization is:

a)

Direct access to the host's physical hardware for guest operating systems

b)

Isolation, allowing separate environments to run on a single physical machine

c)

Elimination of all operating system-level overhead

d)

Increased hardware cost and reduced resource utilization

8.

The term for the time it takes to stop one process and start running another, saving the state of the old process and loading the saved state for the new process, is known as:

a)

Trap

b)

Context Switch

c)

Mode Switch

d)

System Call

9.

In the Deadlock model, what type of resource is shareable and typically does not require mutual exclusion?

a)

Non-preemptable resource

b)

Read-only file

c)

Serially reusable resource

d)


Preemptable resource

10.

Which of the four conditions necessary for a Deadlock to occur is violated when all resources are either shareable or, if exclusive, a process can be forced to temporarily relinquish a resource it holds?

a)

Circular Wait

b)

No Preemption

c)

Hold and Wait

d)

Mutual Exclusion

11.

The process of swapping pages between main memory and secondary storage on demand, where a page is only moved to main memory when it is actually referenced, is called:

a)

Internal Fragmentation

b)

Demand Paging

c)

Thrashing

d)

Virtual Segmentation

12.

Which memory management technique is defined by fixed-size divisions of memory that may result in internal fragmentation?

a)

Variable-Partitioning Scheme

b)

Fixed-Partitioning Scheme

c)

Segmentation

d)

Paging

13.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively. What is the Completion Time (CT) for process P3 using the First-Come, First-Served (FCFS) scheduling algorithm?

a)

15ms

b)

10ms

c)

21ms

d)

17ms

14.

Using the same processes from Q13 (P1 (10, 0), P2 (5, 1), P3 (2, 2), P4 (4, 3) ), what is the Waiting Time (WT) for process P4 using FCFS?

a)

17ms

b)

10ms

c)

14ms

d)

13ms

15.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from the above, what is the Average Waiting Time (Avg WT) using the FCFS algorithm?

a)

11.25ms

b)

9ms

c)

10.5ms

d)

13.25ms

16.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.


Using the processes from the above, what is the Completion Time (CT) for process P2 using the Non-Preemptive Shortest Job First (SJF) scheduling algorithm?

a)

10ms

b)

21ms

c)

16ms

d)

12ms

17.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from the above, and the Non-Preemptive SJF algorithm, what is the Waiting Time (WT) for process P3?

a)

15ms

b)

10ms

c)

21ms

d)

17ms

18.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from the above and the Non-Preemptive SJF algorithm, what is the Waiting Time (WT) for process P3?

a)

0ms

b)

10ms

c)

13ms

d)

8ms

19.


Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from Q13 and the Non-Preemptive SJF algorithm, what is the Average Turnaround Time (Avg TAT)?

a)

9ms

b)

13.25ms

c)

10ms

d)

14.5ms

20.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from Q13 and the Round Robin (RR) algorithm with a time slice q = 2ms, what is the Completion Time (CT) for process P4?

a)

12ms

b)

16ms

c)

14ms

d)

21ms

21.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 10, 5, 2, 4 ms, respectively.

Using the processes from Q13 and the Round Robin (RR) algorithm with a time slice q = 2ms, what is the Waiting Time (WT) for process P2?

a)

15ms

b)

11ms

c)

9ms

d)

16ms

22.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 8, 4, 9, 5 ms, respectively. What is the Completion Time (CT) for process P1 using the Shortest Remaining Time First (SRTF) scheduling algorithm (preemptive)?

a)

10ms

b)

17ms

c)

5ms

d)

20ms

23.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 8, 4, 9, 5 ms, respectively.

Using the SRTF processes from Q21, what is the Waiting Time (WT) for process P3?

a)

24ms

b)

9ms

c)

15ms

d)

2ms

24.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 8, 4, 9, 5 ms, respectively.

Using the SRTF processes from Q21, what is the Average Waiting Time (Avg WT) for all processes?

a)

6.5ms

b)

9ms

c)

14ms

d)

13ms

25.

Consider four processes P1, P2, P3, and P4 with Arrival Times (AT) 0, 1, 2, 3 ms and Burst Times (BT) 8, 4, 9, 5 ms, respectively.

What is the Average Turnaround Time (Avg TAT) for all processes using the SRTF algorithm with the processes from the above information.

a)

11.25ms

b)

14ms

c)

13ms

d)

26ms

26.

Three processes P1, P2, and P3 have Arrival Times (AT) of 0, 0, 0 ms and Burst Times (BT) of 24, 3, 3 ms. Assuming FCFS scheduling order P1, P2, P3, what is the Average Waiting Time (Avg WT)?

a)

9ms

b)

10ms

c)

17ms

d)

30ms

27.

Three processes P1, P2, and P3 have Arrival Times (AT) of 0, 0, 0 ms and Burst Times (BT) of 24, 3, 3 ms.

Using the processes from the above, what is the Average Waiting Time (Avg WT) if the Non-Preemptive Shortest Job First (SJF) algorithm is used (assuming order P2, P3, P1 for tie-breaking)?

a)

9ms

b)

17ms

c)

6ms

d)

3ms

28.

The Non-Preemptive SJF scheduling algorithm is provably optimal in terms of minimizing which performance metric?

a)

Maximum Waiting Time

b)

Average Waiting Time (Avg WT)

c)

CPU Utilization

d)

Context Switch Overhead

29.

A scheduling algorithm where a high-priority process can interrupt and halt a currently running low-priority process is an example of:

a)

Non-preemptive scheduling

b)

Preemptive scheduling

c)

Multi-level Feedback Queue scheduling

d)

Starvation

30.

Which of the following is a key advantage of the Round Robin (RR) scheduling algorithm?

a)

Freedom from starvation for all processes

b)

Guaranteed shortest turnaround time for all processes

c)

Simple implementation using priority queues

d)

Minimal Context Switch Overhead

31.


In the process lifecycle, a Context Switch primarily occurs when a process transitions from the running state to which other state?

a)

Terminated

b)

Ready (due to preemption)

c)

Waiting (due to I/O completion)

d)

New

32.

Which of the following is NOT one of the four necessary conditions for a Deadlock to exist in a system?

a)

Resource Preemption

b)

Mutual Exclusion

c)

Hold and Wait

d)

Circular Wait

33.

In the Deadlock Avoidance strategy using the Banker's Algorithm, a process Pi can be safely granted a requested resource Rj if and only if:

a)

The Max required resources are greater than the currently Available resources

b)

The system remains in an Unsafe state after the request is granted.

c)

The new state that results after granting the request is determined to be a Safe state.

d)

The Allocation matrix is entirely composed of zero values for all resources.

34.

In the Banker's Algorithm, the Need matrix for a process Pi is calculated by subtracting the Allocation from the Max matrix. Given Max P1 =(3, 2, 2) and Allocation P1 = (2, 0, 0), what is Need P1 ?

a)

(1, 2, 0)

b)

(5, 2, 2)

c)

(3, 2, 2)

d)

(1, 2, 2)

35.

Consider a system with Total Resources = (10, 5, 7) of types A, B, and C, and a set of processes P0, P1, P2. The total current Allocation is (5, 1, 2). What is the Available resource vector?

a)

(7, 5, 3)

b)

(10, 5, 7)

c)

(5, 1, 2)

d)

(5, 4, 5)

36.

The Resource Allocation Graph (RAG) is a visual model used primarily to detect deadlock conditions. Which statement correctly describes the nature of cycles in the RAG?

a)

A cycle always indicates that the system is in a deadlock state.

b)

A cycle is only relevant if it involves two or more processes of the same resource type.

c)

A system is deadlocked if and only if the RAG contains no cycles.

d)

A cycle only indicates potential deadlock if all resource types have a single instance.

37.

A system state is considered Safe if and only if:

a)

No process currently holds any resources.

b)

The Available resources vector is equal to the Max needs vector.

c)

Every process can complete its execution without requiring any additional resources.

d)

A Safe Sequence of processes exists, where each process can acquire its maximum resources and eventually finish.

38.

Deadlock prevention often requires violating one of the four necessary conditions. Which prevention method leads to low resource utilization due to resources being allocated unnecessarily long?

a)

Violating Circular Wait

b)

Violating No Preemption

c)

Violating Hold and Wait

d)

Violating Mutual Exclusion

39.

In Memory Management, the wasted space left within an allocated memory partition or page when the process size is smaller than the allocated size is called:

a)

Internal Fragmentation

b)

Compaction

c)

Swapping

d)

External Fragmentation

40.

A memory partitioning scheme uses fixed partitions of size 100KB, 200KB, 300KB, and 400KB. If a process P4 requiring 100KB is placed in the 300KB partition, what is the resulting Internal Fragmentation?

a)

0KB

b)

400KB

c)

200KB

d)

100KB

41.

Consider a system where four processes P1 (90KB), P2 (150KB), P3 (350KB), and P4 (100KB) are allocated to fixed partitions of 100KB, 200KB, 400KB, and 300KB respectively. What is the total Internal Fragmentation for all allocated partitions?

a)

400KB

b)

310KB

c)

210KB

d)

250KB

42.


If a memory system uses a 32-bit logical address space and a Page Size of 4 KB, how many bits are required for the Page Offset?

a)

20 bits

b)

12 bits

c)

16 bits

d)

32 bits

43.

Using the same logical address space and page size from Q41 (32bit address, 4KB page size), how many bits are required for the Page Number?

a)

12 bits

b)

40 bits

c)

32 bits

d)

20 bits

44.

Which dynamic memory allocation strategy searches for the smallest hole that is large enough to satisfy the process request?

a)

Worst-Fit

b)

Compaction

c)

Best-Fit

d)

First-Fit

45.

The primary goal of Virtual Memory is to:

a)

Allow a process's logical address space to be larger than physical memory.

b)

Force all programs to be stored in contiguous memory blocks.

c)

Increase the time required for a context switch between processes.

d)

Completely eliminate both internal and external fragmentation.

46.

Which of the following is a key advantage of Demand Segmentation over simple Paging?

a)

It allows the user to view memory in logical units that relate to the program's structure

b)

It simplifies memory allocation to a fixed-size problem.

c)

It eliminates the need for an Address Translation Mechanism (ATM).

d)

It completely eliminates external fragmentation.

47.

A key disadvantage of Command Line Interfaces (CLI) compared to Graphical User Interfaces (GUI) is the requirement for the user to:

a)

Have administrative privileges to execute commands.

b)

Utilize a mouse and pointer for navigation.

c)

Memorize and accurately type in command names and syntax.

d)

Perform only simple batch processing operations.

48.

The operating system in an embedded system that must guarantee a response within a fixed, very tight time constraint, such as in industrial control or medical devices, is an example of a:

a)

Timesharing OS

b)

Hard Real-Time OS

c)

Distributed OS

d)

Soft Real-Time OS

49.

Which software component in a Demand Paging system decides which page should be swapped out of physical memory when a new page fault occurs?

a)

Swapper

b)

Process Control Block (PCB)

c)

Page Fault Handler

d)

Paging Daemon

50.

A system implements a 1-level paging structure. The Page Table Entry (PTE) size is 4 Bytes. If a process has a 256MB logical address space and the page size is 4KB, what is the total memory space required for the Page Table itself?

a)

1 MB

b)

256 KB

c)

1024 KB

d)

4 KB

51.

Which memory allocation scheme is most vulnerable to External Fragmentation ?

a)

Variable-Partitioning Scheme

b)

Virtual Memory

c)

Fixed-Partitioning Scheme

d)

Paging

52.

In a demand paging system, what is the term for the event that occurs when a process attempts to access a page that is not currently in main memory?

a)

Thrashing

b)

Page Fault

c)

Page Hit

d)

Segmentation Fault

53.

Which field in the Page Table Entry (PTE) is used by the operating system to indicate whether a page is currently located in physical memory or on secondary storage?

a)

Valid/Invalid Bit (Presence Bit)

b)

Reference Bit

c)

Dirty Bit

d)

Frame Number

54.

If the Memory Access Time is 200 ns and the Page Fault Service Time is 8 ms (including swapping), what is the Effective Access Time for a Page Fault Rate of p = 0.001 ?

a)

8200 ns

b)

8.2 ms

c)

8200 ns

d)

200 ns

55.

What is the primary consequence of a Page Fault Rate being too high in a demand paging system?

a)

Optimal Performance

b)

Thrashing

c)

Reduced I/O Activity

d)

Increased CPU Utilization

56.

Which strategy for handling a page fault requires the system to check the 'Dirty Bit' of the victim page before writing it back to the disk?

a)

Page Replacement

b)

Page Allocation

c)

Page Segmentation

d)

Address Translation

57.

Consider the page reference string: 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1. If the system has 3 free frames, how many Page Faults occur using the First-In, First-Out (FIFO) page replacement algorithm?

a)

11

b)

9

c)

14

d)

16

58.


Using the same reference string and 3 frames, what is the number of Page Faults using the Least Recently Used (LRU) page replacement algorithm?

a)

17

b)

11

c)

9

d)

14

59.

Using the same reference string and 3 frames, what is the number of Page Faults using the Optimal (OPT) / MIN page replacement algorithm?

a)

15

b)

11

c)

14

d)

9

60.

The Least Frequently Used (LFU) page replacement algorithm suffers from the potential problem of:

a)

The inability to be implemented in a practical system.

b)

Poor performance when page usage frequency changes rapidly over time.

c)

Belady's Anomaly (Page faults increase with more frames)

d)

Excessive hardware overhead due to the use of a stack for page access times.

61.

Excessive hardware overhead due to the use of a stack for page access times.

a)

Optimal (OPT) / MIN

b)

Second Chance (Clock)

c)

FIFO

d)

LRU

62.

A key characteristic of all Disk Scheduling Algorithms is that they aim to minimize the total amount of:

a)

Request Queue Length

b)

Seek Time

c)

Transfer Time

d)

Rotational Latency

63.

Which disk scheduling algorithm is most likely to cause starvation for requests near the inner or outer edge of the disk, if a steady stream of new requests continually arrives near the current head position?

a)

C-LOOK

b)

SCAN

c)

FCFS

d)

SSTF

64.

Consider the request queue 98, 183, 37, 122, 14, 124, 65, 67. If the current head position is 53, and cylinders range from 0 to 199, what is the total $\text{Head Movement}$ (in cylinders) using the First-Come, First-Served (FCFS) algorithm?

a)

236 cylinders

b)

640 cylinders

c)

331 cylinders

d)

130 cylinders

65.

Consider the request queue 98, 183, 37, 122, 14, 124, 65, 67. If the current head position is 53.

Using the same request queue and current head position from the above, what is the total Head Movement (in cylinders) using the Shortest Seek Time First (SSTF) algorithm?

a)

146 cylinders

b)

382 cylinders

c)

236 cylinders

d)

640 cylinders

66.

Which disk scheduling algorithm ensures fairness and prevents starvation by sweeping the disk head in one direction, serving all requests encountered, and then reversing direction?

a)

FCFS

b)

SCAN

c)

SSTF

d)

C-SCAN

67.

Using the request queue 98, 183, 37, 122, 14, 124, 65, 67, a current head position of 53, and cylinders 0 to 199. What is the total Head Movement (in cylinders) using the SCAN algorithm, assuming the head is initially moving towards 199 (the largest cylinder)?

a)

248 cylinders

b)

382 cylinders

c)

331 cylinders

d)

236 cylinders

68.

The C-SCAN (Circular SCAN) algorithm improves upon SCAN primarily by:

a)

Only servicing requests while sweeping in one direction (e.g., from 0 to 199).

b)

Allowing the head to stop and reverse immediately at the request closest to the current position.

c)

Prioritizing the shortest seek time regardless of direction.

d)

Service requests strictly in the order of arrival.

69.

Consider the request queue 98, 183, 37, 122, 14, 124, 65, 67. If the current head position is 53.

Using the same request queue and current head position from the above, what is the total Head Movement (in cylinders) using the C-SCAN algorithm, assuming the head is initially moving towards 199 and cylinders 0 to 199?

a)

248 cylinders

b)

255 cylinders

c)

331 cylinders

d)

382 cylinders

70.

What is the primary difference between the LOOK and SCAN disk scheduling algorithms?

a)

LOOK only services requests in the direction of the largest request, while SCAN alternates.

b)

SCAN prioritizes the closest request, while LOOK uses the FIFO queue.

c)

SCAN can cause starvation, whereas LOOK is starvation-free.

d)

LOOK only sweeps as far as the furthest request in the current direction, while SCAN always sweeps to the absolute end of the disk

71.

Consider the request queue 98, 183, 37, 122, 14, 124, 65, 67. If the current head position is 53.

Using the request queue and current head position from the above, what is the total Head Movement (in cylinders) using the LOOK algorithm, assuming the head is initially moving towards 199 (the largest cylinder)?

a)

331 cylinders

b)

299 cylinders

c)

382 cylinders

d)

248 cylinders

72.

What is the primary difference between the C-LOOK and C-SCAN disk scheduling algorithms?

a)

C-LOOK stops at the furthest request before jumping back, while C-SCAN always goes to the absolute end (199) before jumping to the beginning (0).

b)

C-LOOK uses the concept of an 'Aging' scheme, while C-SCAN does not.

c)

C-LOOK services requests in both directions, C-SCAN only one.

d)

C-SCAN is prone to starvation, while C-LOOK is not.

73.

Consider the request queue 98, 183, 37, 122, 14, 124, 65, 67. If the current head position is 53.

Using the request queue and current head position from Q13, what is the total Head Movement (in cylinders) using the C-LOOK algorithm, assuming the head is initially moving towards 199 (the largest cylinder)?

a)

273 cylinders

b)

299 cylinders

c)

382 cylinders

d)

322 cylinders

74.


In a demand paging system, what is the role of the Paging Daemon process?

a)

To periodically inspect pages and write 'dirty' pages back to disk to maintain a pool of clean, free frames.

b)

To manage the scheduling of processes in the Ready queue.

c)

To handle the actual I/O operation of swapping pages to and from the disk after a page fault.

d)

To perform address translation from logical to physical addresses

75.

Which page replacement algorithm is impractical to implement because it requires foreknowledge of future page references?

a)

Second Chance

b)

LRU

c)

FIFO

d)

Optimal (OPT)

76.

What is the primary function of the Dirty Bit (or Modified Bit) in a Page Table Entry?

a)

To indicate if the page is currently in physical memory.

b)

To identify the physical memory frame number.

c)

To indicate if the page has been referenced recently.

d)

To signal the Page Replacement Algorithm that the page must be written back to disk before replacement.

77.

Which of the following is considered a major drawback of the FIFO page replacement algorithm?

a)

High implementation complexity and overhead.

b)

It can remove a frequently used page simply because it was loaded a long time ago.

c)

It is susceptible to external fragmentation.

d)

It requires special hardware support to track page usage time.

78.

In the LOOK disk scheduling algorithm, the worst-case seek time for a request occurs for a request that is:

a)

Already being served by another disk controller.

b)

At the cylinder immediately next to the current head position.

c)

Just behind the current head position, at the very beginning of the disk, when the head is already sweeping towards the end.

d)

At the furthest cylinder (199) from the current head position.

79.

If a memory system uses 1 - level paging, a 64-bit logical address, and a Page Size of 16 KB, how many bits are used for the Page Offset?

a)

14 bits

b)

12 bits

c)

50 bits

d)

64 bits

80.

In the Second Chance (Clock) page replacement algorithm, what is the action taken when a victim page is found to have its Reference Bit set to '1'?

a)

The page is written to disk because it is a 'dirty' page.

b)

The entire process is swapped out of main memory.

c)

The Reference Bit is reset to '0', and the page is given a second chance (the pointer advances to the next page).

d)

The page is immediately replaced with the new incoming page.

81.

Which of the following disk scheduling algorithms typically results in the highest average response time and highest total head movement?

a)

SSTF (Shortest Seek Time First)

b)

FCFS (First-Come, First-Served)

c)

C-LOOK (Circular LOOK)

d)

SCAN (Elevator Algorithm)