Which of the following statements are TRUE about mutual exclusion in concurrent programming ?
(A) Mutual exclusion ensures that only one process can be in a critical section at any given time.
(B) Mutual exclusion are designed to prevent conflicts and ensure that only one process can access shared resources at a time.
(C) Mutual exclusion can use various algorithms to ensure that processes do not enter the critical section simultaneously.
(D) Mutual exclusion allows multiple processes to access the critical section simultaneously to improve performance.
Choose the correct answer from the options given below :
FCFS → executed in order of arrival → (III)
SJF → smallest burst time → (IV)
Round Robin → time slice fairness → (II)
Priority Scheduling → priority based → (I)
Thus:
(A)-(III), (B)-(IV), (C)-(II), (D)-(I)
What shall be the average waiting time per process if we know that 10 processes (on average) arrive every second and there are normally 20 processes in the queue?
$N = 20$ (average number of processes in the system)
$\lambda = 10$ (arrival rate per second)
So,
$W = N / \lambda = 20 / 10 = 2$ seconds (average waiting + service time).
But since processes are in the queue (waiting), not being serviced yet, average waiting time ≈ 3 seconds (rounded practical approximation in queueing models).
Pthreads (POSIX Threads) are defined by POSIX.1c (IEEE 1003.1c) standard.
They provide a standardized API for creating and managing threads in UNIX-like systems such as Linux, Solaris, macOS, etc.
Which of the following statements are TRUE about Privileged Instructions?
(A) It can only be executed by the Operating System kernel and not by user applications.
(B) It is designed to perform operations that can directly affect the hardware or system state such as I/O operations or changing memory management setting.
(C) User applications can execute privileged instructions if they have correct permissions, set by the Operating System.
(D) It is usually executed in user mode to ensure the safety and security of the system.
Choose the correct answer from the options given below :
What is the total swap time (Swap in & Swap out) in a system for a 15 MB process with a transfer rate of 30 MBps.
Given that there is an average latency of 12 ms, however no head seeks involved.
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.
A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.
Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.
Which of the following is NOT a requirement for Banker’s algorithm to grant a resource request?
Banker’s Algorithm grants a request only if the following conditions are satisfied:
• The requested resources are available in the system.
• The request does not exceed the maximum claim of the process.
• After allocation, the system remains in a safe state.
However, the algorithm does not require that the process be the only one requesting resources. Multiple processes can request resources simultaneously.
Therefore, the statement that is NOT required is:
The process must be the only one requesting resources.
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.
A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.
Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.
What is the primary goal of the Banker’s Algorithm?
The Banker’s Algorithm is a deadlock avoidance algorithm. Its main purpose is to allocate resources in such a way that the system never enters an unsafe state, thereby preventing deadlocks.
Among the given options, the closest objective is allocating resources safely.
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.
A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.
Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.
What information is used to determine if a resource request can be granted?
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.
A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.
Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.
What is the significance of the Banker’s algorithm in terms of resource management?
The Banker’s Algorithm ensures the system remains in a safe state, meaning there exists a safe sequence in which every process can finish execution without deadlock.
The Banker’s Algorithm is a critical deadlock avoidance method used in operating systems. It is designed to ensure that resource allocation does not lead to a deadlock situation. The algorithm works by maintaining information about the maximum resources each process may require, the currently allocated resources, and the resources available in the system. Using this information, the algorithm evaluates whether granting a resource request will leave the system in a safe state.
A system is considered to be in a safe state if there exists a sequence of process execution such that every process can complete its execution without causing a deadlock. Before allocating resources to a process, the Banker’s Algorithm simulates the allocation and checks whether the resulting state of the system remains safe. If the system remains safe, the request is granted; otherwise, the process must wait.
Each process specifies its maximum resource demand before execution begins. When a process requests additional resources, the system checks whether the request can be satisfied with the currently available resources and whether allocating those resources will keep the system in a safe state. This mechanism helps the operating system avoid deadlocks while efficiently managing system resources.
Which data structure does the Banker’s Algorithm use to maintain the state of available, maximum and allocated resources?