Introduction
overall 期末
- 40 x 1.5 选择
- 5 x 2 填空
- 3-4 大题 memory(hard), synchronization, scheduling
- multi-programming, time-sharing
- OS events: interrupts and exceptions
- Timer: modifying the timer is done via privileged instructions
- Released the first Linux prototypes in late 1991
Main OS Services¶
- Process Management - a process is a program in execution
- Memory Management - keep track of memory use
- Storage Management - operate file-system management
- I/O Management - device-driver interface
- Protection and Security - 控制进程对由操作系统定义的资源的访问的机制 - 防御系统的内部和外部攻击
Processs¶
-
Linkder Load
-
OS is a resource abstractor and a resource allocator - define a set of logical resources and a set of well-defined operations - decides who gets what resource and when
- bootloader
- OS waits until an event occurs
- modern OSes allows multi-programming - Time-Sharing: Multi-programming with rapid context-switching
- Furthermore, there is no memory protection within the kernel - segmentation fault
- For instance, only the OS can:
- Directly access I/O devices (printer, disk, etc.)
- Manipulate memory management state 操作内存管理状态
- Manipulate protected control registers
- Execute the halt instruction that shuts down the processor
-
MS-DOS had only one mode, because it was written for the Intel 8088(1979), which had no mode bit
-
OS Events - The kernel defines a handler for each event type - Once the system is booted, all entries to the kernel occur as the result of an event - The OS can be seen as a huge event handler
-
A system call is a special kind of trap
-
To make sure that an interrupt will occur reasonably soon, we can use a timer
- The timer interrupts the computer regularly