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