User:Johnburger/OS/Design

From OSDev Wiki
Jump to navigation Jump to search

An Operating System (OS) is different things to different people. Some think of it as the pretty windowing interface. Others think of it as a sophisticated work tool. Still others can't even distinguish it from the applications that they run.

To an OS developer, however, the OS is the implementation of something that tames the hardware of the computer; controls it and distributes it for the use of the applications that it will deign to allow run.

To me, an Operating System is a hierarchy of layers:

  • At the core is the CPU and RAM: the processor and available storage. The architecture defines the way the Operating System can possibly operate - for example, without a Memory Management Unit there can be no Paging. The resources provided here are the fundamental building blocks.
  • Next is the peripheral hardware. The OS needs to provide software that controls these - and share their usage among all processes.
  • Building on the peripherals are the services that use them: abstractions to handle their complexity and "common up" differences between different versions of the hardware. For example, both a hard drive and USB memory stick provide raw storage, while a File System layers on the concepts of directories and files.
  • Finally, applications use these services, and (usually indirectly) the hardware they rely on, to provide features to the end user. The OS doesn't provide many applications - indeed, one could argue it provides none.

A more specific and detailed breakdown of these separate layers is provided below.

Processor Resources

Central Processing Unit(s)

Task Context

Floating Point Unit(s)

Address Spaces

Physical

Logical

Input/Output Ports

Segments

Global

Local

Random Access Memory (RAM)

Interrupts

Exceptions

Interrupts

Direct Memory Access (DMA)

Devices

Timer(s)

Real-Time Clock

Buses

Peripheral Component Interconnect (PCI)

Bridges

Universal Serial Bus

Hubs
Keyboard
Mouse
Serial Port
Storage

Video

PS/2

Keyboard

Mouse

Serial Port(s)

Storage

Floppy Disk

Integrated Drive Electronics (IDE)

AT Attachment (ATA) — Parallel (PATA)
ATA Packet Interface (ATAPI)
Serial ATA (SATA)

Small Computer System Interface (SCSI)

Ethernet

Wired

WiFi

Services

Clocks

Date & Time

Timers

Loader

Keyboard

Mouse

Window Manager

File System

MS-DOS — File Allocation Table (FAT12/FAT16/FAT32)

Linux — Ext2/Ext3/Ext4

CD-ROM — ISO-9660 / El Torito / Rock Ridge

Networking

Programs

Debugger

Shell

Editor

Assembler