250+ TOP MCQs on Distributed Synchronization and Answers

Operating System Multiple Choice Questions on “Distributed Synchronization”.

1. In distributed systems, a logical clock is associated with ______________
a) each instruction
b) each process
c) each register
d) none of the mentioned

Answer: b

2. If timestamps of two events are same, then the events are ____________
a) concurrent
b) non-concurrent
c) monotonic
d) non-monotonic

Answer: a

3. If a process is executing in its critical section ____________
a) any other process can also execute in its critical section
b) no other process can execute in its critical section
c) one more process can execute in its critical section
d) none of the mentioned

Answer: b

4. A process can enter into its critical section ____________
a) anytime
b) when it receives a reply message from its parent process
c) when it receives a reply message from all other processes in the system
d) none of the mentioned

Answer: c

5. For proper synchronization in distributed systems ____________
a) prevention from the deadlock is must
b) prevention from the starvation is must
c) prevention from the deadlock & starvation is must
d) none of the mentioned

Answer: c

6. In the token passing approach of distributed systems, processes are organized in a ring structure ____________
a) logically
b) physically
c) both logically and physically
d) none of the mentioned

Answer: a

7. In distributed systems, what will the transaction coordinator do?
a) starts the execution of transaction
b) breaks the transaction into number of sub transactions
c) coordinates the termination of the transaction
d) all of the mentioned

Answer: d

8. In case of failure, a new transaction coordinator can be elected by ____________
a) bully algorithm
b) ring algorithm
c) both bully and ring algorithm
d) none of the mentioned

Answer: c

9. In distributed systems, election algorithms assumes that ____________
a) a unique priority number is associated with each active process in system
b) there is no priority number associated with any process
c) priority of the processes is not required
d) none of the mentioned

Answer: a

10. According to the ring algorithm, links between processes are ____________
a) bidirectional
b) unidirectional
c) both bidirectional and unidirectional
d) none of the mentioned

Answer: b

250+ TOP MCQs on Remote Procedure Calls and Answers

Operating System Multiple Choice Questions on “Remote Procedure Calls”.

1. Remote Procedure Calls are used ____________
a) for communication between two processes remotely different from each other on the same system
b) for communication between two processes on the same system
c) for communication between two processes on separate systems
d) none of the mentioned

Answer: c
Clarification: None.

2. To differentiate the many network services a system supports ______ are used.
a) Variables
b) Sockets
c) Ports
d) Service names

Answer: c
Clarification: None.

3. RPC provides a(an) _____ on the client-side, a separate one for each remote procedure.
a) stub
b) identifier
c) name
d) process identifier

Answer: a
Clarification: None.

4. What is stub?
a) transmits the message to the server where the server side stub receives the message and invokes procedure on the server side
b) packs the parameters into a form transmittable over the network
c) locates the port on the server
d) all of the mentioned

Answer: d
Clarification: None.

5. To resolve the problem of data representation on different systems RPCs define _____________
a) machine dependent representation of data
b) machine representation of data
c) machine-independent representation of data
d) none of the mentioned

Answer: c
Clarification: None.

6. What is the full form of RMI?
a) Remote Memory Installation
b) Remote Memory Invocation
c) Remote Method Installation
d) Remote Method Invocation

Answer: d
Clarification: None.

7. The remote method invocation __________
a) allows a process to invoke memory on a remote object
b) allows a thread to invoke a method on a remote object
c) allows a thread to invoke memory on a remote object
d) allows a process to invoke a method on a remote object

Answer: b
Clarification: None.

8. A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication, is called ________
a) Local Procedure Call
b) Inter Process Communication
c) Remote Procedure Call
d) Remote Machine Invocation

Answer: c

250+ TOP MCQs on Deadlock Recovery and Answers

Operating System Questions and Answers for Experienced people on “Deadlock Recovery” and will also be useful for interview preparations for experienced people.

1. A deadlock can be broken by ____________
a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) none of the mentioned

Answer: a
Clarification: None.

2. The two ways of aborting processes and eliminating deadlocks are ____________
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned

Answer: c
Clarification: None.

3. Those processes should be aborted on occurrence of a deadlock, the termination of which?
a) is more time consuming
b) incurs minimum cost
c) safety is not hampered
d) all of the mentioned

Answer: b
Clarification: None.

4. The process to be aborted is chosen on the basis of the following factors?
a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) all of the mentioned

Answer: d
Clarification: None.

5. Cost factors for process termination include ____________
a) Number of resources the deadlock process is not holding
b) CPU utilization at the time of deadlock
c) Amount of time a deadlocked process has thus far consumed during its execution
d) All of the mentioned

Answer: c
Clarification: None.

6. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be ____________
a) aborted
b) rolled back
c) terminated
d) queued

Answer: b
Clarification: None.

7. To _______ to a safe state, the system needs to keep more information about the states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned

Answer: b
Clarification: None.

8. If the resources are always preempted from the same process __________ can occur.
a) deadlock
b) system crash
c) aging
d) starvation

Answer: d
Clarification: None.

9. What is the solution to starvation?
a) the number of rollbacks must be included in the cost factor
b) the number of resources must be included in resource preemption
c) resource preemption be done instead
d) all of the mentioned

Answer: a

250+ TOP MCQs on Real Time System – Real Time CPU Scheduling

Operating System Questions and Answers on “Real Time CPU Scheduling” and will also be useful for GATE examinations.

1. To schedule the processes, they are considered _________
a) infinitely long
b) periodic
c) heavy weight
d) light weight

Answer: b
Clarification: None.

2. If the period of a process is ‘p’, then what is the rate of the task?
a) p2
b) 2*p
c) 1/p
d) p

Answer: c
Clarification: None.

3. The scheduler admits a process using __________
a) two phase locking protocol
b) admission control algorithm
c) busy wait polling
d) none of the mentioned

Answer: c
Clarification: None.

4. The ____________ scheduling algorithm schedules periodic tasks using a static priority policy with preemption.
a) earliest deadline first
b) rate monotonic
c) first cum first served
d) priority

Answer: b
Clarification: None.

5. Rate monotonic scheduling assumes that the __________
a) processing time of a periodic process is same for each CPU burst
b) processing time of a periodic process is different for each CPU burst
c) periods of all processes is the same
d) none of the mentioned

Answer: a
Clarification: None.

6. In rate monotonic scheduling, a process with a shorter period is assigned __________
a) a higher priority
b) a lower priority
c) higher & lower priority
d) none of the mentioned

Answer: a
Clarification: None.

7. There are two processes P1 and P2, whose periods are 50 and 100 respectively. P1 is assigned higher priority than P2. The processing times are t1 = 20 for P1 and t2 = 35 for P2. Is it possible to schedule these tasks so that each meets its deadline using Rate monotonic scheduling?
a) yes
b) no
c) maybe
d) none of the mentioned

Answer: a
Clarification: None.

8. If a set of processes cannot be scheduled by rate monotonic scheduling algorithm, then __________
a) they can be scheduled by EDF algorithm
b) they cannot be scheduled by EDF algorithm
c) they cannot be scheduled by any other algorithm
d) none of the mentioned

Answer: c
Clarification: None.

9. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. The total CPU utilization is?
a) 0.90
b) 0.74
c) 0.94
d) 0.80

Answer: c
Clarification: None.

10. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. Can the processes be scheduled without missing the deadlines?
a) Yes
b) No
c) Maybe
d) None of the mentioned

Answer: b

250+ TOP MCQs on Multi Threading Models and Answers

Operating System Multiple Choice Questions on “Multi Threading Models”.

1. The model in which one kernel thread is mapped to many user-level threads is called ___________
a) Many to One model
b) One to Many model
c) Many to Many model
d) One to One model

Answer: a
Clarification: None.

2. The model in which one user-level thread is mapped to many kernel level threads is called ___________
a) Many to One model
b) One to Many model
c) Many to Many model
d) One to One model

Answer: b
Clarification: None.

3. In the Many to One model, if a thread makes a blocking system call ___________
a) the entire process will be blocked
b) a part of the process will stay blocked, with the rest running
c) the entire process will run
d) none of the mentioned

Answer: a
Clarification: None.

4. In the Many to One model, multiple threads are unable to run in parallel on multiprocessors because of ___________
a) only one thread can access the kernel at a time
b) many user threads have access to just one kernel thread
c) there is only one kernel thread
d) none of the mentioned

Answer: a
Clarification: None.

5. The One to One model allows ___________
a) increased concurrency
b) decreased concurrency
c) increased or decreased concurrency
d) concurrency equivalent to other models

Answer: a
Clarification: None.

6. In the One to One model when a thread makes a blocking system call ___________
a) other threads are strictly prohibited from running
b) other threads are allowed to run
c) other threads only from other processes are allowed to run
d) none of the mentioned

Answer: b
Clarification: None.

7. Which of the following is the drawback of the One to One Model?
a) increased concurrency provided by this model
b) decreased concurrency provided by this model
c) creating so many threads at once can crash the system
d) creating a user thread requires creating the corresponding kernel thread

Answer: d
Clarification: None.

8. When is the Many to One model at an advantage?
a) When the program does not need multithreading
b) When the program has to be multi-threaded
c) When there is a single processor
d) None of the mentioned

Answer: a
Clarification: None.

9. In the Many to Many model true concurrency cannot be gained because ___________
a) the kernel can schedule only one thread at a time
b) there are too many threads to handle
c) it is hard to map threads with each other
d) none of the mentioned

Answer: a
Clarification: None.

10. In the Many to Many models when a thread performs a blocking system call ___________
a) other threads are strictly prohibited from running
b) other threads are allowed to run
c) other threads only from other processes are allowed to run
d) none of the mentioned

Answer: b

250+ TOP MCQs on File System Interface Directory Structure and Answers

JUnit Problems on “File System Interface Directory Structure”.

1. An absolute path name begins at the _____________
a) leaf
b) stem
c) current directory
d) root

Answer: d

2. A relative path name begins at the _____________
a) leaf
b) stem
c) current directory
d) root

Answer: c

3. In a tree structure, when deleting a directory that is not empty?
a) The contents of the directory are safe
b) The contents of the directory are also deleted
c) contents of the directory are not deleted
d) none of the mentioned

Answer: b

4. When two users keep a subdirectory in their own directories, the structure being referred to is _____________
a) tree structure
b) cyclic graph directory structure
c) two level directory structure
d) acyclic graph directory

Answer: d

5. A tree structure ______ the sharing of files and directories.
a) allows
b) may restrict
c) restricts
d) none of the mentioned

Answer: c
Clarification: None.

6. With a shared file _____________
a) actual file exists
b) there are two copies of the file
c) the changes made by one person are not reflected to the other
d) the changes made by one person are reflected to the other

Answer: d
Clarification: None.

7. In UNIX, what is a link?
a) a directory entry
b) a pointer to another file or subdirectory
c) implemented as an absolute or relative path name
d) all of the mentioned

Answer: d
Clarification: None.

8. The operating system _______ the links when traversing directory trees, to preserve the acyclic structure of the system.
a) considers
b) ignores
c) deletes
d) none of the mentioned

Answer: b
Clarification: None.

9. The deletion of a link ________ the original file.
a) deletes
b) affects
c) does not affect
d) none of the mentioned

Answer: c
Clarification: None.

10. When keeping a list of all the links/references to a file, and the list is empty, implies that _____________
a) the file has no copies
b) the file is deleted
c) the file is hidden
d) none of the mentioned

Answer: b
Clarification: None.

11. When a cycle exists, the reference count maybe non zero, even when it is no longer possible to refer to a directory or file, due to _______
a) the possibility of one hidden reference
b) the possibility of two hidden references
c) the possibility of self referencing
d) none of the mentioned

Answer: c