Os Mcq's - 100
Os Mcq's - 100
Os Mcq's - 100
Answer:b
Explanation:None.
3. If a process is executing in its critical section, then no other processes can be executing in their critical section.
This condition is called
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
View Answer
Answer:a
Explanation:None.
4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
View Answer
Answer:c
Explanation:None.
5. A semaphore is a shared integer variable
a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one
d) that can not be more than one
View Answer
Answer:a
Explanation:None.
9. A monitor is a module that encapsulates
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned
View Answer
Answer:d
Explanation:None.
10. To enable a process to wait within the monitor,
a) a condition variable must be declared as condition
b) condition variables must be used as boolean objects
c) semaphore must be used
d) all of the mentioned
View Answer
Answer:a
Explanation:None.
1) Round robin scheduling falls under the category of :
a) Non preemptive scheduling
b) Preemptive scheduling
c) None of these
View Answer
Answer: b
Explanation: None.
2) With round robin scheduling algorithm in a time shared system,
a) using very large time slices converts it into First come First served scheduling algorithm
b) using very small time slices converts it into First come First served scheduling algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm
View Answer
Answer: a
Explanation: All the processes will be able to get completed.
3) The portion of the process scheduler in an operating system that dispatches processes is concerned with :
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) All of these
View Answer
Answer: a
Explanation: None.
5) The FIFO algorithm :
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs
View Answer
Answer: b
Explanation: None.
6) The strategy of making processes that are logically runnable to be temporarily suspended is called :
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served
View Answer
Answer: b
Explanation: None.
7) Scheduling is :
a) allowing a job to use the processor
b) making proper use of processor
c) Both a and b
d) None of these
View Answer
Answer: c
Explanation: None.
8) There are 10 different processes running on a workstation. Idle processes are waiting for an input event in the
input queue. Busy processes are scheduled with the Round-Robin timesharing method. Which out of the following
quantum times is the best value for small response times, if the processes have a short runtime, e.g. less than 10ms ?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms
View Answer
Answer: a
Explanation: None.
9) Orders are processed in the sequence they arrive if _______ rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio
View Answer
Answer: c
Explanation: None.
10) Which of the following algorithms tends to minimize the process flow time ?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
View Answer
Answer: b
Explanation: None.
11) Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly
___________.
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
View Answer
Answer: b
Explanation: None.
12) Which of the following statements are true ? (GATE 2010)
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
a) I only
b) I and III only
c) II and III only
d) I, II and III
View Answer
Answer: d
Explanation:
I) Shortest remaining time first scheduling is a preemptive version of shortest job scheduling. It may cause
starvation as shorter processes may keep coming and a long CPU burst process never gets CPU.
II) Preemption may cause starvation. If priority based scheduling with preemption is used, then a low priority
process may never get CPU.
III) Round Robin Scheduling improves response time as all processes get CPU after a specified time.
1) Concurrent access to shared data may result in :
a) data consistency
b) data insecurity
c) data inconsistency
d) None of these
View Answer
Answer: c
Explanation: None.
3) The segment of code in which the process may change common variables, update tables, write into files is known
as :
a) program
b) critical section
c) non critical section
d) synchronizing
View Answer
Answer: b
Explanation: None.
4) The following three conditions must be satisfied to solve the critical section problem : (choose three)
a) Aging
b) Mutual Exclusion
c) Deadlock
d) Progress
e) Bounded Waiting
View Answer
Answer: a and d
Explanation: None.
5) Spinlocks are :
a) CPU cycles wasting locks over critical sections of programs
b) locks that avoid time wastage in context switches
c) locks that work better on multiprocessor systems
d) All of these
View Answer
Answer: d
Explanation: None.
9) If the semaphore value is negative :
a) its magnitude is the number of processes waiting on that semaphore
b) it is invalid
c) no operation can be further performed on it until the signal operation is performed on it
d) None of these
View Answer
Answer: a
2) In the bounded buffer problem, there are the empty and full semaphores that :
a) count the number of empty and full buffers
b) count the number of empty and full memory spaces
c) count the number of empty and full queues
d) None of these
View Answer
Answer: a
Explanation: None.
3) In the bounded buffer problem :
a) there is only one buffer
b) there are n buffers ( n being greater than one but finite)
c) there are infinite buffers
d) the buffer size is bounded
View Answer
Answer: b
Explanation: None.
4) To ensure difficulties do not arise in the readers writers problem, _______ are given exclusive access to the
shared object.
a) readers
b) writers
c) None of these
View Answer
Answer: b
Explanation: None.
5) The dining philosophers problem will occur in case of :
a) 5 philosophers and 5 chopsticks
b) 4 philosophers and 5 chopsticks
c) 3 philosophers and 5 chopsticks
d) 6 philosophers and 5 chopsticks
View Answer
Answer: a
Explanation: None.
6) A deadlock free solution to the dining philosophers problem :
a) necessarily eliminates the possibility of starvation
b) does not necessarily eliminate the possibility of starvation
c) eliminates any possibility of any kind of problem further
d) None of these
View Answer
Answer: b
Explanation: None.
Operating System Questions & Answers Deadlock
This section of our 1000+ Operating System MCQs focuses on deadlock in Operating System.
1. What is the reusable resource?
a) that can be used by one process at a time and is not depleted by that use
b) that can be used by more than one process at a time
c) that can be shared between various threads
d) none of the mentioned
View Answer
Answer:a
Explanation:None.
2. Which of the following condition is required for deadlock to be possible?
a) mutual exclusion
b) a process may hold allocated resources while awaiting assignment of other resources
c) no resource can be forcibly removed from a process holding it
d) all of the mentioned
View Answer
Answer:d
Explanation:None.
3. A system is in the safe state if
a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) both (a) and (b)
d) aging
View Answer
Answer:b
Explanation:None.
9. Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?
a) resource allocation graph
b) starvation graph
c) inversion graph
d) none of the mentioned
View Answer
Answer:a
Explanation:None.
10. To avoid deadlock
a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used
View Answer
Answer:a
Explanation:None.
2) Given a priori information about the ________ number of resources of each type that maybe requested for each
process, it is possible to construct an algorithm that ensures that the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
View Answer
Answer: c
Explanation: None.
3) A deadlock avoidance algorithm dynamically examines the __________, to ensure that a circular wait condition
can never exist.
a) resource allocation state
b) system storage state
c) operating system
d) resources
View Answer
Answer: a
Explanation: Resource allocation states are used to maintain the availability of the already and current available
resources.
4) A state is safe, if :
a) the system does not crash due to deadlock occurrence
b) the system can allocate resources to each process in some order and still avoid a deadlock
c) the state keeps the system protected and safe
d) All of these
View Answer
Answer: b
Explanation: None.
5) A system is in a safe state only if there exists a :
a) safe allocation
b) safe resource
c) safe sequence
d) All of these
View Answer
Answer: c
Explanation: None.
6) All unsafe states are :
a) deadlocks
b) not deadlocks
c) fatal
d) None of these
View Answer
Answer: b
Explanation: None.
7) A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1
requires 4 and P2 requires 9 tape drives.
Process
P0
P1
P2
Maximum needs (process-wise : P0 through P2 top to bottom)
10
4
9
Currently allocated (process-wise)
5
2
2
Which of the following sequence is a safe sequence ?
a) P0, P1, P2
b) P1, P2, P0
c) P2, P0, P1
d) P1, P0, P2
View Answer
Answer: d
Explanation: None.
8) If no cycle exists in the resource allocation graph :
a) then the system will not be in a safe state
b) then the system will be in a safe state
c) either a or b
d) None of these
View Answer
Answer: b
Explanation: None
This section of our 1000+ Operating System MCQs focuses on memory management of Operating System.
1. CPU fetches the instruction from memory according to the value of
a) program counter
b) status register
c) instruction register
d) program status word
View Answer
Answer:a
Explanation:None.
2. A memory buffer used to accommodate a speed differential is called
a) stack pointer
b) cache
c) accumulator
d) disk buffer
View Answer
Answer:b
Explanation:None.
3. Which one of the following is the address generated by CPU?
a) physical address
b) absolute address
c) logical address
d) none of the mentioned
View Answer
Answer:c
Explanation:None.
4. Run time mapping from virtual to physical address is done by
a) memory management unit
b) CPU
c) PCI
d) none of the mentioned
View Answer
Answer:a
Explanation:None.
5. Memory management technique in which system stores and retrieves data from secondary storage for use in main
memory is called
a) fragmentation
b) paging
c) mapping
d) none of the mentioned
View Answer
Answer:b
Explanation:None.
6. The address of a page table in memory is pointed by
a) stack pointer
b) page table base register
c) page register
d) program counter
View Answer
Answer:b
Explanation:None.
7. Program always deals with
a) logical address
b) absolute address
c) physical address
d) relative address
View Answer
Answer:a
Explanation:None.
8. The page table contains
a) base address of each page in physical memory
b) page offset
c) page size
d) none of the mentioned
View Answer
Answer:a
Explanation:None.
9. What is compaction?
a) a technique for overcoming internal fragmentation
b) a paging technique
c) backing store
d) None of these
View Answer
Answer: a
Explanation: None.
2) Logical memory is broken into blocks of the same size called _________.
a) frames
b) pages
c) backing store
d) None of these
View Answer
Answer: b
Explanation: None.
3) Every address generated by the CPU is divided into two parts : (choose two)
a) frame bit
b) page number
c) page offset
d) frame offset
View Answer
Answer: b and c
Explanation: None.
4) The __________ is used as an index into the page table.
a) frame bit
b) page number
c) page offset
d) frame offset
View Answer
Answer: b
Explanation: None.
5) The _____ table contains the base address of each page in physical memory.
a) process
b) memory
c) page
d) frame
View Answer
Answer: c
Explanation: None.
1. Which one of the following is not a secondary storage?
a) magnetic disks
b) magnetic tapes
c) RAM
c) executable file
d) text file
View Answer
Answer:a
Explanation:None.
6. What is the mounting of file system?
a) crating of a filesystem
b) deleting a filesystem
c) attaching portion of the file system into a directory structure
d) removing portion of the file system into a directory structure
View Answer
Answer:c
Explanation:None.
7. Mapping of file is managed by
a) file metadata
b) page table
c) virtual memory
d) file system
View Answer
Answer:a
Explanation:None.
8. Mapping of network file system protocol to local file system is done by
a) network file system
b) local file system
c) volume manager
d) remote mirror
View Answer
Answer:a
Explanation:None.
9. Which one of the following explains the sequential file access method?
a) random access according to the given byte number
b) read bytes one at a time, in order
c) read/write sequentially by record
d) read/write randomly by record
View Answer
Answer:b
Explanation:None.
10. file system fragmentation occurs when
a) unused space or single file are not contiguous
b) used space is not contiguous
c) unused space is non-contiguous
3) The set of tracks that are at one arm position make up a ___________.
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders
View Answer
Answer : d
Explanation: None.
4) The time taken to move the disk arm to the desired cylinder is called the :
a) positioning time
b) random access time
c) seek time
d) rotational latency
View Answer
Answer : c
Explanation: None.
5) The time taken for the desired sector to rotate to the disk head is called :
a) positioning time
b) random access time
c) seek time
d) rotational latency
View Answer
Answer : d
Explanation: None.
1) Whenever a process needs I/O to or from a disk it issues a ______________.
a) system call to the CPU
b) system call to the operating system
c) a special procedure
d) All of these
View Answer
Answer : b
Explanation: None.
2) If a process needs I/O to or from a disk, and if the drive or controller is busy then :
a) the request will be placed in the queue of pending requests for that drive
b) the request will not be processed and will be ignored completely
c) the request will be not be placed
d) None of these
View Answer
Answer : a
Explanation: None.
d) None of these
View Answer
Answer: b
Explanation: None.
3) What is Domain ?
a) Domain = Set of all objects
b) It is a collection of protection policies
c) Domain= set of access-rights
d) None of these
View Answer
Answer: c
Explanation: None.
4) What does access matrix represent ?
a) Rows-Domains, Columns-Objects
b) Rows-Objects, Columns-Domains
c) Rows-Access List, Columns-Domains
d) Rows-Domains, Columns-Access list
View Answer
Answer: a
Explanation: None.
5) What are the three additional operations to change the contents of the access-matrix ?
a) Copy
b) Owner
c) Deny
d) control
View Answer
Answer: a,b and d
Explanation: None.
6) Who can add new rights and remove some rights ?
a) Copy
b) transfer
c) limited copy
d) owner
View Answer
Answer: d
Explanation: None.
7) What are the three copy rights ?
a) Copy
b) transfer
c) limited copy
d) owner
View Answer
Answer: a,b,c
Explanation: None.
8) Which two rights allow a process to change the entries in a column ?
a) copy and transfer
b) copy and owner
c) owner and transfer
d) deny and copy
View Answer
Answer: a
Explanation: None.
9) Which is an unsolvable problem in access-matrix ?
a) Owner override
b) brute force
c) Access denied
d) Confinement
View Answer
Answer: d
Explanation: None.
10) Which of the following objects require protection ?
a) CPU
b) Printers
c) Tape drives
d) Motherboard
View Answer
Answer: b & c
Explanation: None.
11) What is separation in security of Operating systems ?
a) To have separate login for different users
b) To have separate Hard disk drive/partition for different users
c) It means keeping one users objects separate from other users
d) None of these
View Answer
Answer: c
Explanation: None.
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) both (a) and (b)
d) boot process
View Answer
Answer:a
Explanation:None.
7. Which desktop environment is not used in any linux distribution?
a) gnome
b) KDE
c) unity
d) none of the mentioned
View Answer
Answer:d
Explanation: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
View Answer
Answer:a
Explanation:None.
9. Linux is
a) single user, single tasking
b) single user, multitasking
c) multiuser, single tasking
d) multiuser, multitasking
View Answer
Answer:d
Explanation:None.
10. Which one of the following is not a linux distribution?
a) debian
b) gentoo
c) open SUSE
d) multics
View Answer
Answer:d
Explanation:None.