Wednesday, April 1, 2020

Operating systems true and false questions set 9

Operating systems TRUE / FALSE questions for competitive exams with answers justified



Operating Systems Quiz with Answers - 8


1. Threads within the same process share the same heap and stack.
(a) TRUE                                                   (b) FALSE
Answer: FALSE. Each Thread must have its own stack – whether or not it shares a process with another thread. [source: UCB]

2. A process makes a system call to read a packet from the network device, and blocks. The scheduler then context-switches this process out. This is an example of a voluntary context switch.
(a) TRUE                                                   (b) FALSE
Answer: TRUE. A voluntary context switch occurs when a thread blocks because it requires a resource that is unavailable. An involuntary context switch takes place when a thread executes for the duration of its time slice or when the system identifies a higher-priority thread to run. [source: IITB]

3. An operating system that implements on-demand paging on a machine with software TLB miss handling (such as MIPS) must use an inverted page table.
(a) TRUE                                                   (b) FALSE
Answer: FALSE. A machine with a software TLB can utilize any format of page table, since the page table walk is handled in software. [source: UCB]

4. If the banker's algorithm finds that it's safe to allocate a resource to an existing thread, then all threads will eventually complete.
(a) TRUE                                                   (b) FALSE
Answer: FALSE. The banker’s algorithm simply prevents resource-related deadlock. One of the threads could still go into an infinite loop and fail to complete. [source: UCB]

5. Periodically yielding the processor while spin waiting reduces the amount of wasted time to be proportional to the duration of a context-switch.
(a) TRUE                                                   (b) FALSE
Answer: TRUE. When this process yields because it can’t acquire the lock, the scheduler will pick another process to run (that hopefully has useful work to do), at the cost of a context-switch [source: Wisconsin]



*********


 

OS Interview questions with answers

solved Interview questions in operating systems

GATE questions in operating systems

TRUE/FALSE Interview questions in OS


No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents