1.
When several processes access and manipulate the same data simultaneously and the result depends on particular order in which the access takes place is called
Correct Answer
C. Race Condition
Explanation
A race condition occurs when multiple processes or threads access and manipulate the same data simultaneously, and the final result depends on the order in which the access takes place. In other words, the outcome of the program becomes unpredictable and inconsistent due to the non-deterministic nature of the concurrent execution. This can lead to bugs, data corruption, or unexpected behavior in the program.
2.
Which of the following condition does not corresponds to critical section problem?
Correct Answer
A. Consistency
Explanation
Consistency is not a condition that corresponds to the critical section problem. The critical section problem focuses on ensuring mutual exclusion, which means that only one process can access the critical section at a time. Bounded waiting refers to the condition where a process waiting to enter the critical section is guaranteed to eventually enter it. Progress ensures that if no process is in the critical section and some processes want to enter it, then only those processes that do not violate other conditions can enter. Consistency, on the other hand, refers to the property of a system where all replicas or copies of data are always in the same state.
3.
A semaphore variable S has a value 12. What is the value of S if the synchronization problem performs 4-P (wait) operations and 6-V (signal) operations
Correct Answer
B. 14
Explanation
The semaphore variable S has an initial value of 12. For every P (wait) operation, the value of S is decremented by 1. For every V (signal) operation, the value of S is incremented by 1. In this case, there are 4 P operations and 6 V operations. Therefore, the value of S would be 12 - 4 + 6 = 14.
4.
A semaphore in synchronization process is used for
Correct Answer
D. All the above
Explanation
A semaphore in synchronization process is used for all the above purposes. Mutual Exclusion ensures that only one process can access a shared resource at a time, preventing conflicts and ensuring data integrity. Synchronization allows processes to coordinate their actions and ensure proper sequencing, avoiding race conditions. Resource allocation ensures that processes are allocated resources in a fair and controlled manner, preventing resource starvation. Therefore, a semaphore can be used for all of these purposes.
5.
In Readers – Writers Problem for process synchronization which of the following is/are true during read.
I Any number of reader processes can enter into critical section
II Any number of writer processes can enter into critical section
III First reader has to block the writer process
IV Last Reader has to resume the writer process
Correct Answer
C. I, III and IV only
Explanation
In the Readers-Writers problem, only one writer can enter the critical section at a time to maintain data consistency. Therefore, statement II is false. However, any number of reader processes can enter the critical section simultaneously as they do not modify the shared data. The first reader process has to block the writer process to prevent any concurrent writes while the last reader process has to resume the writer process to allow it to enter the critical section. Therefore, statements I, III, and IV are true.
6.
The following operation on a file does allow only erasing the contents of a file but not its attributes.
Correct Answer
D. Truncating a file
Explanation
Truncating a file refers to the operation of erasing the contents of a file while preserving its attributes such as file name, size, and permissions. Unlike deleting a file, renaming a file, or removing an entry from a directory, truncating specifically focuses on removing the data within the file without affecting its attributes. Therefore, truncating a file is the correct answer as it allows only erasing the contents of a file without altering its attributes.
7.
In which of the following directory structure Master File Directory (MFD) is maintained for every User File Directory (UFD)
Correct Answer
B. Two Level
Explanation
In a two-level directory structure, the Master File Directory (MFD) is maintained for every User File Directory (UFD). This means that each user has their own UFD, which contains a list of files and directories specific to that user. The MFD keeps track of all the UFDs and their corresponding user information. This two-level structure allows for better organization and management of files and directories, as each user has their own separate UFD.
8.
The module which translates logical block addresses of disk to physical block addresses of disk is performed by
Correct Answer
C. File Organization Module
Explanation
The File Organization Module is responsible for translating logical block addresses of a disk to physical block addresses. This module determines how files are organized and stored on the disk, including the allocation of blocks and the mapping of logical addresses to physical addresses. It ensures that data is stored and retrieved efficiently, optimizing disk usage and access times.
9.
Which of the following is not a technique for free space management?
Correct Answer
D. Linear List
Explanation
The technique of linear list is not used for free space management. In free space management, the goal is to keep track of the available and allocated memory blocks. Techniques like bit vector, linked list, and counting are commonly used for this purpose. However, a linear list is not a specific technique used for free space management. It is a general term that refers to a list where elements are arranged sequentially in a linear manner.
10.
The file allocation method for which the directory structure uses a separate block for holding block addresses of available or free disk blocks.
Correct Answer
C. Indexed allocation
Explanation
Indexed allocation is the correct answer because it is a file allocation method where the directory structure uses a separate block called an index block to hold the block addresses of available or free disk blocks. This index block acts as a lookup table, allowing quick access to the data blocks associated with a file. Each file has its own index block, which contains pointers to the actual data blocks on the disk. This method provides efficient random access to files but requires additional overhead for maintaining the index blocks.
11.
A vertical set of all tracks at same position in a disk pack is considered as
Correct Answer
B. Cylinder
Explanation
A vertical set of all tracks at the same position in a disk pack is called a cylinder. This means that all the tracks that are aligned vertically across the different platters in the disk pack and at the same radius or position are considered as a cylinder. It is a way to organize and access data on a disk, as it allows for efficient sequential access of data across multiple platters.
12.
The shortest seek distance among the tracks is achieved using which of the following disk scheduling algorithm.
Correct Answer
D. SSTF
Explanation
SSTF (Shortest Seek Time First) is the disk scheduling algorithm that achieves the shortest seek distance among the tracks. This algorithm selects the request with the shortest seek time from the current head position, resulting in reduced seek time and improved overall disk performance. By choosing the nearest track first, SSTF minimizes the movement of the disk arm, leading to faster data retrieval and improved system efficiency.
13.
Which of the following is not the necessary condition for a deadlock to occur?
Correct Answer
B. Preemption
Explanation
Preemption is not a necessary condition for a deadlock to occur. Deadlock can occur even without preemption. Preemption refers to the act of forcibly removing a resource from a process and allocating it to another process. While preemption can help prevent or resolve deadlocks, it is not a required condition for deadlock to happen. Deadlock can occur due to hold and wait, mutual exclusion, and circular wait, where processes are waiting for resources in a circular chain.
14.
The protocol which is not used in deadlock prevention?
Correct Answer
D. No Preemption
Explanation
No Preemption is not used in deadlock prevention because it allows a process to hold on to a resource indefinitely, even if other processes are waiting for that resource. In deadlock prevention, resources should be preempted or taken away from a process if necessary to avoid deadlock situations. However, No Preemption does not allow this, making it ineffective in preventing deadlocks.
15.
A computer has six tape drives, with n processes competing for them. Each process may need 2 drives. What i s the maximum value of “n” for the system to be deadlock free?
Correct Answer
C. 5
Explanation
The maximum value of n for the system to be deadlock-free in this scenario is 5. Let’s break it down:
Given tape drives: 6
Each process may need: 2 drives
When we allocate 1 drive to each process, the total number of processes would be 6. However, in this case, there would definitely be a deadlock because every process holds 1 drive and waits for another drive held by a different process. To avoid deadlock, we need to reduce the number of processes by 1.
Hence, the maximum value of n (number of processes) is 6 - 1 = 5.
16.
For deadlock avoidance the false statement is
I A safe sequence keeps always the system in safe state
II Every unsafe state is deadlock state
III A deadlock state is always unsafe state.
Correct Answer
B. II
Explanation
The false statement for deadlock avoidance is II. Every unsafe state is not necessarily a deadlock state. An unsafe state is a state where a system may lead to a deadlock, but it does not guarantee that a deadlock will occur. A deadlock state is a specific type of unsafe state where processes are unable to proceed because they are waiting for resources held by other processes, resulting in a circular dependency.
17.
Wait for Graph model is used for which of the following deadlock handling method.
Correct Answer
C. Deadlock detection
Explanation
The Wait for Graph model is used for deadlock detection. In this model, a directed graph is constructed to represent the resource allocation and request relationships between processes. If a cycle is found in the graph, it indicates the presence of a deadlock. This model helps in identifying and resolving deadlocks by determining which processes are involved and which resources they are waiting for. It does not prevent or avoid deadlocks, but rather detects them after they have occurred.
18.
The possible solution to recover a deadlock is
Correct Answer
D. All the above
Explanation
The possible solution to recover a deadlock is to either abort all deadlocked processes, use resource preemption, or abort the processes one by one. These options allow for different approaches to resolving the deadlock situation. Aborting all deadlocked processes can provide a quick resolution but may result in loss of work. Resource preemption involves forcefully taking resources from one process to allocate them to another, which can lead to potential data inconsistencies. Aborting processes one by one allows for a more selective approach but may take longer to resolve the deadlock. Therefore, all the above options can be considered as possible solutions to recover a deadlock.
19.
The method which is not used in the implementation of Access Matrix.
Correct Answer
C. Access lists for domains
Explanation
Access lists for domains are not used in the implementation of an Access Matrix. An Access Matrix is a security model that defines the rights and permissions of subjects (users) on objects (resources). It typically uses a Global Table to represent the subjects and objects, and a Capability List for each subject to specify their access rights. The Lock Key mechanism is used to control access to the objects. However, Access lists for domains are not part of the Access Matrix implementation and therefore not used.
20.
An Access Matrix represents
Correct Answer
D. All the above
Explanation
An Access Matrix represents all the above options, which include a set of objects, a set of domains, and a set of access rights. An Access Matrix is a security model that defines the permissions and access control for different entities in a system. It consists of rows representing objects or resources, columns representing domains or subjects, and cells representing the access rights or permissions that domains have over objects. This matrix helps in managing and enforcing security policies by specifying who can access what resources and what actions they can perform.