RTOS MCQ's
RTOS MCQ's
Question 1:
Question 2:
Question 3:
c) A scenario where the task with the highest priority is not executing
d) A scenario where a high-priority task is delayed due to lower-priority tasks holding required
resources
Question 4:
d) A situation where tasks lose real-time constraints and deadlines are missed
Question 5:
Question 6:
Question 7:
Question 8:
b) Allocating a fixed amount of CPU time and resources for specific tasks
Question 9:
Question 11:
Question 12:
Question 13:
a) Tasks are unable to proceed due to waiting for resources held by other tasks
b) Tasks are not scheduled for execution, preventing them from executing
c) High-priority tasks always preempt low-priority tasks, preventing them from executing
Question 14:
Question 15:
Question 16:
Question 17:
Question 18:
Question 19:
Question 20:
d) Tasks are executed in a circular order, each task receiving equal time slices
Question 21:
Question 22:
Question 23:
What is the purpose of the "Priority Inheritance Protocol" in RTOS?
Question 24:
b) A semaphore with a maximum value greater than 1, allowing multiple tasks to access resources
concurrently
Question 25:
Question 26:
Question 27:
Question 28:
Question 29:
Question 30:
Question 31:
Question 33:
Question 34:
Question 35:
Question 36:
38. In Priority Scheduling, what happens if two processes have the same priority?
- A. Deadlock
- B. Starvation
- C. Thrashing
- D. Fragmentation
**Answer:** B. Starvation
40. **What is one way to address the problem of starvation in Priority Scheduling?**
41. **Which type of Priority Scheduling allows a process to be interrupted by a higher priority
process?**
- C. Round-robin Scheduling
42. **In Priority Scheduling, what is generally assigned to a higher priority process?**
**Answer:** B. It can lead to higher average waiting time for low-priority processes.
44. **How does Priority Scheduling determine the order of process execution?**
- A. By assigning a priority level to each process and executing higher priority processes first.
- B. By assigning a time slice to each process and cycling through them.
**Answer:** A. By assigning a priority level to each process and executing higher priority processes
first.
45. **Which scheduling algorithm can be combined with Priority Scheduling to prevent starvation?
**
- B. Round-robin (RR)
- B. Memory requirements
- C. Process ID
- D. User-defined criteria
A. Hybrid kernel
B. Monolithic kernel
C. Mini kernel
D. Microkernel
Answer: D Microkernel
B. Monolithic kernel
C. Mini kernel
D. Microkernel
49. **Which of the following best describes Rate Monotonic Scheduling (RMS)?**
50. **In Rate Monotonic Scheduling, how is the priority of a task determined?**
51. **What type of tasks is Rate Monotonic Scheduling most suitable for?**
- A. Non-periodic tasks
- B. Periodic tasks
- C. Sporadic tasks
- D. Real-time tasks
53. **In Rate Monotonic Scheduling, if a new task with a shorter period is introduced, what happens
to the existing tasks?**
54. **What is the utilization bound for Rate Monotonic Scheduling for two tasks?**
- A. 50%
- B. 68.3%
- C. 75%
- D. 100%
**Answer:** C. 75%
55. **What happens if the CPU utilization exceeds the Rate Monotonic Scheduling bound?**
57. **Rate Monotonic Scheduling can be used for tasks with which type of execution times?**
58. **What is the key difference between Rate Monotonic Scheduling and Earliest Deadline First
(EDF) scheduling?**
- D. RMS guarantees that all tasks will meet their deadlines, while EDF does not.
Answer: B) A situation where a lower-priority task holds a resource needed by a higher-priority task.
- B) Deadlock.
Answer: B) Deadlock.
62. In priority inheritance protocol, what happens when a low-priority task acquires a resource held
by a high-priority task?
63. Which of the following best describes the scenario where priority inversion occurs?
64. What is the primary criterion used by the Earliest Deadline First (EDF) scheduling algorithm to
select the next task to execute?
65. In the context of EDF scheduling, what happens when two tasks have the same deadline?
A) The task with the shorter burst time is executed first.
B) The task with the higher priority is executed first.
C) The task that arrived first is executed first.
D) The task that arrived last is executed first.
66. What is a major advantage of the Earliest Deadline First (EDF) algorithm?
A) It is simple to implement.
B) It minimizes context switching.
C) It guarantees meeting all deadlines if the system is not overloaded.
D) It is fair to all tasks.
A) Batch processing
B) Real-time systems
C) Interactive systems
D) Multiprogramming systems
68. In EDF scheduling, if a new task arrives with a deadline earlier than the currently running task,
what action is taken?
Answer: C) The current task is preempted and the new task starts executing.
A) Periodic tasks
B) Aperiodic tasks
C) Both periodic and aperiodic tasks
D) Sporadic tasks
Answer: C) Both periodic and aperiodic tasks
72. Which of the following is true about the Earliest Deadline First (EDF) scheduling?
73. Which of the following best describes the EDF algorithm's performance in a lightly loaded
system?
74. Which Scheduling algorithm schedules periodic task using a static priority with pre-emption?
A) Priority Driven
B) First come First Serve
C) EDF
D) Rate Monotonic
75. Which of the following statements is true about real time task switching.
A: As the number of tasks increase in an RTOS, the task switching time decreases
B: As the number of tasks increase in an RTOS, the task switching time remains constant
C: As the number of tasks increase in an RTOS, the task switching time increases
D: The task switching time is not measurable
Answer: B
A. Throughput
B. Interrupt Recovery Time
C. Interrupt Response Time
D. Interrupt Latency
Answer A
Interrupt Recovery Time: Ensures the system can quickly resume normal operations after
handling an interrupt.
Interrupt Response Time: Measures how quickly the system can start processing an interrupt.
Interrupt Latency: Reflects the efficiency of the system in recognizing and beginning to handle
interrupts.
A. preemptive kernels
B. neither preemptive nor non-preemptive kernels
C. non-preemptive kernels
D. preemptive kernels or non-preemptive kernels
Response: A
Explanation: Real-time systems often use preemptive kernels to ensure that high-priority tasks can
interrupt lower-priority tasks, allowing the system to respond to critical events in a timely manner.
80. What is the state of the task which is neither running nor ready to run?
A. ISR
B. Idle
C. Dormant
D. Preempted
Response: C
Explanation: A task that is neither running nor ready to run is typically in a dormant state, meaning it
is inactive and not scheduled for execution.
A. GPOS
B. IOS
C. RTOS & Embedded OS
D. Windows
Response: C
Explanation: Real-Time Operating Systems (RTOS) and Embedded Operating Systems are designed
to be small and efficient, often with a minimal memory footprint, compared to General Purpose
Operating Systems (GPOS) like Windows or iOS.
82. If jobs have unpredictable release times, then the jobs are called
A. Regular
B. Aperiodic
C. Periodic
D. Sporadic
Response: B
Explanation: Sporadic jobs are those that have unpredictable release times. They may occur
irregularly and infrequently, unlike periodic jobs which have regular and predictable release times.
Aperiodic Tasks
Definition: Aperiodic tasks are those that do not have regular or predictable intervals between
executions. They are triggered by events that occur irregularly and cannot be forecasted with
certainty.
Characteristics:
Example: An emergency alert system that triggers a task whenever a critical condition is detected by
a sensor.
Periodic Tasks
Definition: Periodic tasks are those that occur at regular, predictable intervals. They have a fixed
period, which is the time between successive activations of the task.
Characteristics:
Executed at consistent and predictable times.
Easier to schedule because their execution times are known in advance.
Often used for tasks that need to run continuously or at set intervals, ensuring consistent
performance.
Example: A task that reads temperature data from a sensor every second.
Sporadic Tasks
Definition: Sporadic tasks are those that occur irregularly but have a minimum inter-arrival time,
meaning there is a guaranteed minimum amount of time between two successive activations of the
task. While their occurrences are not as regular as periodic tasks, they are not entirely unpredictable
like aperiodic tasks.
Characteristics:
Example: A task that handles network packet transmissions where packets arrive sporadically but
not more frequently than once every 100 milliseconds.
Differences
Summary
The release time of tasks refers to the point in time when a task becomes ready to execute. Here's
a detailed look at the release times of aperiodic, periodic, and sporadic tasks:
Aperiodic Tasks
Release Time: The release times of aperiodic tasks are irregular and unpredictable. They are typically
triggered by external events or conditions that do not follow a fixed pattern.
Characteristics:
Periodic Tasks
Release Time: The release times of periodic tasks are regular and predictable. They occur at fixed
intervals, known as the period of the task.
Characteristics:
Sporadic Tasks
Release Time: The release times of sporadic tasks are irregular but with a minimum inter-arrival time
between successive releases. This means there is a guaranteed minimum amount of time between
two releases, providing some predictability.
Characteristics:
Release times are not fixed but occur with a known minimum interval.
Provides a balance between the unpredictability of aperiodic tasks and the regularity of
periodic tasks.
Example: A task that handles incoming network packets, where packets arrive sporadically
but not more frequently than once every 100 milliseconds.
Aperiodic tasks: Release times are driven by external events, making them highly
unpredictable.
Periodic tasks: Release times occur at regular, fixed intervals, making them highly
predictable and easy to schedule.
Sporadic tasks: Release times are irregular but constrained by a minimum inter-arrival time,
offering a balance between predictability and flexibility.
Response: B
Explanation: Interrupt latency is the time taken from the arrival of an interrupt signal to the start of
the interrupt service routine (ISR). It measures how quickly the system can begin processing the
interrupt after it is generated.
Answer: A
93. If an interrupted task returns to a new task after the interrupt, that kernel is called
A. Non preemptive kernel
B. Preemptive kernel
C. Foreground Background kernel
D. Round robin kernel
Correct Answer: B
94. Which of the following is a dynamic priority based scheduling algorithm
A. Rate monotonic
B. Earliest deadline first
C. round robin
D. None of the above
Correct Answer: B
95. Choose one of the disadvantages of the priority scheduling algorithm?
A. it schedules in a very complex manner
B. its scheduling takes up a lot of time
C. it can lead to some low priority process waiting indefinitely for the CPU
D. none of the mentioned
Correct Answer:C
95. In rate monotonic scheduling, a process with a shorter period is assigned __________
A. a higher priority
B. a lower priority
C. higher & lower priority
D. none of the mentioned
Correct Answer: A
96. If tasks have unpredictable release times, then the tasks are called
A. Periodic
B. Aperiodic
C. Sporadic
D. Regular
Correct Answer: B
97. For real time operating systems, interrupt latency should be
A. Minimal
B. Maximum
C. Zero
D. Deterministic
Correct Answer: A
98. Time required to synchronously switch from the context of one thread to the context of
another thread is called?
A. threads fly-back time
B. Jitter
C. context switch time
D. none of the mentioned
Correct Answer: C
99. The time within which the same task is executed next time is called
A. Intermediate arrival time
B. Interval time
C. Inter time
D. Inter arrival time
Correct Answer: D
100. Which of the following condition is true for any task specification
A. Pi>=Di>=Ei
B. Di>=Ei>=Pi
C. Ei>=Pi>=Di
D. Pi>=Ei>=Di
Correct Answer: A
101. In Rate monotonic Scheduling algorithm
A. Priority is given to the task based on Deadline of the task
B. Priority is given to the task based on rate of the task
C. Priority is given to the task based on first come first serve
D. Same priority is given to the each of the task
Correct Answer: B
102. The Problem of Data corruption When task is preempted is called
A. Reentrancy
B. Priority Inversion
C. Both A and B
D. None of the above
Correct Answer: A
103. Schedulers based on Scheduling Decision when you consider EOS
A. Interrupt Level Scheduler
B. Task Level Scheduler
C. Both A and B
D. None of the above
Correct Answer: B
104. Interrupt Latency in RTOS system is
A. Disable Interrupt + Time taken to execute 1st instruction of ISR
B. Enable Interrupt + Time taken to execute 1st instruction of ISR
C. Time taken to execute 1st instruction of ISR
D. None of the above
Correct Answer: A
105. Priority Inheritance is Solution to the problem called
A. Priority Inheritance
B. Reentrancy
C. Priority Inversion
D. None of the above
Correct Answer: C
106.If an interrupted task returns to a new task after the interrupt, that kernel is called
A. Non preemptive kernel
B. Preemptive kernel
C. Foreground Background kernel
D. Round robin kernel
Correct Answer: B
107. Message Buffer is ______type of communication
A. One-to-many
B. Many-to-Many
C. Many-to-One
D. One-to-One
Correct Answer: D
108. Example for Static Priority Schedulers
A. Rate Monotonic Scheduler
B. Earliest Deadline First Scheduler
C. Deadline Monotonic Scheduler
D. A and C
Correct Answer: D
109. If two tasks have same priority which of the following scheduler is used
A. Round-robin
B. Non-preemptive scheduler
C. Rate monotonic scheduler
D. All of the above
Correct Answer: A
110. Out of the Following Given Scenarios when scheduler will be called
A. When Task Delays itself
B. When Task Receives Message from message queue
C. When Task Deletes itself
D. All of the above
Correct Answer: D
111. If the Scheduler is called at exit of the ISR then it is
A. Background/foreground system
B. Preemptive Kernel
C. Non-Preemptive kernel
D. All of the above
Correct Answer: B
112.In which one of the following operating systems, the priority inversion is a major issue?
a.GPOS
b.RTOS
c.EOS
d.GPOS & EOS
113. Where do the interrupts return in the Preemptive Kernel?
a.Low Priority task
b.Can't say
c.Highest Priority task
d.Interrupted task
114.Suppose that we have a process P1 has a period of 50 and we have a CENTRAL PROCESSING
UNIT burst
of t1 = 25, P2 has a period of 80, and a CENTRAL PROCESSING UNIT burst of 35. The total CENTRAL
PROCESSING UNIT utilization is:-
a. 0.90
b. 0.80
c. 0.94
d. 0.74
Explanation:- (25/50) + (35/80) = 0.5 + 0.4375 = 0.94
115. Deadlock is a condition that:-
a.Resource of a task is not released for others.
b.When multiple tasks try to access different resources.
c.Tasks more than one are is wait state & Resource of a task is not released for others.
d.Tasks more than one are is wait state.
116.Timing properties of a periodic task, should meet the following condition:-
a.Worst case execution time > period
b.Need not meet any condition
c.Worst case execution time < period
d.Worst case execution time = period
Explanation:- I.e task should complete in One period
117.Which one of the following operating systems is non-deterministic?
a.GPOS & Embedded OS
b.Embedded OS & RTOS
c.Mbed
d.RTOS & GPOS
118.Which one of the following operating systems is deterministic?
a.Embedded OS
b.Windows
c.Real Time Operating Systems
d.GPOS
119.In_______memory allocation all memory allocated to each process at system start-up?
a.Memory is not allocated at start-up.
b.Dynamic.
c.Static.
d.Static and Dynamic
120.Which one of the following is a major job of RTOS?
a.Event management.
b.Task management.
c.Task management & Event management.
d.Process & Thread Management.
121.The Time duration required for scheduling dispatcher to stop one process and start another is
called___:-
a.process latency.
b.execution latency
c.dispatch latency
d.interrupt latency
122.In______real time system, the deadlines may be missed and can be recovered?
a.Hard.
d.Non-real time.
Difference between Firm Real-time Tasks and Soft Real-time Tasks - GeeksforGeeks
Real-time tasks are generally classified as – Hard and Soft but on a wide range, Real-time
tasks are classified as:
1. Hard Real-time Tasks
2. Firm Real-time Tasks
3. Soft Real-time Tasks
1. Firm Real-time Tasks : Firm real-time tasks are such type of real-time tasks which are
associated with time bound and the task need to produce the result within the deadline.
Although firm real-time task is different from hard real-time task as in hard real-time once
deadline is crossed and task is not completed, system fails but in case of firm real-time
task even after the passing of deadline, system does not fail.
Example:
1. Video conferencing
2. Satellite based tracking
2. Soft Real-time Tasks : Soft real-time tasks are such types of real-time tasks which are
also associated with time bound but here timing constraints are not expressed as absolute
values. In soft real-time tasks, even after the deadline result is not considered incorrect
and system failure does not occur
1. Web browsing
2. Railway Ticket Reservation
123. Reentrant function is one that:-
a.Corrupts data Reentrant function.
b.Will allow any number of tasks to execute it without data corruption.
c.Will allow 2 tasks to use it but not more than 2.
d.Should be executed by only one task at a time otherwise data is corrupted.
124.In which one of the following only one CPU is needed?
a.Multiprogramming.
b.Interrupt dispatch time.
c.Multiprocessing.
d.Multicore.
125.What is the standard form of RMS?
a.Rate Monotonic Shift.
b.Rate Monotonic Scheduling.
c.RTOS Monotonic Scheduling.
d.Round Monotonic Scheduling.
Scheduling Algorithms in Real-Time Operating Systems | by Francesco Franco | Medium
126. Which of the following is the definition of a sporadic task?
a.Task which has a set period of execution but can execute at any time within that period.
b.Task which has a set period of execution and should execute at that periodicity.
cTask which has a set period of execution but can execute at any time within that period.
d.Task which can come into execution at any given point in time.
127. How many states are needed to allow the CPU to schedule?
a.Three.
b.Five.
c.Four.
d.Two
[Solved] How many states can be processed in operating system?
128.What is the standard form of ISR?
a.Interrupt source Routines.
b.Internal Service Routines.
c.Interrupt Service Routines.
d.Interrupt Service RTOS.
129.Which of the following is a dynamic priority based scheduling algorithm?
a.round robin.
b.Earliest deadline first.
c.deadline monotonic.
d.Rate monotonic.
130.In rate monotonic scheduling, a process with a shorter period is assigned________.
a. a higher priority.
b. higher & lower priority
c. medium priority
d. a lower priority