ITPEC FE Morning October 2018 Question 18

Topic: Software

Which of the following is an appropriate usage method of the priority-based preemptive scheduling that is used in an embedded real-time operating system?

Explanation

Processing tasks by importance and urgency — each task gets a priority, and a higher-priority task that becomes ready preempts the one running.

In an embedded real-time OS, some tasks have deadlines, such as reacting to a sensor or a motor within a fixed time. Priority-based preemptive scheduling lets the most important or urgent task take the CPU at once, even in the middle of a lower-priority task, which returns to the ready state and resumes later.

Answer (b)

Why not others:

  • •(a) — giving each task an equal share of CPU time is round robin (time slicing)
  • •(c) — running tasks in order of arrival is first-come first-served (FCFS)
  • •(d) — running the shortest tasks first is shortest job first (SJF), also called shortest processing time first

Key rule: Match the scheduling method to its ordering key: arrival time for FCFS, processing time for SJF, a fixed time slice for round robin, and priority, with preemption, for real-time systems.

Software · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.