Winter Semester 2026–27 · VIT-AP · BACSE106 · Operating Systems · Dr. Krithika L.B

OS design issues

Design goals, mechanism vs policy, implementation — with a sorting quiz.

Module 1 Session 1.4 Lesson 3 of 4

Operating-system design issues

Goals, mechanism versus policy, implementation choices — and the recurring questions every OS designer faces.

Start from the goals

User goals
  • Convenient to use
  • Easy to learn
  • Reliable and safe
  • Fast
System goals
  • Easy to design, implement and maintain
  • Flexible
  • Reliable and error-free
  • Efficient
Goals depend on the system

A hard real-time controller ranks predictability first; a phone ranks battery life and touch response; a cloud server ranks throughput, isolation and uptime; a desktop ranks responsiveness. There is no single best OS — only an OS that fits its goals.

Mechanism vs policy

The principle

Mechanisms determine how to do something; policies decide what will be done. Keeping them separate means a policy can change (by setting a parameter) without re-engineering the mechanism.

Mechanism (how)Policy (what / which)
Hardware timer interruptTime slice of 10 ms for interactive users, 100 ms for batch
Priority-based ready queueI/O-bound processes get higher priority than CPU-bound ones
Page-replacement frameworkEvict the least recently used page (LRU)
File permission bits (rwx)Only faculty may write to the marks file
Loadable-module loaderOnly signed modules may be loaded
Sort it: mechanism or policy?

“Processes of the user `root` always get a larger CPU share.”

It decides who gets more — a policy, applied through the scheduler mechanism.

The code that saves registers of one process and loads those of another (context switch).

It is how switching is done, whatever the choice of next process.

“Disk requests are served in order of nearest cylinder first.”

It is a choice among pending requests (SSTF) — a policy; the disk queue is the mechanism.

The mode bit that distinguishes user mode from kernel mode.

Hardware mechanism for protection.

Implementation

Early OSes were written entirely in assembly language. Modern ones are written mostly in C or C++, with assembly only where the hardware must be touched directly — boot code, interrupt entry and the context switch. Linux is now adding Rust for memory-safe drivers.

Advantages of a high-level language
  • Code is written faster, is more compact, and easier to understand and debug.
  • Compiler improvements speed up the whole OS by recompiling.
  • Portable — Linux runs on x86, ARM, RISC-V and more from one code base.
Possible disadvantages
  • Slightly lower speed and higher memory use.
  • In practice, better algorithms and data structures matter far more; hot spots can be hand-optimised later.

Recurring design issues

IssueTypical tension
Performancevs protection checks and isolation
Concurrencyparallel speed vs correctness of shared data (locks)
Protection & securitysafety vs convenience
Reliabilityfault isolation vs speed (microkernel vs monolithic)
Extensibilityrun-time flexibility vs kernel stability
Portability & compatibilitysupporting new hardware vs running old binaries
Scalability & energyusing 128 cores vs saving battery on 4