Friday, April 24, 2020

Operating systems multiple choice questions for exams - Set 15

Operating systems exams - multiple choice questions (MCQ) and answers



Operating Systems MCQ questions and answers – Set 15

1. Which of the following instructions should be privileged?

(a) Disable interrupts
(b) Read the real-time clock
(c) Switch from user mode to kernel mode
(d) Switch from kernel mode to user mode

View Answer

Answer: (a) Disable interrupts and (c) Switch from user to kernel mode   

Disable interrupts should be privileged, otherwise a process could grab and hold the processor.

Switch from user mode to kernel mode, otherwise a process can enter kernel mode at any time.


2. Which of the following should be found in a Process Control Block (PCB)?

(a) Process state
(b) Accounting information
(c) Open files
(d) All of the above

View Answer

Answer: (d) All of the above        

Process Control Block (PCB)

A process control block (PCB) is a data structure used by computer operating systems to store all the information about a process. It is also known as a process descriptor.
PCB contains various information regarding a process;
  • Process state (new, ready, running, waiting, dead)
  • Accounting information (amount of CPU used for process execution, time limits, execution ID)
  • Open files list (list of files opened for a process)
  • Process ID (identification number of the process)
  • CPU Registers
  • Memory limits (memory management information) etc.

3. Which of the following is a property of a hard real-time system?
(a) Critical real-time tasks get priority over other tasks and retain that priority until execution time has been completed.
(b) Lack deadline support
(c) Easily support advanced operating system features
(d) Guarantees that critical tasks are completed on time

View Answer

Answer: (d) Guarantees that critical tasks are completed on time    
.

4. What is the average waiting time using the SJF scheduling algorithm given that process P1 through P3 have burst times of 20ms, 10ms, and 35ms respectively?
(a) 10 ms
(b) 13.3 ms
(c) 21.6 ms
(d) 35 ms

View Answer

Answer: (b) 13.3 ms     
The shortest job is P2 with 10 ms burst time, the next shortest is P1 with 20 ms and the next one is P3 with 35 ms. The processor with shortest burst time will gets turn first.
The Gantt chart for the given schedule is;
Average waiting time = (0+10+30)/3 = 40/3 = 13.3.

5. What is the average waiting time using the FCFS scheduling algorithm given that process P1 through P3 have burst times of 12ms, 3ms, and 6ms respectively?
(a) 7 ms
(b) 4 ms
(c) 9 ms
(d) 8 ms

View Answer

Answer: (c) 9 ms           
The Gantt chart for the given schedule is;
Average waiting time = (0+12+15)/3 = 9.


*********

Related links:




OS Interview questions with answers

solved Interview questions in operating systems

GATE questions in operating systems

MCQ Interview questions in OS

Operating systems interview questions for competitive exams

objective type OS questions for IIT JEE entrance exam


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

data recovery