Review: chapter 1
Computer System components:
- hardware
- operating System
- applications programs
- users
for user view:
- PC Users: an easy-to-use interface for using the hardware
- Mainframe(主机)/Minicomputer Users: maximize the system resource utilization
- Workstation Users: compromise between individual usability and resource utilization
for System view:
- Resource allocator: allocates and reclaims the system hardware resources to and from user programs
- Control Program: controls the execution of user programs to prevent errors and improper use of the computer
common definition : the operating system is the one program running at all times on the computer (i.e., the kernel). All other programs are application programs
all in all, From the computer’s point of view,what is an Operating System:
- A resource allocator, a control program, a kernel
For mainframe systems,the development of systems:
No OS->batch systems->multiprogrammed systems->Time sharing systems
早期操作系统:
- 用户独占全机资源
- 程序运行前准备时间过长
- 人机速度不匹配
solutions:批处理 脱机I/O
Batch Systems
-
Reduce setup time by batching similar jobs
-
Automatic job sequencing –automatically transfers control from one job to another. First rudimentary operating system.
-
Resident monitor
initial control in monitor
control transfers to job
when job completes control transfers back to monitor
simple batch processing(单道批处理):
-
顺序性:磁带上的各道作业是顺序地 进入内存,各作业的完成顺序与他们 进入内存的顺序相同
-
单道性:内存中仅有一道程序运行
-
自动性
优点:减少了CPU的空闲时间,提高了主机 CPU和I/O设备的使用效率,提高了吞吐量。
缺点:CPU和I/O设备使用忙闲不均
Multiprogrammed Batch Systems(多道批处理):
It’s the first instance where the operating system must make decisions for the users
- Keeps several jobs in memory simultaneously
- Picks and begins to execute one
- If that job needs to wait, CPU is switched to another one
OS Features Needed for Multiprogramming:
-
I/O routine supplied by the system.
-
Memory management
-
CPU scheduling
-
Allocation of devices
-
File management
-
Job scheduling: the system must choose among jobs ready to be brought into memory
Advantages and disadvantages of multiprogramming:
CPU 利用率大大提高
用户无控制权,无交互性,延迟大
Time-Sharing Systems–Interactive Computing(分时交互):
Interactive computer system provides direct communication between user and the system
Time-sharing operating system allows many users to share the computer simultaneously
多路性、独占性、交互性、及时性
attention:
- a job needs to be swapped in and out of memory to the disk (virtual memory).
- Sophisticated CPU-scheduling schemes are required
- It may ensure that jobs do not get stuck in a deadlock
other systems:
Real -Time Systems 实时系统
Embedded SystemS 嵌入式系统
Desktop Systems 桌面系统
Parallel Systems 并行系统
Distributed Systems 分布式系统
Clustered Systems
Handheld Systems