250+ TOP MCQs on Deadlock Prevention and Answers

Operating System Multiple Choice Questions on “Deadlock Prevention”.

1. The number of resources requested by a process ____________
a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system

Answer: c

2. The request and release of resources are ___________
a) command line statements
b) interrupts
c) system calls
d) special programs

Answer: c

3. What are Multithreaded programs?
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) none of the mentioned

Answer: b
Clarification: Multiple threads can compete for shared resources.

4. For a deadlock to arise, which of the following conditions must hold simultaneously?
a) Mutual exclusion
b) No preemption
c) Hold and wait
d) All of the mentioned

Answer: d
Clarification: None.

5. For Mutual exclusion to prevail in the system ____________
a) at least one resource must be held in a non sharable mode
b) the processor must be a uniprocessor rather than a multiprocessor
c) there must be at least one resource in a sharable mode
d) all of the mentioned

Answer: a
Clarification: If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released.

6. For a Hold and wait condition to prevail ____________
a) A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it
b) A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes
c) A process must hold at least one resource and not be waiting to acquire additional resources
d) None of the mentioned

Answer: b
Clarification: None.

7. Deadlock prevention is a set of methods ____________
a) to ensure that at least one of the necessary conditions cannot hold
b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock

Answer: a
Clarification: None.

8. For non sharable resources like a printer, mutual exclusion ____________
a) must exist
b) must not exist
c) may exist
d) none of the mentioned

Answer: a
Clarification: A printer cannot be simultaneously shared by several processes.

9. For sharable resources, mutual exclusion ____________
a) is required
b) is not required
c) may be or may not be required
d) none of the mentioned

Answer: b
Clarification: They do not require mutually exclusive access, and hence cannot be involved in a deadlock.

10. To ensure that the hold and wait condition never occurs in the system, it must be ensured that ____________
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its execution
c) a process can request resources only when it has none
d) all of the mentioned

Answer: d
Clarification: c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated.

11. The disadvantage of a process being allocated all its resources before beginning its execution is ____________
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned

Answer: b
Clarification: None.

12. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted

Answer: d
Clarification: None.

13. One way to ensure that the circular wait condition never holds is to ____________
a) impose a total ordering of all resource types and to determine whether one precedes another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) all of the mentioned

Answer: a

250+ TOP MCQs on Real Time System – Implementing RT Operating Systems

Operating System Multiple Choice Questions on “Real Time System – Implementing RT Operating Systems”.

1. What is the disadvantage of real addressing mode?
a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
d) restricted access to memory locations by processes

Answer: c
Clarification: None.

2. Preemptive, priority based scheduling guarantees ____________
a) hard real time functionality
b) soft real time functionality
c) protection of memory
d) none of the mentioned

Answer: b
Clarification: None.

3. Real time systems must have ____________
a) preemptive kernels
b) non preemptive kernels
c) preemptive kernels or non preemptive kernels
d) neither preemptive nor non preemptive kernels

Answer: a
Clarification: None.

4. What is Event latency?
a) the amount of time an event takes to occur from when the system started
b) the amount of time from the event occurrence till the system stops
c) the amount of time from event occurrence till the event crashes
d) the amount of time that elapses from when an event occurs to when it is serviced.

Answer: d
Clarification: None.

5. Interrupt latency refers to the period of time ____________
a) from the occurrence of an event to the arrival of an interrupt
b) from the occurrence of an event to the servicing of an interrupt
c) from arrival of an interrupt to the start of the interrupt service routine
d) none of the mentioned

Answer: c
Clarification: None.

6. Real time systems need to __________ the interrupt latency.
a) minimize
b) maximize
c) not bother about
d) none of the mentioned

Answer: a
Clarification: None.

7. The amount of time required for the scheduling dispatcher to stop one process and start another is known as ______________
a) event latency
b) interrupt latency
c) dispatch latency
d) context switch

Answer: c
Clarification: None.

8. The most effective technique to keep dispatch latency low is to ____________
a) provide non preemptive kernels
b) provide preemptive kernels
c) make it user programmed
d) run less number of processes at a time

Answer: b
Clarification: None.

9. Priority inversion is solved by use of _____________
a) priority inheritance protocol
b) two phase lock protocol
c) time protocol
d) all of the mentioned

Answer: a

250+ TOP MCQs on Linux and Answers

Operating System Multiple Choice Questions on “Linux”.

1. Linux uses a time-sharing algorithm ___________
a) to pair preemptive scheduling between multiple processes
b) for tasks where absolute priorities are more important than fairness
c) all of the mentioned
d) none of the mentioned

Answer: a
Clarification: None.

2. The first linux kernel which supports the SMP hardware?
a) linux 0.1
b) linux 1.0
c) linux 1.2
d) linux 2.0

Answer: d
Clarification: None.

3. Which one of the following linux file system does not support journaling feature?
a) ext2
b) ext3
c) ext4
d) none of the mentioned

Answer: a
Clarification: None.

4. Which binary format is supported by linux?
a) a.out
b) elf
c) both a.out and ELF
d) none of the mentioned

Answer: c
Clarification: None.

5. Which one of the following bootloader is not used by linux?
a) GRUB
b) LILO
c) NTLDR
d) None of the mentioned

Answer: c
Clarification: None.

6. The first process launched by the linux kernel is ___________
a) init process
b) zombie process
c) batch process
d) boot process

Answer: a
Clarification: None.

7. Which desktop environment is not used in any linux distribution?
a) gnome
b) kde
c) unity
d) none of the mentioned

Answer: d
Clarification: None.

8. Standard set of functions through which interacts with kernel is defined by ___________
a) system libraries
b) kernel code
c) compilers
d) utility programs

Answer: a
Clarification: None.

9. What is Linux?
a) single user, single tasking
b) single user, multitasking
c) multi user, single tasking
d) multi user, multitasking

Answer: d
Clarification: None.

10. Which one of the following is not a linux distribution?
a) debian
b) gentoo
c) open SUSE
d) multics

Answer: d

250+ TOP MCQs on File System Interface Access Methods and Answers

Operating System Multiple Choice Questions on “File System Interface Access Methods”.

1. Data cannot be written to secondary storage unless written within a ______
a) file
b) swap space
c) directory
d) text format

Answer: a

2. File attributes consist of ____________
a) name
b) type
c) identifier
d) all of the mentioned

Answer: d

3. The information about all files is kept in ____________
a) swap space
b) operating system
c) seperate directory structure
d) none of the mentioned

Answer: c

4. A file is a/an _______ data type.
a) abstract
b) primitive
c) public
d) private

Answer: a

5. The operating system keeps a small table containing information about all open files called ____________
a) system table
b) open-file table
c) file table
d) directory table

Answer: b
Clarification: None.

6. In UNIX, what will the open system call return?
a) pointer to the entry in the open file table
b) pointer to the entry in the system wide table
c) a file to the process calling it
d) none of the mentioned

Answer: a
Clarification: None.

7. System wide table in UNIX contains process independent information such as ____________
a) location of file on disk
b) access dates
c) file size
d) all of the mentioned

Answer: d
Clarification: None.

8. The open file table has a/an _______ associated with each file.
a) file content
b) file permission
c) open count
d) close count

Answer: c
Clarification: open count indicates the number of processes that have the file open.

9. Which of the following are the two parts of the file name?
a) name & identifier
b) identifier & type
c) extension & name
d) type & extension

Answer: c

250+ TOP MCQs on Disk Management and Answers

Operating System Multiple Choice Questions on “Disk Management”.

1. The process of dividing a disk into sectors that the disk controller can read and write, before a disk can store data is known as ____________
a) partitioning
b) swap space creation
c) low-level formatting
d) none of the mentioned

Answer: c
Clarification: None.

2. The data structure for a sector typically contains ____________
a) header
b) data area
c) trailer
d) all of the mentioned

Answer: d
Clarification: None.

3. The header and trailer of a sector contain information used by the disk controller such as _________ and _________
a) main section & disk identifier
b) error correcting codes (ECC) & sector number
c) sector number & main section
d) disk identifier & sector number

Answer: b
Clarification: None.

4. The two steps the operating system takes to use a disk to hold its files are _______ and ________
a) partitioning & logical formatting
b) swap space creation & caching
c) caching & logical formatting
d) logical formatting & swap space creation

Answer: a
Clarification: None.

5. The _______ program initializes all aspects of the system, from CPU registers to device controllers and the contents of main memory, and then starts the operating system.
a) main
b) bootloader
c) bootstrap
d) rom

Answer: c
Clarification: None.

6. For most computers, the bootstrap is stored in ________
a) RAM
b) ROM
c) Cache
d) Tertiary storage

Answer: b
Clarification: None.

7. A disk that has a boot partition is called a _________
a) start disk
b) end disk
c) boot disk
d) all of the mentioned

Answer: c
Clarification: None.

8. Defective sectors on disks are often known as __________
a) good blocks
b) destroyed blocks
c) bad blocks
d) none of the mentioned

Answer: c
Clarification: None.

9. In SCSI disks used in high end PCs, the controller maintains a list of _________ on the disk. The disk is initialized during ________ formatting which sets aside spare sectors not visible to the operating system.
a) destroyed blocks, high level formatting
b) bad blocks, partitioning
c) bad blocks, low level formatting
d) destroyed blocks, partitioning

Answer: c
Clarification: None.

10. The scheme used in the above question is known as _______ or ________
a) sector sparing & forwarding
b) forwarding & sector utilization
c) backwarding & forwarding
d) sector utilization & backwarding

Answer: a
Clarification: None.

11. An unrecoverable error is known as _________
a) hard error
b) tough error
c) soft error
d) none of the mentioned

Answer: a

250+ TOP MCQs on Distributed File System and Answers

Operating System Multiple Choice Questions on “Distributed File System”.

1. The file once created can not be changed is called ___________
a) immutable file
b) mutex file
c) mutable file
d) none of the mentioned

Answer: a

2. ______ of the distributed file system are dispersed among various machines of distributed system.
a) Clients
b) Servers
c) Storage devices
d) All of the mentioned

Answer: d

3. _______ is not possible in distributed file system.
a) File replication
b) Migration
c) Client interface
d) Remote access

Answer: b

4. Which one of the following hides the location where in the network the file is stored?
a) transparent distributed file system
b) hidden distributed file system
c) escaped distribution file system
d) spy distributed file system

Answer: a

5. In a distributed file system, when a file’s physical storage location changes ___________
a) file name need to be changed
b) file name need not to be changed
c) file’s host name need to be changed
d) file’s local name need to be changed

Answer: b
Clarification: None.

6. In a distributed file system, _______ is mapping between logical and physical objects.
a) client interfacing
b) naming
c) migration
d) heterogeneity

Answer: b
Clarification: None.

7. In a distributed file system, a file is uniquely identified by ___________
a) host name
b) local name
c) the combination of host name and local name
d) none of the mentioned

Answer: c
Clarification: None.

8. There is no need to establish and terminate a connection through open and close operation in ___________
a) stateless file service
b) stateful file service
c) both stateless and stateful file service
d) none of the mentioned

Answer: a
Clarification: None.

9. In distributed file system, file name does not reveal the file’s ___________
a) local name
b) physical storage location
c) both local name and physical storage location
d) none of the mentioned

Answer: b
Clarification: None.

10. Which one of the following is a distributed file system?
a) andrew file system
b) network file system
c) novel network
d) all of the mentioned

Answer: d