1 process(or processor)management (4)Job scheduling and process scheduling o Job scheduling: 为作业分配必要资源,调入内存建立进程,并使之进入就绪队列。 o Process scheduling: 从就绪队列中选出进程,分配CPU,使之运行。 o Schedule algorithms: FCFS、优先权等 口⊙生年12月0C 东香兰xlanchen@ustc,edu.cn http:/staff..u011740i:Operating System操作系统原理 March28,20196/73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 process(or processor) management (4) Job scheduling and process scheduling Job scheduling: 为作业分配必要资源,调入内存建立进程,并使之进入就绪队列。 Process scheduling: 从就绪队列中选出进程,分配CPU,使之运行。 Schedule algorithms: FCFS、优先权等 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 28, 2019 6 / 73
2 Main Memory Management(存储管理里) o Main Memory,MM: a large array of words or bytes,each with its own address A repository of quickly accessible data shared by CPU and I/O devices A volatile storage device Maybe the most architecture-specified component of OS o Activities Keeping track of memory usage Deciding which processes to load Allocating and deallocating memory space 口18走卡1,月00 陈香兰xlanchen@ustc.edu.cn http:/staf仟.u011740i:Operating System操作系统原理 March28,20197/73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Main Memory Management(存储管理) Main Memory, MM: ▶ a large array of words or bytes, each with its own address ▶ A repository of quickly accessible data shared by CPU and I/O devices ▶ A volatile storage device ▶ Maybe the most architecture-specified component of OS Activities 1 Keeping track of memory usage 2 Deciding which processes to load 3 Allocating and deallocating memory space 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 28, 2019 7 / 73
2 Main Memory Management(存储管理里) GOAL:方便用户使用,且提高存贮器利用率 (1)Memory allocation (3)Memory mapping,内存 静态分配: 映射 动态分配:作业在内存中可 。地址范围地址 移动 ·逻辑空间逻辑地址(相对地址) 需内存分配的数据结构及内存分 。物理空间物理地址(绝对地址) 配和回收功能 (4)Memory expansion, (2)Memory protection 存扩充 例:设置上、下界寄存器, 。利用虚存技术,从逻辑上护 充内存容量 每条指令进行越界检查(一 般是硬件实现) ●系统应有:请求调入/置换 功能以支持虚存技术 0Q0 陈适兰xlanchen@ustc.edu:cn http/staff..u01174O1:Operating System操作系统原理 March28,20198/73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Main Memory Management(存储管理) GOAL:方便用户使用,且提高存贮器利用率 (1) Memory allocation 静态分配: 动态分配:作业在内存中可 移动 需内存分配的数据结构及内存分 配和回收功能 (2) Memory protection 例:设置上、下界寄存器, 每条指令进行越界检查(一 般是硬件实现) (3) Memory mapping, 内存 映射 地址范围:地址 逻辑空间:逻辑地址(相对地址) 物理空间:物理地址(绝对地址) (4) Memory expansion, 内 存扩充 利用虚存技术,从逻辑上扩 充内存容量 系统应有:请求调入/置换 功能以支持虚存技术 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 28, 2019 8 / 73
3 1/O system management ●l/O subsystem(l/O子系统) To hide the peculiarities of specific hardware devices from the user Maybe the most complicate component and has largest line of code (LOC) Various device ●Consists of Buffering,caching,and spooling A general device-driver interface Drivers(g驱a动)for specific hardware device 口18,走卡11月00 陈话兰xlanchen@ustc.edu:cn http/staff.u0117401 Operating System操作系统原理斐 March28,20199/73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 I/O system management I/O subsystem(I/O子系统) ▶ To hide the peculiarities of specific hardware devices from the user Maybe the most complicate component and has largest line of code (LOC) ▶ Various device Consists of 1 Buffering, caching, and spooling 2 A general device-driver interface 3 Drivers(驱动) for specific hardware device 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 28, 2019 9 / 73
3 I/O system management GOAL:提高/O利用率和速度,方便用户 (1)缓冲管理 Buffer(缓冲区):用来解决CPU-l/O矛盾,如:CPU快则应多创建缓冲 区。 (2)device allocation(设备分配) 包括:设备,设备控制器,/O通道的分配和回收 (3)Drivers 。控制设备进行实际的操作,包括读、写等以及向CPU发中断。 ·设备处理/驱动程序应能根据用户/O请求,自动地构成通道程序。 东香兰xlanchen@ustc,edu.cn http:/staff..u011740i:Operating System操作系统原理 March28,201910/73
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 I/O system management GOAL: 提高I/O利用率和速度,方便用户 (1) 缓冲管理 Buffer(缓冲区):用来解决CPU-I/O矛盾,如: CPU快则应多创建缓冲 区。 (2) device allocation(设备分配) 包括:设备,设备控制器,I/O通道的分配和回收 (3) Drivers 控制设备进行实际的操作,包括读、写等以及向CPU发中断。 设备处理/驱动程序应能根据用户I/O请求,自动地构成通道程序。 陈香兰 xlanchen@ustc.edu.cn http://staff.ustc.edu.cn/~xlanchen (Computer Application Laboratory, CS, USTC @ Hefei Embedded System Laboratory, CS, USTC @ Suzhou) 0117401: Operating System 操作系统原理与设计 March 28, 2019 10 / 73