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

Professor Academy

OS TEST - 02

DATE: Thu May 9 20:09:55 2024 TIME: 30 mins

1 Which of the following mechanisms is commonly used for process


synchronization in operating systems?

(A) Semaphore (B) Fragmentation

(C) Round Robin (D) Paging

Correct Option: ( A, )

Solution:

2 In operating systems, which mechanism ensures that multiple processes or


threads can access shared resources or critical sections without causing
conflicts or data inconsistency?

(A) Mutex locks (B) Round-robin scheduling

(C) Semaphore signals (D) CPU affinity

Correct Option: ( A, )

Solution:

3 Which of the following mechanisms is primarily used for process


synchronization in operating systems?

(A) Mutex locks (B) Round-robin scheduling

(C) Page replacement algorithms (D) Disk defragmentation

Correct Option: ( A, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
4 Which of the following statements accurately describes "context
switching" in operating systems?

(A) (B)
It refers to the process of changing a It involves transferring control from one
process's priority to enhance process to another, saving and restorin
performance. the state of the CPU registers.

(C) (D)
It's the mechanism by which the operating It denotes the method of converting hig
system allocates memory to running level programming languages into
processes. machine code.

Correct Option: ( B, )

Solution:

5 What is a Context Switch in Operating System?


(A) (B)
A process of changing the context menu inA mechanism to switch between different
the operating system. user accounts.

(C) (D)
The process of saving and restoring the A method to switch between various
state of a process or thread so that it can operating systems installed on a
be resumed later. computer.

Correct Option: ( C, )

Solution:

6 What does a context switch refer to in an operating system?


(A) (B)
The process of saving and restoring the A mechanism for scheduling processes to
state of a CPU so that a different process run concurrently
can be executed

(C) (D)
The allocation of resources to multiple processes The process of converting high-level programming code into
simultaneously machine code

Correct Option: ( A, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
7 Which of the following conditions must hold true for a system to be in a
deadlock state?

(A) (B)
Mutual exclusion, hold and wait, no Mutual exclusion, hold and release, no preemption, circular
wait
preemption, circular wait

(D)
( C ) Mutual inclusion, hold and wait, preemption, circular Mutual exclusion, hold and wait, preemption, no circular wait
wait

Correct Option: ( A, )

Solution:

8 What is a deadlock in the context of operating systems?


(A) (B)
A situation where a process is waiting A process that has terminated and
indefinitely for a resource held by another released all its resources.
process, and vice versa.

(C) (D)
A situation where a process is running A condition where a process is
without any resource allocation. preemptively terminated by the operati
system.

Correct Option: ( A, )

Solution:

9 Which of the following conditions is necessary for a deadlock to occur in a


system?

(A) (B)
Mutual exclusion Hold and wait

(C)
No preemption (D) Circular waits

Correct Option: ( D )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
10 What is the primary challenge posed by deadlocks in operating systems?

(A) (B)
Reduced system throughput Increased system responsiveness

(C) (D)
Enhanced parallel processing Improved memory allocation

Correct Option: ( A, )

Solution:

11 Which deadlock handling technique allows preempting resources from


processes?

(A) (B)
Deadlock avoidance Deadlock detection

(C)
Deadlock prevention (D) Deadlock recovery

Correct Option: ( C, )

Solution:

12 Which resource allocation strategy contributes to avoiding the circular


wait condition?

(A) (B)
Resource allocation graph Banker's algorithm

(C) (D)
Round-robin scheduling First-come, first-served (FCFS)

Correct Option: ( B, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
13 In a system with multiple resources and processes, what is a potential
consequence of deadlock?

(B)
(A) Starvation High system performance

(C) (D)
Reduced resource utilization Efficient process execution

Correct Option: ( A, )

Solution:

14 Which of the following is not a semaphore operation?


(A) wait() (B) signal()

(C) lock() (D) sem_post()

Correct Option: ( C, )

Solution:

15 Semaphores are used for:


(A) (B)
Process synchronization Memory allocation

(C) File handling (D) CPU scheduling

Correct Option: ( A, )

Solution:

16 What is the primary purpose of a semaphore?


(A) (B)
Resource allocation Preventing deadlock

(C)
Achieving mutual exclusion (D) Memory management

Correct Option: ( C, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
17 In semaphore implementation, the operation that decrements the
semaphore value and blocks the process if the value becomes negative is
called:

(A) block() (B) wait()

(C) signal() (D) decrement()

Correct Option: ( B, )

Solution:

18 Semaphores can be classified into:


(A) (B)
Binary and Counting Atomic and Non-atomic

(C)
Interruptible and Non-interruptible
(D) Priority and Round-robin

Correct Option: ( A, )

Solution:

19 Which of the following is NOT a resource represented in a Resource


Allocation Graph (RAG)?

(A) CPU (B) Memory

(C) Disk Space (D) Process ID

Correct Option: ( D )

Solution:

20 A cycle in a Resource Allocation Graph implies:


(A) Deadlock (B) Starvation

(C) Thrashing (D) Fragmentation

Correct Option: ( A, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
21 Which algorithm is used to detect a deadlock in a Resource Allocation
Graph?

(A)
Banker's Algorithm (B) Round Robin

(C)
First Come First Serve (D) Shortest Job Next

Correct Option: ( A, )

Solution:

22 What action should the operating system take to resolve a deadlock


indicated by a Resource Allocation Graph?

(A) (B)
Terminate one or more processes Allocate additional resources

(C)
Suspend all processes (D) Restart the system

Correct Option: ( A, )

Solution:

23 Which component is responsible for translating logical addresses to


physical addresses in a paged memory system?

(A) (B)
Memory Management Unit (MMU) CPU Scheduler

(C)
Disk Controller (D) Page Table

Correct Option: ( A, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983
24 How does the size of the page affect the performance of a paging system?

(A) (B)
Larger page size leads to more internal Smaller page size reduces the number
fragmentation. page faults.

(C) (D)
Larger page size improves the overall Smaller page size increases the overhe
system throughput. of managing the page table.

Correct Option: ( D )

Solution:

25 In a Resource Allocation Graph, what does a directed edge from process P


to resource R indicate?

(A) (B)
Process P is waiting for resource R Resource R is allocated to process P

(C) (D)
Resource R is released by process P Resource R is available for allocation

Correct Option: ( A, )

Solution:

Professor Academy No.42, Railway Border road, Kodambakkam, Chennai, State - Tamil Nadu, Pin Code - 600024 ,+91 9150567983

You might also like