1: Introduction引论 What is an operating system?什么是操作系统? ° Simple Batch Systems简单批处理系统 ° Multiprogramming Batched Systems多道程序批处理系统 Time-Sharing Systems分时系统 ° Personal-Computer Systems个人计算机系统 Parallel Systems并行系统 Distributed Systems分布式系统 Real -Time Systems实时系统 Applied Operating System Concepts 1.1
Applied Operating System Concepts 1.1 1: Introduction 引论 • What is an operating system?什么是操作系统? • Simple Batch Systems简单批处理系统 • Multiprogramming Batched Systems多道程序批处理系统 • Time-Sharing Systems分时系统 • Personal-Computer Systems 个人计算机系统 • Parallel Systems并行系统 • Distributed Systems分布式系统 • Real -Time Systems实时系统
What is an Operating System?什么是操作系统 a program that acts as an intermediary between a user of a computer and the computer hardware 在计算机用户和计算机硬件之间起媒介作用的一种程序。 Operating system goals:操作系统目标 Execute user programs and make solving user problems easier. 执行用户程序并使用户问题更易解决。 Make the computer system convenient to use 使计算机系统更易使用。 e Use the computer hardware in an efficient manner. 以一种效率的方式使用硬件。 Applied Operating System Concepts 1.2
Applied Operating System Concepts 1.2 What is an Operating System?什么是操作系统? • A program that acts as an intermediary between a user of a computer and the computer hardware. 在计算机用户和计算机硬件之间起媒介作用的一种程序。 • Operating system goals: 操作系统目标 – Execute user programs and make solving user problems easier. 执行用户程序并使用户问题更易解决。 – Make the computer system convenient to use. 使计算机系统更易使用。 • Use the computer hardware in an efficient manner. 以一种效率的方式使用硬件
Computer System Components计算机系统部件 1. Hardware硬件一 provides basic computing resources(cPU memory, o devices)提供基本的运算资源 the hardware among the various application programs forthoof 2 Operating system操作系统一 controls and coordinates the use varlous users在各种应用程序和用户之间控制与协调对硬件的使用 3. Applications programs应用程序 define the ways in which the system resources are used to solve the computing problems of the users(compilers, database systems, video games, business programs)定义解决用户间题的资源使用方式(编译、数据库、视频 游戏、事务程序等) 4 Users( people, machines, other computers)用户(人、机、其他计 算机) Applied Operating System Concepts 1.3
Applied Operating System Concepts 1.3 Computer System Components计算机系统部件 1. Hardware硬件 – provides basic computing resources (CPU, memory, I/O devices).提供基本的运算资源 2. Operating system操作系统 – controls and coordinates the use of the hardware among the various application programs for the various users.在各种应用程序和用户之间控制与协调对硬件的使用 3. Applications programs 应用程序– define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs).定义解决用户问题的资源使用方式(编译、数据库、视频 游戏、事务程序等) 4. Users (people, machines, other computers)用户(人、机、其他计 算机)
Abstract View of System Components 系统部件的抽象观点 user user user 2 assembler text editor database system system and application programs operating system computer hardware Applied Operating System Concepts 1.4
Applied Operating System Concepts 1.4 Abstract View of System Components 系统部件的抽象观点
Operating System Definitions操作系统定义 Resource allocator资源分配者- manages and allocates resources管理和分配资源 Control program控制程序- controls the execution of user programs and operations of l/o devices控制用户程序的运行 和O设备的操作 ° Kernel内核- the one program running at all times( all else being application programs)在全时运行的一个程序(其他的是 应用) Applied Operating System Concepts 1.5
Applied Operating System Concepts 1.5 Operating System Definitions操作系统定义 • Resource allocator资源分配者– manages and allocates resources.管理和分配资源 • Control program控制程序– controls the execution of user programs and operations of I/O devices .控制用户程序的运行 和I/O设备的操作 • Kernel 内核– the one program running at all times (all else being application programs).在全时运行的一个程序(其他的是 应用)
Simple Batch Systems简单批处理系统 Hire an operator,雇一个操作员 User≠ operator用户≠操作员 Add a card reader添加卡片阅读机 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作业完成后 转换控制回管理程序 Applied Operating System Concepts 1.6
Applied Operating System Concepts 1.6 Simple Batch Systems简单批处理系统 • Hire an operator雇一个操作员 • User operator用户操作员 • Add a card reader添加卡片阅读机 • 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作业完成后 转换控制回管理程序
Memory Layout for a Simple Batch System 简单批处理系统的存储器布局 operating system user program area Applied Operating System Concepts 1.7
Applied Operating System Concepts 1.7 Memory Layout for a Simple Batch System 简单批处理系统的存储器布局
Control cards作业控制卡 Problems问题 1. How does the monitor know about the nature of the job(e. g, Fortran versus Assembly) or which program to execute? 管理程序如何知道作业的性质(如, Fortran还是汇编)或哪个程序要 运行? 2 How does the monitor distinguish管理程序如何区别 (a) job from job?一个个的作业? (b) data from program?数据还是程序? ° Solution解法 - Introduce control cards引入作业控制卡 Applied Operating System Concepts 1.8
Applied Operating System Concepts 1.8 Control Cards作业控制卡 • Problems问题 1. How does the monitor know about the nature of the job (e.g., Fortran versus Assembly) or which program to execute? 管理程序如何知道作业的性质(如, Fortran还是汇编)或哪个程序要 运行? 2. How does the monitor distinguish管理程序如何区别 (a) job from job?一个个的作业? (b) data from program?数据还是程序? • Solution解法 – Introduce control cards引入作业控制卡
Control cards作业控制卡(cont Special cards that tell the resident monitor which programs to run特殊卡片通知管理程序哪个程序运行 SJOB SFTN SRUN SDATA SEND Special characters distinguish control cards from data or program cards特定的字符把数据卡片和程序卡片区分开来: S in column 1 l in column 1 and 2 709 in column 1 Applied Operating System Concepts 19
Applied Operating System Concepts 1.9 Control Cards作业控制卡(Cont.) • Special cards that tell the resident monitor which programs to run特殊卡片通知管理程序哪个程序运行 $JOB $FTN $RUN $DATA $END • Special characters distinguish control cards from data or program cards特定的字符把数据卡片和程序卡片区分开来: $ in column 1 // in column 1 and 2 709 in column1
Control cards作业控制卡(cont Parts of resident monitor常驻管理程序的一部分 Control card interpreter- responsible for reading and carrying out instructions on the cards控制卡片解释器-负责读出和执行卡 上的指令 Loader- loads systems programs and applications programs into memory装载程序-把系统程序和应用程序调入内存 Device drivers- know special characteristics and properties for each of the system' s llo devices.设备驱动程序-了解系统每一个 O设备的特点和性质 Problem: Slow Performance -/O and CPU could not overlap; card reader very slow间题:慢0和CPU不可能彼此覆盖;卡片阅读器很慢 solution: Off-line operation - speed up computation by loading jobs into memory from tapes and card reading and line printing done off line解决:脱机操作从磁带和卡片调作业进入内存,而打印机脱机,加 速运算 Applied Operating System Concepts 10
Applied Operating System Concepts 1.10 Control Cards作业控制卡(Cont.) • Parts of resident monitor常驻管理程序的一部分 – Control card interpreter – responsible for reading and carrying out instructions on the cards.控制卡片解释器 - 负责读出和执行卡 上的指令 – Loader – loads systems programs and applications programs into memory.装载程序 - 把系统程序和应用程序调入内存 – Device drivers – know special characteristics and properties for each of the system’s I/O devices.设备驱动程序- 了解系统每一个 I/O设备的特点和性质 • Problem: Slow Performance – I/O and CPU could not overlap ; card reader very slow.问题:慢- I/O和CPU不可能彼此覆盖;卡片阅读器很慢 • Solution: Off-line operation – speed up computation by loading jobs into memory from tapes and card reading and line printing done offline.解决:脱机操作 - 从磁带和卡片调作业进入内存,而打印机脱机,加 速运算