Semester 3Operating Systems
Real Time Operating Systems
In real-time systems theory, we distinguish two things:
- Task - the recurring work to be done (e.g., "read the sensor every 10 ms").
- Job (or instance) - one single execution of that task.
Key timing parameters of a job
| Parameter | Symbol | Meaning |
|---|---|---|
| Release time | r | The moment the job becomes available and ready to run (also called arrival time). |
| Processing time (execution time) | C | How much CPU time the job needs to complete. |
| Deadline | D | The time by which the job must finish. |
| Completion time | f | When it actually finishes. |
| Response time | R | f − r (how long from release to finish). |
release(r) deadline(D)
│ │
▼ ▼
────┼──────────────────────────────────────────────┼────────► time
└────────────── execution (C) ─────────────────┘Release Rate
- How many jobs arrive per unit of time?
In a real time system,
- - Processing time
U = 2 ms × 100 jobs/s = 0.2 = 20% of one CPU.
Basically, if the processor has period and task uses to run, of CPU is utilized and other tasks are able to run. Otherwise if 10ms taken by the task, not any other tasks are able to run.
Rate-Monotonic Scheduling (RMS)
Assign priorities by period: the shorter the period, the higher the priority.