Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Unit -1Introduction of Operating System

1. What is the primary function of an operating system? A) Managing hardware


resources B) Running application software C) Providing user interfaces D) All
of the above Answer: D) All of the above
2. Which component of an operating system manages the allocation of memory
resources? A) Kernel B) Shell C) File system D) Memory manager Answer: D)
Memory manager
3. What is the role of the kernel in an operating system?
a. Providing a graphical user interface
b. Managing hardware resources
c. Running application software
d. Providing system utilities
Answer: B) Managing hardware resources
4. Which operating system provides a command-line interface? A) Windows B)
macOS C) Linux D) Android Answer: C) Linux
5. Which operating system is commonly used in smartphones and tablets? A)
Windows B) macOS C) Linux D) Android Answer: D) Android
6. What is the purpose of device drivers in an operating system? A) To provide
security features B) To manage hardware devices C) To facilitate
communication between processes D) To provide user interfaces Answer: B)
To manage hardware devices
7. Which type of operating system allows multiple users to access the system
simultaneously? A) Single-user B) Multi-user C) Batch processing D) Real-time
Answer: B) Multi-user
8. Which operating system is commonly used for server environments? A)
Windows B) macOS C) Linux D) Android Answer: C) Linux
9. Which component of an operating system manages files and directories? A)
Kernel B) Shell C) File system D) Memory manager Answer: C) File system
10. Which operating system is developed by Apple Inc.? A) Windows B) macOS C)
Linux D) Android Answer: B) macOS
11. What is the purpose of the shell in an operating system?
a. Managing hardware resources
b. Running application software
c. Providing user interfaces
d. Providing system utilities
Answer: C) Providing user interfaces
12. Which type of operating system is designed to perform real-time tasks with
strict timing requirements? A) Single-user B) Multi-user C) Batch processing D)
Real-time Answer: D) Real-time
13. What is the purpose of the graphical user interface (GUI) in an operating
system? A) To provide a text-based interface B) To improve system security C)
To enhance user experience D) To optimize system performance Answer: C)
To enhance user experience
14. Which operating system is developed by Microsoft Corporation? A) Windows
B) macOS C) Linux D) Android Answer: A) Windows
15. Which type of operating system processes tasks in batches without user
interaction? A) Single-user B) Multi-user C) Batch processing D) Real-time
Answer: C) Batch processing
16. What is the purpose of system calls in an operating system? A) To manage
hardware resources B) To provide user interfaces C) To facilitate
communication between processes D) To provide system utilities Answer: C)
To facilitate communication between processes
17. Which operating system is commonly used in personal computers and
laptops? A) Windows B) macOS C) Linux D) Android Answer: A) Windows
18. Which operating system is based on the Linux kernel and is open-source? A)
Windows B) macOS C) Ubuntu D) Android Answer: C) Ubuntu
19. What is the primary purpose of a bootloader in an operating system? A) To
load the operating system into memory B) To manage hardware devices C) To
provide user interfaces D) To manage file systems Answer: A) To load the
operating system into memory
20. What is the purpose of the interrupt handler in an operating system? A) To
provide security features B) To manage hardware devices C) To facilitate
communication between processes D) To provide system utilities Answer: B)
To manage hardware devices
21. What is the primary function of the scheduler in an operating system? A) To
manage hardware resources B) To manage memory resources C) To manage
file systems D) To manage CPU resources Answer: D) To manage CPU
resources
22. Which operating system is commonly used in gaming consoles such as
PlayStation and Xbox? A) Windows B) macOS C) Linux D) Android Answer: C)
Linux
23. What is the purpose of the process manager in an operating system? A) To
manage hardware resources B) To manage memory resources C) To manage
file systems D) To manage processes and scheduling Answer: D) To manage
processes and scheduling

Unit -2 Process Scheduling


1. Which of the following is not a scheduling criterion? A) Response time B)
Throughput C) Priority D) Deadlock prevention Answer: D) Deadlock
prevention
2. What does CPU scheduling do in an operating system? A) Allocates memory
to processes B) Manages input/output operations C) Allocates CPU to
processes D) Manages file systems Answer: C) Allocates CPU to processes
3. Which scheduling algorithm does not involve preemptive scheduling? A)
Round Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D)
Priority Scheduling Answer: C) First Come First Serve (FCFS)
4. Which scheduling algorithm not may suffer from starvation? A) Round Robin
B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: A) Round Robin
5. What is the purpose of a context switch in process scheduling? A) To save and
restore the context of a process B) To switch the process to the waiting state
C) To switch the process to the ready state D) To allocate memory to the
process Answer: A) To save and restore the context of a process
6. Which scheduling algorithm ensures fairness? A) Round Robin B) Shortest Job
First (SJF) C) First Come First Serve (FCFS) D) Priority Scheduling Answer: A)
Round Robin
7. Which scheduling algorithm is based on the process burst time? A) Round
Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: B) Shortest Job First (SJF)
8. Which scheduling algorithm is based on the priority of processes? A) Round
Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: D) Priority Scheduling
9. Which scheduling algorithm uses time quantum? A) Shortest Job First (SJF) B)
Round Robin C) First Come First Serve (FCFS) D) Priority Scheduling Answer:
B) Round Robin
10. What does CPU-bound process mean? A) A process that waits for I/O
operations B) A process that uses CPU extensively C) A process with low
priority D) A process that is terminated Answer: B) A process that uses CPU
extensively
11. Which scheduling algorithm is not suitable for interactive systems? A) Round
Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: C) First Come First Serve (FCFS)
12. Which scheduling algorithm can result in convoy effect? A) Round Robin B)
Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority Scheduling
Answer: C) First Come First Serve (FCFS)
13. What does the term "starvation" mean in the context of scheduling? A) The
process is terminated abnormally B) The process gets stuck in a waiting state
indefinitely C) The process gets allocated more CPU time than required D) The
process is given a low priority Answer: B) The process gets stuck in a
waiting state indefinitely
14. Which scheduling algorithm aims to reduce the average waiting time? A)
Round Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D)
Priority Scheduling Answer: B) Shortest Job First (SJF)
15. In Round Robin scheduling, what happens when a time quantum expires? A)
The process is terminated B) The process is put back to the ready queue C)
The process is put to the waiting queue D) The process is put to the
suspended state Answer: B) The process is put back to the ready queue
16. Which scheduling algorithm is prone to the "convoy effect"?
a. Round Robin
b. Shortest Job First (SJF)
c. First Come First Serve (FCFS)
d. Priority Scheduling
Answer: C) First Come First Serve (FCFS)
17. Which scheduling algorithm gives priority to the waiting time of a process? A)
Round Robin B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D)
Priority Scheduling Answer: D) Priority Scheduling
18. Which scheduling algorithm has the disadvantage of being affected by
process burst time prediction? A) Round Robin B) Shortest Job First (SJF) C)
First Come First Serve (FCFS) D) Priority Scheduling Answer: B) Shortest Job
First (SJF)
19. What is the primary disadvantage of First Come First Serve (FCFS) scheduling?
A) Low throughput B) High context switch overhead C) High waiting time for
long processes D) High priority inversion Answer: C) High waiting time for
long processes
20. Which scheduling algorithm is commonly used in time-sharing systems?
a. Round Robin
b. Shortest Job First (SJF)
c. First Come First Serve (FCFS)
d. Priority Scheduling
Answer: A) Round Robin
21. Which scheduling algorithm may result in indefinite postponement of some
processes? A) Round Robin B) Shortest Job First (SJF) C) First Come First Serve
(FCFS) D) Priority Scheduling Answer: D) Priority Scheduling
22. Which scheduling algorithm provides the best response time? A) Round Robin
B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: B) Shortest Job First (SJF)
23. Which scheduling algorithm uses aging to prevent starvation? A) Round Robin
B) Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority
Scheduling Answer: D) Priority Scheduling
24. Which scheduling algorithm is considered the fairest? A) Round Robin B)
Shortest Job First (SJF) C) First Come First Serve (FCFS) D) Priority Scheduling
Answer: A) Round Robin
25. In preemptive scheduling, when does a context switch occur? A) When a
process voluntarily gives up the CPU B) When a process completes execution
C) When a higher priority process becomes ready to run D) When a process
goes into a waiting state Answer: C) When a higher priority process
becomes ready to run
26. Which scheduling algorithm is not preemptive? A) Round Robin B) Shortest
Job First (SJF) C) First Come First Serve (FCFS) D) Priority Scheduling Answer:
C) First Come First Serve (FCFS)
27. Which scheduler is responsible for selecting processes from the ready queue
and allocating the CPU to them? A) Long-term scheduler B) Short-term
scheduler C) Medium-term scheduler D) Real-time scheduler Answer: B)
Short-term scheduler
28. Which scheduler determines which processes are admitted to the system for
processing? A) Long-term scheduler B) Short-term scheduler C) Medium-term
scheduler D) Real-time scheduler Answer: A) Long-term scheduler
29. Which scheduler deals with swapping processes in and out of memory to
enhance system performance?
a. Long-term scheduler
b. Short-term scheduler
c. Medium-term scheduler
d. Real-time scheduler
Answer: C) Medium-term scheduler
30. Which scheduler ensures that real-time tasks meet their deadlines? A) Long-
term scheduler B) Short-term scheduler C) Medium-term scheduler D) Real-
time scheduler Answer: D) Real-time scheduler
31. The primary goal of the short-term scheduler is to: A) Maximize CPU
utilization B) Minimize response time C) Ensure fairness D) Maximize
throughput Answer: A) Maximize CPU utilization
32. The long-term scheduler is also known as the: A) CPU scheduler B) Process
scheduler C) Admission scheduler D) I/O scheduler Answer: C) Admission
scheduler
33. Medium-term scheduling is particularly useful in systems where: A) The ready
queue is small B) The memory is limited C) The CPU is the bottleneck D) The
system supports real-time tasks Answer: B) The memory is limited
34. Real-time scheduling is mainly concerned with: A) Maximizing CPU utilization
B) Minimizing response time C) Ensuring tasks meet deadlines D) Balancing
system resources Answer: C) Ensuring tasks meet deadlines
35. Which scheduler is swappers?
a. Long-term scheduler
b. Short-term scheduler
c. Medium-term scheduler
d. I/O scheduler
Answer: C) Medium-term scheduler
36. Which scheduler primarily focuses on improving system performance by
deciding which processes to keep in memory and which to swap out? A)
Long-term scheduler B) Short-term scheduler C) Medium-term scheduler D)
Real-time scheduler Answer: C) Medium-term scheduler
Unit -3 Process Scynchronization
1. What is the purpose of synchronization mechanisms in operating systems? A)
To ensure efficient memory allocation B) To prevent resource starvation C) To
coordinate access to shared resources D) To optimize CPU scheduling
Answer: C) To coordinate access to shared resources
2. Which synchronization primitive can have a count greater than one and is
often used for counting resources? A) Mutex B) Semaphore C) Barrier D)
Monitor Answer: B) Semaphore
3. The critical section problem involves: A) Ensuring mutual exclusion, progress,
and bounded waiting B) Ensuring fair scheduling of processes C) Ensuring
real-time constraints are met D) Ensuring deadlock prevention Answer: A)
Ensuring mutual exclusion, progress, and bounded waiting
4. Which synchronization problem involves two or more processes waiting
indefinitely for an event that can be caused by only one of the waiting
processes? A) Deadlock B) Starvation C) Race Condition D) Livelock Answer:
A) Deadlock
5. Which synchronization problem occurs when two or more processes are
reading or writing shared data and the final result depends on the order of
execution of instructions? A) Deadlock B) Starvation C) Race Condition D)
Livelock Answer: C) Race Condition
6. Which synchronization primitive provides a higher-level abstraction for
managing concurrent access to shared resources? A) Mutex B) Semaphore C)
Barrier D) Monitor Answer: D) Monitor
7. In the dining philosophers problem, what does each philosopher represent? A)
A process B) A thread C) A resource D) A semaphore Answer: B) A thread
8. Which synchronization problem occurs when two or more processes are
unable to continue execution because each is waiting for the other to release
a resource? A) Deadlock B) Starvation C) Race Condition D) Livelock Answer:
A) Deadlock
9. What is the purpose of using synchronization primitives such as mutexes and
semaphores? A) To eliminate concurrency B) To allow simultaneous access to
critical sections C) To ensure mutual exclusion D) To increase system
performance Answer: C) To ensure mutual exclusion
10. The producer-consumer problem involves: A) Multiple producers and a single
consumer B) Multiple consumers and a single producer C) Multiple producers
and multiple consumers D) A single producer and a single consumer Answer:
C) Multiple producers and multiple consumers
11. What is the primary purpose of using locks in process synchronization? A) To
prevent deadlock B) To prevent race conditions C) To implement priority
inversion D) To ensure fair access to resources Answer: B) To prevent race
conditions
12. What is the purpose of a semaphore's count? A) To prevent deadlock B) To
signal availability of resources C) To enforce mutual exclusion D) To prevent
priority inversion Answer: B) To signal availability of resources
13. In the readers-writers problem, which type of access is exclusive? A) Reader B)
Writer C) Both reader and writer D) Neither reader nor writer Answer: B)
Writer
14. Which synchronization problem occurs when a process is perpetually denied
access to resources or unable to proceed? A) Deadlock B) Starvation C) Race
Condition D) Livelock Answer: B) Starvation
15. In the dining philosophers problem, what does each fork represent? A) A
process B) A resource C) A mutex D) A semaphore Answer: B) A resource

Unit -4 Process Deadlocks


1. What is deadlock? a) A state in which two or more processes are unable to
proceed because each is waiting for the other to release a resource. b) A
state in which a process has terminated unexpectedly. c) A state in which a
process is waiting for input from the user. d) A state in which a process is
waiting for a CPU to become available.
Answer: a) A state in which two or more processes are unable to proceed
because each is waiting for the other to release a resource.
2. Mutual exclusion refers to: a) A condition where resources cannot be shared
between processes. b) A condition where processes can share resources
freely. c) A condition where processes can be preempted. d) A condition
where a process can hold onto resources indefinitely.
Answer: a) A condition where resources cannot be shared between
processes.
3. Hold and wait refers to: a) A condition where a process holds resources while
waiting for additional resources. b) A condition where a process releases all
resources before acquiring new ones. c) A condition where a process cannot
be preempted. d) A condition where processes share resources equally.
Answer: a) A condition where a process holds resources while waiting for
additional resources.
4. Which of the following strategies is used to prevent deadlock? a) Deadlock
avoidance b) Deadlock detection c) Deadlock recovery d) All of the above
Answer: d) All of the above
5. What is deadlock avoidance? a) All processes request resources at the same
time. b) Resource allocation is done dynamically so that deadlock never
occurs. c) Processes are terminated if deadlock is detected. d) Processes are
restarted if deadlock is detected.
Answer: b) Resource allocation is done dynamically so that deadlock never
occurs.
6. Banker's algorithm is used for: a) Deadlock detection b) Deadlock avoidance
c) Deadlock recovery d) Deadlock prevention
Answer: a) and b) Deadlock detection and avoidance
7. Which of the following is not a method for deadlock recovery? a) Process
termination b) Resource preemption c) Rollback d) Resource allocation
Answer: d) Resource allocation
8. In the dining philosophers problem, what resource are the philosophers
competing for? a) Forks b) Knives c) Plates d) Food
Answer: a) Forks
9. What is the critical section problem? a) A problem where two or more
processes are unable to proceed because each is waiting for the other to
release a resource. b) A problem where a process holds resources while
waiting for additional resources. c) A problem where resources cannot be
shared between processes. d) A problem where processes share resources
equally.
Answer: c) A problem where resources cannot be shared between
processes.
10. The Coffman conditions for deadlock include all of the following except: a)
Mutual exclusion b) Hold and wait c) No preemption d) Circular wait
Answer: d) Circular wait
11. What is the difference between deadlock prevention and deadlock
avoidance?
Answer: a) Deadlock prevention focuses on removing one of the four
necessary conditions for deadlock, while deadlock avoidance dynamically
allocates resources to avoid deadlock.
12. Which of the following is not a deadlock prevention technique? a) Locking
b) Semaphore c) Monitors d) Timeout
Answer: d) Timeout
13. Which resource allocation strategy allows resources to be preempted from
one process and allocated to another? a) Banker's algorithm b) Wait-die
algorithm c) Wound-wait algorithm d) None of the above
Answer: c) Wound-wait algorithm
14. In which of the following scenarios is deadlock most likely to occur? a) When
there are fewer resources than processes. b) When processes do not
communicate with each other. c) When processes request resources in a
random order. d) When processes hold onto resources indefinitely.
Answer: d) When processes hold onto resources indefinitely.
15. What is the purpose of the resource allocation graph in deadlock detection?
a) To allocate resources to processes. b) To visualize the allocation of
resources and detect cycles. c) To track the execution of processes. d) To
determine the priority of processes.
Answer: b) To visualize the allocation of resources and detect cycles.
16. How does the Banker's algorithm prevent deadlock? a) By preemptively
reclaiming resources from processes. b) By ensuring that processes can
request resources without holding any. c) By ensuring that the system never
enters an unsafe state. d) By killing processes that hold resources for too
long.
Answer: c) By ensuring that the system never enters an unsafe state.
17. What condition must be satisfied for a system to be considered in a safe
state according to the Banker's algorithm? a) Hold and wait b) No
preemption c) Circular wait d) Safe sequence exists
Answer: d) Safe sequence exists
18. In a Resource Allocation Graph, what do the nodes represent? a) Processes
b) Resources c) Both processes and resources d) None of the above
Answer: c) Both processes and resources
19. Which of the following is true about the Banker's algorithm? a) It prevents
deadlock by not allowing processes to hold any resources. b) It requires
processes to declare their maximum resource needs in advance. c) It relies
on resource preemption to resolve deadlocks. d) It only works for systems
with a single resource type.
Answer: b) It requires processes to declare their maximum resource needs
in advance.
20. What does a cycle in a Resource Allocation Graph (RAG) indicate? a)
Deadlock b) Starvation c) Resource exhaustion d) Process termination
Answer: a) Deadlock
21. Which component of the Banker's algorithm ensures that granting a
resource request will not lead to an unsafe state? a) Available b) Max c) Need
d) Allocation
Answer: a) Available
22. How does the Banker's algorithm determine whether a resource request can
be granted without causing deadlock? a) By checking if the requested
resources are available. b) By simulating resource allocation and verifying if
a safe sequence exists. c) By preemptively reclaiming resources from other
processes. d) By increasing the system's resource capacity dynamically.
Answer: b) By simulating resource allocation and verifying if a safe
sequence exists.
For system protection, a process should access _____________

(a) all the resources

(b) few resources but authorization is not required

(c) only those resources for which it has authorization

(d) All of the mentioned

Ans:- c

What does the access matrix represent?


(a) Rows-Domains, Columns-Objects

(b) Rows-Objects, Columns-Domains

(c) Rows-Access List, Columns-Domains

(d) Rows-Domains, Columns-Access list

Ans:-a

Who can add new rights and remove some rights?

(a) Copy

(b) Transfer

(c) Limited copy

(d) Owner

Ans:- d

What is a trap door in a program?

a. a security hole, inserted at programming time in the system for later use

b. a type of antivirus

c. security hole in a network

d. none of the mentioned

Answer: (a). a security hole, inserted at programming time in the system for later use

Which of the following is NOT considered a physical security measure?

a) Surveillance cameras

b) Biometric authentication

c) Firewalls

d) Security guards
Unit -5 Memory Management: -
1. What is the primary purpose of memory management in an operating
system? a) To allocate memory resources to processes b) To ensure data
integrity c) To manage CPU scheduling d) To handle I/O operations
Answer: a) To allocate memory resources to processes
2. Which of the following is not a memory management scheme? a) Paging b)
Segmentation c) Virtualization d) Fragmentation
Answer: d) Fragmentation
3. What is a page table used for in virtual memory systems? a) To map logical
addresses to physical addresses b) To store the contents of pages c) To
manage CPU registers d) To schedule I/O operations
Answer: a) To map logical addresses to physical addresses
4. What is thrashing in the context of memory management? a) The process of
swapping out idle processes to disk b) Excessive paging activity that leads
to a decrease in CPU utilization c) The process of allocating memory to a
process d) The fragmentation of memory into small, unusable chunks
Answer: b) Excessive paging activity that leads to a decrease in CPU utilization
5. Which of the following is not a memory allocation algorithm? a) First Fit b)
Best Fit c) Round Robin d) Worst Fit
Answer: c) Round Robin
6. What is internal fragmentation in memory management? a) Wasted memory
within a partition due to inefficient allocation b) The loss of data integrity
during memory allocation c) The fragmentation of memory into small,
unusable chunks d) The process of swapping out processes to disk
Answer: a) Wasted memory within a partition due to inefficient allocation
7. Which memory management scheme divides physical memory into fixed-
sized blocks? a) Paging b) Segmentation c) Swapping d) Contiguous
allocation
Answer: d) Contiguous allocation
8. What is the purpose of the MMU (Memory Management Unit) in memory
management? a) To manage CPU scheduling b) To translate logical
addresses to physical addresses c) To perform arithmetic and logical
operations on memory d) To handle disk I/O operations
Answer: b) To translate logical addresses to physical addresses
9. What is segmentation in memory management? a) Dividing memory into
fixed-sized blocks b) Dividing memory into variable-sized segments c)
Swapping processes between main memory and disk d) Mapping logical
addresses to physical addresses
Answer: b) Dividing memory into variable-sized segments
10. What is the primary disadvantage of using the First Fit memory allocation
algorithm? a) It may lead to external fragmentation b) It requires excessive
CPU overhead c) It may result in inefficient memory utilization d) It is not
suitable for systems with high memory demand
Answer: a) It may lead to external fragmentation
11. What is the purpose of swapping in memory management? a) To allocate
memory to a process b) To divide memory into fixed-sized blocks c) To move
entire processes between main memory and disk d) To cache frequently
accessed pages
Answer: c) To move entire processes between main memory and disk
12. What is the main difference between internal and external fragmentation?
Answer: a) Internal fragmentation occurs within a single memory block,
while external fragmentation occurs between multiple memory blocks.
13. What is a page fault in memory management? a) A condition where a
process requires more memory than is physically available b) A condition
where a process accesses a page that is not currently in main memory c) A
condition where a process holds onto memory resources without utilizing
them d) A condition where a process experiences excessive paging activity
Answer: b) A condition where a process accesses a page that is not
currently in main memory
14. What is virtual memory? a) A memory management technique that allows
processes to use more memory than is physically available. b) A type of
memory used exclusively for virtual machines. c) A hardware component
used to store CPU instructions. d) A technique for managing cache memory.
Answer: a) A memory management technique that allows processes to use
more memory than is physically available.
15. What is the purpose of virtual memory? a) To increase the size of physical
memory. b) To reduce the need for secondary storage. c) To provide a
uniform address space for processes. d) To eliminate the need for CPU
cache.
Answer: c) To provide a uniform address space for processes.
16. Which of the following is not a benefit of virtual memory? a) Increased
system performance b) Simplified memory management c) Protection and
isolation of processes d) Reduced I/O operations
Answer: d) Reduced I/O operations
17. What is a page fault? a) A condition where a process accesses a page that is
not currently in main memory. b) A condition where a process accesses a
page that is corrupted. c) A condition where a process exceeds its allocated
memory quota. d) A condition where a process attempts to access memory
reserved for the operating system.
Answer: a) A condition where a process accesses a page that is not
currently in main memory.
18. What is the role of the page table in virtual memory? a) To store the contents
of pages. b) To map virtual addresses to physical addresses. c) To manage
disk I/O operations. d) To track the execution of processes.
Answer: b) To map virtual addresses to physical addresses.
19. Which component is responsible for translating virtual addresses to physical
addresses in virtual memory systems? a) CPU b) MMU (Memory
Management Unit) c) Secondary storage d) Disk controller
Answer: b) MMU (Memory Management Unit)
20. What is a TLB (Translation Lookaside Buffer) in virtual memory systems? a)
A buffer used to store CPU instructions. b) A cache for virtual-to-physical
address translations. c) A hardware component for managing disk I/O
operations. d) A mechanism for managing CPU scheduling.
Answer: b) A cache for virtual-to-physical address translations.
21. How does demand paging improve memory efficiency? a) By preloading all
pages into memory before they are needed. b) By loading only the necessary
pages into memory as they are required. c) By increasing the size of the page
table. d) By using a larger page size.
Answer: b) By loading only the necessary pages into memory as they are
required.
22. What is the difference between swapping and paging in virtual memory?
Answer: a) Swapping moves entire processes between main memory and
disk, while paging moves individual pages.
23. How does virtual memory contribute to process isolation and protection? a)
By preventing processes from accessing memory reserved for the operating
system. b) By providing each process with its own virtual address space. c)
By restricting the size of the page table. d) By increasing the speed of
memory access.
Answer: b) By providing each process with its own virtual address space.

Unit-6 Inter-Process Communication: -


1. What is Inter-Process Communication (IPC)? a) A method for
communicating between different processors in a multi-core system. b) A
mechanism for sharing data and information between processes running on
the same or different systems. c) A technique for managing CPU scheduling.
d) A hardware component used for disk I/O operations.
Answer: b) A mechanism for sharing data and information between
processes running on the same or different systems.
2. Which of the following is not a commonly used IPC mechanism? a) Pipes b)
Semaphores c) Registers d) Message queues
Answer: c) Registers
3. What is a pipe in the context of IPC? a) A one-way communication channel
that allows data to flow from one process to another. b) A shared memory
region used for inter-process communication. c) A hardware component
used to store CPU instructions. d) A mechanism for managing disk I/O
operations.
Answer: a) A one-way communication channel that allows data to flow
from one process to another.
4. Which IPC mechanism allows multiple processes to communicate using a
common storage area? a) Shared memory b) Message queues c) Pipes d)
Semaphores
Answer: a) Shared memory
5. What is the purpose of a semaphore in IPC? a) To synchronize the execution
of processes. b) To store messages for inter-process communication. c) To
allocate memory resources to processes. d) To manage disk I/O operations.
Answer: a) To synchronize the execution of processes.
6. Which IPC mechanism is best suited for communication between processes
that do not have a parent-child relationship? a) Pipes b) Shared memory c)
Message queues d) Semaphores
Answer: c) Message queues
7. How does shared memory facilitate IPC? a) By allowing processes to
exchange messages directly. b) By providing a common memory region that
multiple processes can access. c) By establishing a one-way communication
channel between processes. d) By synchronizing the execution of processes.
Answer: b) By providing a common memory region that multiple processes
can access.
8. What is the main advantage of using message queues for IPC? a)
Asynchronous communication between processes b) Real-time
synchronization of processes c) Low overhead and easy implementation d)
Direct access to shared memory regions
Answer: a) Asynchronous communication between processes
9. What is the purpose of a mutex in IPC? a) To facilitate message passing
between processes. b) To enforce mutual exclusion and prevent race
conditions. c) To allocate memory resources to processes. d) To manage disk
I/O operations.
Answer: b) To enforce mutual exclusion and prevent race conditions.
1. What is the primary purpose of secondary storage structures in operating
systems? a) To provide temporary storage for CPU instructions. b) To store
data and programs persistently even when the power is turned off. c) To
manage memory allocation for processes. d) To facilitate communication
between devices.
Answer: b) To store data and programs persistently even when the power
is turned off.
2. Which secondary storage structure is commonly used for long-term data
storage in modern computer systems? a) Hard disk drives (HDDs) b)
Random-access memory (RAM) c) Cache memory d) Optical drives
Answer: a) Hard disk drives (HDDs)
3. Which secondary storage structure is typically used for long-term archival
storage? a) Solid-state drives (SSDs) b) Magnetic tapes c) Optical drives d)
USB flash drives
Answer: b) Magnetic tapes
4. What is the purpose of a disk controller in secondary storage management?
a) To provide an interface for users to interact with secondary storage
devices. b) To manage the allocation of physical memory. c) To translate
logical block addresses to physical disk addresses. d) To synchronize access
to shared secondary storage resources.
Answer: c) To translate logical block addresses to physical disk addresses.
5. What is the purpose of disk scheduling algorithms in secondary storage
management? a) To encrypt data stored on secondary storage devices. b)
To manage the allocation of physical memory. c) To optimize the order in
which disk requests are serviced to minimize seek time and maximize
throughput. d) To synchronize access to shared secondary storage
resources.
Answer: c) To optimize the order in which disk requests are serviced to
minimize seek time and maximize throughput.

You might also like