Unit | Shortened | Capacity |
---|---|---|
Bit | b | 1 or 0 (on or off) |
Byte | B | 8 bits |
Kilobyte | KB | 1024 bytes |
Megabyte | MB | 1024 kilobytes |
Gigabyte | GB | 1024 megabytes |
Terabyte | TB | 1024 gigabytes |
Petabyte | PB | 1024 terabytes |
A program that acts as an intermediary between a user of a computer and the computer hardware
Computer system can be divided into four components:
Hardware – provides basic computing resources
Operating system
Application programs
Users
One or more CPUs, device controllers connect through common bus providing access to shared memory
The CPU hardware has a wire called the interrupt-request line that the CPU senses after executing every instruction.
When the CPU detects (an asynchronous event) that a controller has asserted a signal on the interrupt-request line.
The operating system preserves the state of the CPU by storing the registers and the program counter
It reads the interrupt number and jumps to the interrupt-handler routine by using that interrupt number as an index into the interrupt vector.
It then starts execution at the address associated with that index.
It performs a state restore and executes a return from interrupt instruction to return the CPU to the execution state prior to the interrupt.
Unit | Shortened | Capacity |
---|---|---|
Bit | b | 1 or 0 (on or off) |
Byte | B | 8 bits |
Kilobyte | KB | 1024 bytes |
Megabyte | MB | 1024 kilobytes |
Gigabyte | GB | 1024 megabytes |
Terabyte | TB | 1024 gigabytes |
Petabyte | PB | 1024 terabytes |
Timer to prevent infinite loop (or process hogging resources)
Timer is set to interrupt the computer after some time period
Keep a counter that is decremented by the physical clock
Operating system set the counter (privileged instruction)
When counter zero generate an interrupt
Set up before scheduling process to regain control or terminate program that exceeds allotted time
Many similar to standard programming data structures + Singly linked list + Doubly linked list + Circular linked list
Adapted from “Operating System Concepts”, 10th Edition; Abraham Silberschatz, Peter B. Galvin,Greg Gagne; 2018