The OS gives each program short turns on the CPU like kids sharing a swing (scheduling), and hands each one a private, seemingly-endless memory space (virtual memory) even though the real RAM is small and shared. Both are clever illusions of plenty.
Fair turns and roomy memory
A scheduler decides which ready process runs next. Round-robin gives each a small time slice in turn (fair); priority scheduling runs important work first (but can starve the rest). Virtual memory gives each process the illusion of a huge private memory; the OS maps virtual pages to real RAM and parks extra pages on disk.
- Round robin: equal time slices, rotated — simple and fair.
- Priority: important tasks first — responsive, but risks starvation.
- Paging: memory split into fixed pages, mapped from virtual to physical.
- You have jobs A, B, and C, each needing 3 time slices.
- Write the run order under round-robin with a 1-slice quantum.
- Now give C top priority and write the priority order.
- Explain one downside of the priority schedule for A and B.
What you should see: You compared round-robin and priority scheduling and saw the fairness/starvation trade-off.