Module 3: Operating-System Structures 操作系统结构 ° System Components系统部件 ° Operating System Services操作系统服务 ° System Calls系统调用 System Programs系统程序 System Structure系统结构 ● Virtual machines虚拟机 ° System Design and Implementation系统设计和实现 System Generation系统生成 Applied Operating System Concepts 3.1
Applied Operating System Concepts 3.1 Module 3: Operating-System Structures 操作系统结构 • System Components系统部件 • Operating System Services操作系统服务 • System Calls系统调用 • System Programs系统程序 • System Structure 系统结构 • Virtual Machines虚拟机 • System Design and Implementation系统设计和实现 • System Generation系统生成
Common System Components 系统部件 ° Process Management进程管理 Main Memory Management主存管理 ° Secondary- Storage Management二级储存器管理一 O System Management lO系统管理 File Management文件管理 ° Protection System保护系统 ° Networking网络处理 Command4 interpreter System命令解释器系统 Applied Operating System Concepts 3.2
Applied Operating System Concepts 3.2 Common System Components 系统部件 • Process Management 进程管理 • Main Memory Management主存管理 • Secondary-Storage Management 二级储存器管理 • I/O System Management I/O系统管理 • File Management 文件管理 • Protection System 保护系统 • Networking 网络处理 • Command-Interpreter System 命令解释器系统
Process Management 进程管理 A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and l/o devices, to accomplish its task. 进程是正在执行的程序。为了完成其任务,进程需要一定的资源,包括cPU 时间,存储器,文件,以及0设备 The operating system is responsible for the following activities in connection with process management. 在同进程管理有关的活动中,操作系统负责下列事务: Process creation and deletion.进程创建和删除 process suspension and resumption.进程挂起和恢复 Provision of mechanisms for可提供以下有关机制: process synchronization进程同步 process communication进程通信 Applied Operating System Concepts 3.3
Applied Operating System Concepts 3.3 Process Management 进程管理 • A process is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task. 进程是正在执行的程序。为了完成其任务,进程需要一定的资源,包括CPU 时间,存储器,文件,以及I/O设备 • The operating system is responsible for the following activities in connection with process management. 在同进程管理有关的活动中,操作系统负责下列事务: – Process creation and deletion. 进程创建和删除 – process suspension and resumption. 进程挂起和恢复 – Provision of mechanisms for 可提供以下有关机制: process synchronization 进程同步 process communication 进程通信
Main-Memory Management 主存管理 Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and l/o devices 存储器是字或字节的一个大数组,每一字或字节有自己的地址。它是一个可被 cPU和O共享、可快速存取数据的存放地 Main memory is a volatile storage device. It loses its contents in the case of system failure主存储器是一个易失性存储设备。系统失败时,会丢失其内容 The operating system is responsible for the following activities in connections with memory management 在同存储管理有关的活动中,操作系统负责下列事务: whep track of which parts of memory are currently being used and by 保持记录存储器的哪一部分当前被使用以及被谁使用 Decide which processes to load when memory space becomes available当有可用存储空间时,决定调入哪个进程 Allocate and deallocate memory space as needed 需要时分配和收回存储空间 Applied Operating System Concepts 3.4
Applied Operating System Concepts 3.4 Main-Memory Management 主存管理 • Memory is a large array of words or bytes, each with its own address. It is a repository of quickly accessible data shared by the CPU and I/O devices. 存储器是字或字节的一个大数组,每一字或字节有自己的地址。它是一个可被 CPU和I/O 共享、可快速存取数据的存放地 • Main memory is a volatile storage device. It loses its contents in the case of system failure.主存储器是一个易失性存储设备。系统失败时,会丢失其内容 • The operating system is responsible for the following activities in connections with memory management: 在同存储管理有关的活动中,操作系统负责下列事务: – Keep track of which parts of memory are currently being used and by whom. 保持记录存储器的哪一部分当前被使用以及被谁使用 – Decide which processes to load when memory space becomes available.当有可用存储空间时,决定调入哪个进程 – Allocate and deallocate memory space as needed. 需要时分配和收回存储空间
Secondary-Storage Management 二级存储管理 Since main memory(primary storage)is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. 由于主存(基本存储器)是易失性的,而且太小不足以永久保存所有的数据和程 序,计算机系统必须提供二级存储器备份主存 Most modern computer systems use disks as the principle on-line storage medium, for both programs and data 多数现代计算机系统采用磁盘作为程序和数据的基本联机存储介质 The operating system is responsible for the following activities in connection with disk management 在同磁盘管理有关的活动中,操作系统负责下列事务 Free space management空闲空间管理 Storage allocation存储器分配 Disk scheduling磁盘调度 Applied Operating System Concepts 3.5
Applied Operating System Concepts 3.5 Secondary-Storage Management 二级存储管理 • Since main memory (primary storage) is volatile and too small to accommodate all data and programs permanently, the computer system must provide secondary storage to back up main memory. 由于主存(基本存储器)是易失性的,而且太小不足以永久保存所有的数据和程 序,计算机系统必须提供二级存储器备份主存 • Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. 多数现代计算机系统采用磁盘作为程序和数据的基本联机存储介质 • The operating system is responsible for the following activities in connection with disk management: 在同磁盘管理有关的活动中,操作系统负责下列事务: – Free space management 空闲空间管理 – Storage allocation 存储器分配 – Disk scheduling 磁盘调度