Convince and Efficiency
types
linux | ubantu | macOS | windows | Android
sources
CPU、Memory、I/O devices
How to Work
All controllers and CPU are sharing memory(RAM), can execute concurrently competing for the memory cycle.
—— To ensure orderly access to the shared memory, a memory controller is provided whose function is to synchronize access to memory.
Terms
- Boostrap Program - 引导程序
- The initial program that runs when a computer is powered up or rebooted
- It is stored in the ROM
- It must know how to load the OS and start executing the system
- It must locate and load into memory the OS kernel
- Interrupt - 中断
- The occurence of an event is ususally signaled by an interrupt form the hardware or the software
- hardware may trigger an interrupt at any time by sending a signal to the CPU, usually by the way of the system bus.
- System Call(Monitor Call) - 系统调用(监控调用)
- Software may trigger an interrupt by executing a special operation called System Call
When the CPU is interrupted
当中断发生时,CPU将其执行转移到中断服务程序,中断结束后,CPU会恢复它原来的执行
- stop what it is doing and immediately transfers execution to a fixed location(contains the starting address where the Service Routine of the interrupt is located)
- The Interrupt Service Routine executes
- On completion, the CPU resumes the interrupted computation.
Storage Structure
Registers - 寄存器, store data in bits that means in 0 or 1
Cache - 缓存 a little bigger and slowly than registers
Main Memory - 主内存 random access memory or RAM
Electron Disk - 电子磁盘
Magnetic Disk - 磁盘
Optical Disk - 光盘
Magnetic Tapes - 磁带
Input/Output Devices
-> The divice controller maintains tow things
- local buffer storage 本地缓冲存储
- set of special-purpose registers 专用寄存器组
-> Typically, operating system have a device driver(设备驱动程序) for each device controller
-> This device driver understands the device controller and presents a uniform interface to the device to the reset of the operating system
I/O Operation
- To start an I/O operation, the device driver loads the appropriate registers within the device controller(设备驱动)
-