Saturday, 11 April 2020

Operating systems interview quiz questions with answers

Operating Systems (OS) interview quiz questions with answers



Operating Systems Questions TRUE/FALSE with Answers – 11

1. In disk scheduling, the SSTF (shortest seek time first) algorithm can lead to starvation.

(a) TRUE                                                   (b) FALSE

Answer: TRUE.
This algorithm selects the request with minimum seek time from the current head position. That means the closest request will be serviced first. If new request arrives at the nearest head position continuously, then those requests which are far away will never serviced and they has to stay in a waiting state. Thus lead to starvation.

Disadvantages of SSTF

-- It may cause starvation for some requests.
-- Switching direction on the frequent basis slows the working of algorithm.
-- It is not an optimal algorithm


2. The more cache memory the machine has, better the performance it provides.

(a) TRUE                                                   (b) FALSE

Answer: TRUE.
Cache is a small memory which is a part of CPU and physically close to the CPU than Random Access Memory. It holds frequently used instructions or data which the processor may require next. Since cache is on the same chip as the processor and it can hold data for execution by the CPU, more cache memory leads to better performance.

In modern computers, cache size may vary from 1 – 2 MB (in L1 cache), 256 KB – 8 MB (in L2 cache), 4 – 40 MB (in L3 cache)



3. In OS memory management, page sizes are always power of 2.

(a) TRUE                                                   (b) FALSE

Answer: TRUE.
Paging is executed by breaking up an address into a page and offset number. It is most competent to break the address into X page bits and Y offset bits rather than perform arithmetic on the address to compute the page number and offset. For the reason that each bit position represents a power of 2 splitting an address between bits results in a page size that is a power of 2.


4. Switching among threads in the same process is more efficient than switching among processes.

(a) TRUE                                                   (b) FALSE

Answer: TRUE.
During the thread switch, the virtual memory space remains the same. During the process switch, it is not, which makes it expensive.
-- Process switching is context switching from one process to a different process. It involves switching out all of the process abstractions and resources in favor of those belonging to a new process. Most notably and expensively, this means switching the memory address space.
-- Thread switching is context switching from one thread to another in the same process. Thread switching is cheaper, as it involves switching out only the abstraction unique to threads: The processor state. The cost of thread-to-thread switching is about the same as the cost of entering and exiting the kernel. On systems such as Linux, that is very cheap.


5. Using mutual exclusion ensures that a system avoids deadlock.
(a) TRUE                                                   (b) FALSE

Answer: FALSE.

Mutual exclusion is one of the four conditions that cause deadlocks.

 


**********************
 



 







Operating systems interview questions

OS quiz questions with answers

Top 5 quiz questions in OS

Important TRUE/FALSE interview questions in operating systems with answers

Interview questions on memory management, disk scheduling, and process management

GATE questions solved 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