Operating System MCQ Set 1
1. A thread is also called :
a) Light Weight Process(LWP)
b) Heavy Weight Process(HWP)
c) Process
d) None of the mentioned
Answer
Answer: a [Reason:] None.
2. A thread shares its resources(like data section, code section, open files, signals) with :
a) other process similar to the one that the thread belongs to
b) other threads that belong to similar processes
c) other threads that belong to the same process
d) all of the mentioned
Answer
Answer: c [Reason:] None.
3. A heavy weight process :
a) has multiple threads of execution
b) has a single thread of execution
c) can have multiple or a single thread for execution
d) none of the mentioned
Answer
Answer: b [Reason:] None.
4. A process having multiple threads of control implies :
a) it can do more than one task at a time
b) it can do only one task at a time, but much faster
c) it has to use only one thread per process
d) none of the mentioned
Answer
Answer: a [Reason:] None.
5. Multithreading an interactive program will increase responsiveness to the user by :
a) continuing to run even if a part of it is blocked
b) waiting for one part to finish before the other begins
c) asking the user to decide the order of multithreading
d) none of the mentioned
Answer
Answer: a [Reason:] None.
6. Resource sharing helps :
a) share the memory and resources of the process to which the threads belong
b) an application have several different threads of activity all within the same address space
c) reduce the address space that a process could potentially use
d) all of the mentioned
Answer
Answer: d [Reason:] None.
7. Multithreading on a multi – CPU machine :
a) decreases concurrency
b) increases concurrency
c) doesnt affect the concurrency
d) can increase or decrease the concurrency
Answer
Answer: b [Reason:] None.
8. The kernel is _______ of user threads.
a) a part of
b) the creator of
c) unaware of
d) aware of
Answer
Answer: c [Reason:] None.
9. If the kernel is single threaded, then any user level thread performing a blocking system call will :
a) cause the entire process to run along with the other threads
b) cause the thread to block with the other threads running
c) cause the entire process to block even if the other threads are available to run
d) none of the mentioned
Answer
Answer: c [Reason:] None.
10. Because the kernel thread management is done by the Operating System itself :
a) kernel threads are faster to create than user threads
b) kernel threads are slower to create than user threads
c) kernel threads are easier to manage as well as create then user threads
d) none of the mentioned
Answer
Answer: b [Reason:] None.
11. If a kernel thread performs a blocking system call, ______
a) the kernel can schedule another thread in the application for execution
b) the kernel cannot schedule another thread in the same application for execution
c) the kernel must schedule another thread of a different application for execution
d) the kernel must schedule another thread of the same application on a different processor
Answer
Answer: a [Reason:] None.
12. Which of the following is FALSE ?
a) Context switch time is longer for kernel level threads than for user level threads
b) User level threads do not need any hardware support
c) Related kernel level threads can be scheduled on different processors in a multiprocessor system
d) Blocking one kernel level thread blocks all other related threads
Answer
Answer: d [Reason:] None.
Operating System MCQ Set 2
1. Virtual memory allows :
a) execution of a process that may not be completely in memory
b) a program to be smaller than the physical memory
c) a program to be larger than the secondary storage
d) execution of a process without being in physical memory
Answer
Answer: a [Reason:] None.
2. The instruction being executed, must be in :
a) physical memory
b) logical memory
c) physical & logical memory
d) none of the mentioned
Answer
Answer: a [Reason:] None.
3. Error handler codes, to handle unusual errors are :
a) almost never executed
b) executed very often
c) executed periodically
d) none of the mentioned
Answer
Answer: a [Reason:] None.
4. The ability to execute a program that is only partially in memory has benefits like :
a) The amount of physical memory cannot put a constraint on the program
b) Programs for an extremely large virtual space can be created
c) Throughput increases
d) All of the mentioned
Answer
Answer: d [Reason:] None.
5. In virtual memory. the programmer ____ of overlays.
a) has to take care
b) does not have to take care
c) all of the mentioned
d) none of the mentioned
Answer
Answer: b [Reason:] None.
6. Virtual memory is normally implemented by ________
a) demand paging
b) buses
c) virtualization
d) all of the mentioned
Answer
Answer: a [Reason:] None.
7. Segment replacement algorithms are more complex than page replacement algorithms because :
a) Segments are better than pages
b) Pages are better than segments
c) Segments have variable sizes
d) Segments have fixed sizes
Answer
Answer: c [Reason:] None.
8. A swapper manipulates _____ whereas the pager is concerned with individual _______ of a process.
a) the entire process, parts
b) all the pages of a process, segments
c) the entire process, pages
d) none of the mentioned
Answer
Answer: c [Reason:] None.
9. Using a pager :
a) increases the swap time
b) decreases the swap time
c) decreases the swap time &amount of physical memory needed
d) increases the amount of physical memory needed
Answer
Answer: c [Reason:] None.
10. The valid – invalid bit, in this case, when valid indicates :
a) the page is not legal
b) the page is illegal
c) the page is in memory
d) the page is not in memory
Answer
Answer: c [Reason:] None.
11. A page fault occurs when :
a) a page gives inconsistent data
b) a page cannot be accesses due to its absence from memory
c) a page is invisible
d) all of the mentioned
Answer
Answer: b [Reason:] None.
12. When a page fault occurs, the state of the interrupted process is :
a) disrupted
b) invalid
c) saved
d) none of the mentioned
Answer
Answer: c [Reason:] None.
13. When a process begins execution with no pages in memory :
a) process execution becomes impossible
b) a page fault occurs for every page brought into memory
c) process causes system crash
d) none of the mentioned
Answer
Answer: b [Reason:] None.
14. If the memory access time is denoted by ‘ma’ and ‘p’ is the probability of a page fault (0 <= p <= 1). Then the effective access time for a demand paged memory is :
a) p x ma + (1-p) x page fault time
b) ma + page fault time
c) (1-p) x ma + p x page fault time
d) none of the mentioned
Answer
Answer: c [Reason:] None.
15. When the page fault rate is low :
a) the turnaround time increases
b) the effective access time increases
c) the effective access time decreases
d) turnaround time & effective access time increases
Answer
Answer: c [Reason:] None.
16. Locality of reference implies that the page reference being made by a process :
a) will always be to the page used in the previous page reference
b) is likely to be one of the pages used in the last few page references
c) will always be one of the pages existing in memory
d) will always lead to page faults
Answer
Answer: b [Reason:] None.
Operating System MCQ Set 3
1. The minimum number of frames to be allocated to a process is decided by the :
a) the amount of available physical memory
b) operating System
c) instruction set architecture
d) none of the mentioned
Answer
Answer: c [Reason:] None.
2. When a page fault occurs before an executing instruction is complete :
a) the instruction must be restarted
b) the instruction must be ignored
c) the instruction must be completed ignoring the page fault
d) none of the mentioned
Answer
Answer: a [Reason:] None.
3. Consider a machine in which all memory reference instructions have only one memory address, for them we need atleast _____ frame(s).
a) one
b) two
c) three
d) none of the mentioned
Answer
Answer: b [Reason:] Atleast one frame for the instruction and one for the memory reference.
4. The maximum number of frames per process is defined by :
a) the amount of available physical memory
b) operating System
c) instruction set architecture
d) none of the mentioned
Answer
Answer: a [Reason:] None.
5. The algorithm in which we split m frames among n processes, to give everyone an equal share, m/n frames is known as :
a) proportional allocation algorithm
b) equal allocation algorithm
c) split allocation algorithm
d) none of the mentioned
Answer
Answer: b [Reason:] None.
6. The algorithm in which we allocate memory to each process according to its size is known as :
a) proportional allocation algorithm
b) equal allocation algorithm
c) split allocation algorithm
d) none of the mentioned
Answer
Answer: a [Reason:] None.
7. With either equal or proportional algorithm, a high priority process is treated _____ a low priority process.
a) greater than
b) same as
c) lesser than
d) none of the mentioned
Answer
Answer: b [Reason:] None.
8. ___ replacement allows a process to select a replacement frame from the set of all frames, even if the frame is currently allocated to some other process.
a) Local
b) Universal
c) Global
d) Public
Answer
Answer: c [Reason:] None.
9. ___ replacement allows each process to only select from its own set of allocated frames.
a) Local
b) Universal
c) Global
d) Public
Answer
Answer: a [Reason:] None.
10. One problem with the global replacement algorithm is that :
a) it is very expensive
b) many frames can be allocated to a process
c) only a few frames can be allocated to a process
d) a process cannot control its own page – fault rate
Answer
Answer: d [Reason:] None.
11. ________ replacement generally results in greater system throughput.
a) Local
b) Global
c) Universal
d) Public
Answer
Answer: b [Reason:] None.
Operating System MCQ Set 4
1. Which of the following page replacement algorithms suffers from Belady’s Anomaly ?
a) Optimal replacement
b) LRU
c) FIFO
d) Both optimal replacement and FIFO
Answer
Answer: c [Reason:] None.
2. A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement algorithm is FIFO, the number of page transfers with an empty internal store of 3 frames is :
a) 8
b) 10
c) 9
d) 7
Answer
Answer: c [Reason:] None.
3. In question 2, if the number of page frames is increased to 4, then the number of page transfers :
a) decreases
b) increases
c) remains the same
d) none of the mentioned
Answer
Answer: b [Reason:] None.
4. A memory page containing a heavily used variable that was initialized very early and is in constant use is removed, then the page replacement algorithm used is :
a) LRU
b) LFU
c) FIFO
d) None of the mentioned
Answer
Answer: c [Reason:] None.
5. A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements :
P : Increasing the number of page frames allocated to a process sometimes increases the page fault rate
Q : Some programs do not exhibit locality of reference
Which of the following is TRUE?
a) Both P and Q are true, and Q is the reason for P
b) Both P and Q are true, but Q is not the reason for P
c) P is false but Q is true
d) Both P and Q are false
Answer
Answer: c [Reason:] None.
6. Users _______ that their processes are running on a paged system.
a) are aware
b) are unaware
c) may unaware
c) none of the mentioned
Answer
Answer: b [Reason:] None.
7. If no frames are free, _____ page transfer(s) is/are required.
a) one
b) two
c) three
d) four
Answer
Answer: b [Reason:] None.
8. When a page is selected for replacement, and its modify bit is set :
a) the page is clean
b) the page has been modified since it was read in from the disk
c) the page is dirty
d) the page has been modified since it was read in from the disk & page is dirty
Answer
Answer: d [Reason:] None.
9. The aim of creating page replacement algorithms is to :
a) replace pages faster
b) increase the page fault rate
c) decrease the page fault rate
d) to allocate multiple pages to processes
Answer
Answer: c [Reason:] None.
10. A FIFO replacement algorithm associates with each page the _______
a) time it was brought into memory
b) size of the page in memory
c) page after and before it
d) all of the mentioned
Answer
Answer: a [Reason:] None.
11. Optimal page – replacement algorithm is :
a) Replace the page that has not been used for a long time
b) Replace the page that has been used for a long time
c) Replace the page that will not be used for a long time
d) None of the mentioned
Answer
Answer: c [Reason:] None.
12. Optimal page – replacement algorithm is difficult to implement, because :
a) it requires a lot of information
b) it requires future knowledge of the reference string
c) it is too complex
d) it is extremely expensive
Answer
Answer: b [Reason:] None.
13. LRU page – replacement algorithm associates with each page the ______
a) time it was brought into memory
b) the time of that page’s last use
c) page after and before it
d) all of the mentioned
Answer
Answer: b [Reason:] None.
14. For 3 page frames, the following is the reference string :
7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1
How many page faults does the LRU page replacement algorithm produce ?
a) 10
b) 15
c) 11
d) 12
Answer
Answer: d [Reason:] None.
15. The two methods how LRU page replacement policy can be implemented in hardware are:
a) Counters
b) RAM & Registers
c) Stack & Counters
d) Registers
Answer
Answer: c [Reason:] None.
Operating System MCQ Set 5
1. When using counters to implement LRU, we replace the page with the :
a) smallest time value
b) largest time value
c) greatest size
d) none of the mentioned
Answer
Answer: a [Reason:] Whenever a reference to a page is made, the contents of the clock register are copied into the time-of-use field in the page-table entry for that page. In this way we always have the time of the last reference to each page.
2. In the stack implementation of the LRU algorithm, a stack can be maintained in a manner :
a) whenever a page is used, it is removed from the stack and put on bottom
b) the bottom of the stack is the LRU page
c) the top of the stack contains the LRU page and all new pages are added to the top
d) none of the mentioned
Answer
Answer: b [Reason:] None.
3. There is a set of page replacement algorithms that can never exhibit Belady’s Anomaly, called :
a) queue algorithms
b) stack algorithms
c) string algorithms
d) none of the mentioned
Answer
Answer: b [Reason:] None.
4. Applying the LRU page replacement to the following reference string :
1 2 4 5 2 1 2 4
The main memory can accommodate 3 pages and it already has pages 1 and 2. Page 1 came in before page 2.
How many page faults will occur ?
a) 2
b) 3
c) 4
d) 5
Answer
Answer: c [Reason:] None.
5. Increasing the RAM of a computer typically improves performance because:
a) Virtual memory increases
b) Larger RAMs are faster
c) Fewer page faults occur
d) None of the mentioned
Answer
Answer: c [Reason:] None.
6. The essential content(s) in each entry of a page table is / are :
a) Virtual page number
b) Page frame number
c) Both virtual page number and page frame number
d) Access right information
Answer
Answer: b [Reason:] None.
7. The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by :
a) the instruction set architecture
b) page size
c) physical memory size
d) number of processes in memory
Answer
Answer: a [Reason:] None.
8. The reason for using the LFU page replacement algorithm is :
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer
Answer: a [Reason:] None.
9. The reason for using the MFU page replacement algorithm is :
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer
Answer: b [Reason:] None.
10. The implementation of the LFU and the MFU algorithm is very uncommon because :
a) they are too complicated
b) they are optimal
c) they are expensive
d) all of the mentioned
Answer
Answer: c [Reason:] None.