✔ Scroll down and test yourself — answers are hidden under the “View Answer” button.
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
Click here to view answer and explanation
Ans : (a) and (c)
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
Click here to view answer and explanation
Ans : (d)
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)
- 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
Click here to view answer and explanation
Ans : (d)
Answer: (d) Guarantees
that critical tasks are completed on time
.
What is a Hard Real-Time System?
A hard real-time system is one in which meeting deadlines is
absolutely mandatory. If a critical task misses its deadline,
the result can be system failure, catastrophic damage, or loss of life.
Key Idea
👉 The correctness of the system depends not only on what result
is produced, but also on when it is produced.
Examples
- Aircraft control systems
- Pacemakers
- Anti-lock braking systems (ABS)
- Nuclear reactor control systems
Correct Answer
Guarantees that critical tasks are completed on time
This is exactly the defining property of a hard real-time system.
Missing a deadline is not acceptable.
|
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
Click here to view answer and explanation
Ans : (b)
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
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