Operating System
Operating System
OS is a program that manages a computer’s hardware.
It distributes Hardware and Software Resources effectively.
Computer system consists of CPU, Memory, I/O devices, system bus.
Without OS, user needs to control every components.
For example, when user uses a program,
they need to pick the program up from Hard Disk, put it on memory,
control I/O device order, synchronize the logic, and
do coding with machine language.
However, OS assembles these components to allow users working easily.
Every single actions originally acts by programming commands, but OS can make it easy.
Bootstraping
CPU must put every program on memory to operate them.
Same as OS, when we turn the computer on, CPU puts OS on memory.
It is known as Bootstraping.
Bootstrap program is the first running program when computer is turned on.
The program is stored in ROM, which is called a Bootstrap loader.
Interrupt
OS requests CPU to stop one program and operates another program.
It is Interrupt. It creates multi-programming.
- Hardware Interrupt
Keyboard or mouse requests it. The signal of interrupt delivers through Bus. - Software Interrupt
It works with “Syste Call”.
- Interrupt handling is one of the features of CPU.
- System call requests Interrupt to CPU, CPU uses Interrupt Service Routine.
During running the program, if Interrupt happens, It should store data in Stack.
otherwise, it couldn’t reload it.
- Interrupt handling is one of the features of CPU.
Von Neumann architecture
Commands and Data will be stored in the same memory, which has same CPU link.
Secondary Storage
HDD/SSD helps main memory (RAM) for more storage.
Device Controller
Several Device Controllers connects CPU.
Each Device Controller manages each components.
DMA (Direct Memory Access)
DMA allows components (hard disk, graphic card, NIC) to access to Memory directly.
CPU doesn’t need to participate the data transmission, it improves computer performance.
When Device Controller controls a lot of data, it is usually heavy work on CPU.
So, DMA helps Device Controller to ignore CPU’s work on the data.
Because of that, CPU doesn’t need to do that job and become more effective.
The structure of Computer System
- Single Processor system (=core)
- Multi Processor system