سوال ۱۰۲ کنکور ارشد مهندسی کامپیوتر ۱۴۰۱
اگر سه فرایند متناوب جدول زیر با الگوریتم زمانبندی قبضهای اولویتدار زمانبندی شوند و اولویت با فرایندی باشد که نسبت تقسیم «مدت زمان CPU» بر «دوره تناوب» آن کمترین است، بهرهوری CPU چقدر خواهد بود؟ ( در لحظه صفر هر سه فرایند به ترتیب وارد میشوند).
| P1 | P2 | P3 | |
|---|---|---|---|
| مدت زمان CPU | ۵ | ۲۰ | ۱۰ |
| دوره تناوب | ۲۵ | ۵۰ | ۴۰ |
پاسخ صحیح: گزینهٔ C — ۰/۸۵
This is a periodic / real-time scheduling problem. The rule “the process with the smaller ratio gets higher priority” is exactly Rate-Monotonic Scheduling (RMS) in disguise: assigning higher priority to the task whose is smaller is equivalent to giving higher priority to the shorter relative load, and for a fixed CPU time the priority rises as the period grows — i.e. shorter periods are favored less, longer periods more. Regardless of the exact priority order, the question only asks for the CPU utilization.
For a set of periodic tasks, the CPU utilization is the sum of each task's fraction of CPU time over its period:
Plugging in the table values:
So the CPU utilization is — option 3.
Why the distractors are tempting:
- Option 2, , is the Liu–Layland schedulability bound for tasks under RMS — a sufficient condition for schedulability, not the utilization itself.
- Option 4 (“not schedulable”) plays on the fact that , so RMS is not guaranteed schedulable by the Liu–Layland test. But the bound is only sufficient, not necessary, and the question asks for utilization, which is always well-defined as .
Exam trick: is the actual CPU utilization; is merely the RMS schedulability bound. The question asked for utilization, so compute the sum — don't be lured into reporting the bound.