Operating System Introduction
主要由Memory
,CPU
,I/O Devices
构成
CPU与Memory间的关系 可以分成三种模型
OS Include:
中间件
– a set of software frameworks that provide additional services to application developers such as: databases, multimedia, graphicsError
或者System call
引起中断Device
引发An interrupt is a signal emitted by hardware or software when a process or an event needs immediate attention
Preserves the state of the CPU
Determine type of interrupt
Runs ISR in kernel to handle interrupt
CPU
I/O Device
I/O Request
Interrupt
Interrupt Dealing
Transfer Done
User Program Done
Red Circle
这张图展示了中断驱动I/O周期的两种方法。
在两种情况下,I/O操作都是由中断控制的,但是用户程序对I/O完成的处理方式不同。
这两种方法的选择取决于程序设计的需求。
Caching: Copy information from slower into faster storage system
Data access procedure: faster storage (cache) checked first
Cache design consideration
Cache coherency
A process is a program in execution
Multiprogramming VS Multitasking
Multiprogramming : A subset of total jobs are kept in memory at the same time
Multitasking: The CPU switches jobs so frequently to increase interactions with users
Dual Mode
Dual-mode operation allows OS to protect itself and other system components
Keeping track of which parts of memory are currently being used and by whom
Deciding which processes and data (or part of them) to move into and out of memory
Allocating and de-allocating memory space as needed
Creating and deleting files and directories
Mapping files onto secondary storage
Disks usually are used to store data that do not fit in main memory or data that must be kept for a “long” period of time
One purpose of OS is to hide peculiarities of hardware devices from the user
Protection