操作系统原理绪论英.ppt

上传人:牧羊曲112 文档编号:6387880 上传时间:2023-10-26 格式:PPT 页数:68 大小:2.25MB
返回 下载 相关 举报
操作系统原理绪论英.ppt_第1页
第1页 / 共68页
操作系统原理绪论英.ppt_第2页
第2页 / 共68页
操作系统原理绪论英.ppt_第3页
第3页 / 共68页
操作系统原理绪论英.ppt_第4页
第4页 / 共68页
操作系统原理绪论英.ppt_第5页
第5页 / 共68页
点击查看更多>>
资源描述

《操作系统原理绪论英.ppt》由会员分享,可在线阅读,更多相关《操作系统原理绪论英.ppt(68页珍藏版)》请在三一办公上搜索。

1、Principles of Operating System操作系统原理,About This Course,课程基本情况课程类别:学科专业课必修课学时学分:总学时64学时 实验8学时 4学分 先修课程:数据结构、程序设计语言课程内容主要讲授操作系统基本原理,即教材第1章至第13章成绩评定方法期末考试成绩占70%,平时成绩占30%平时成绩包括:作业、实验、课堂、考勤,Textbook&References,Abraham SilberschatzApplied Operating System ConceptsHigher Education Press,2001,5 汤子瀛计算机操作系统 西

2、安:西北电子科技大学出版社,1999,5胡志刚计算机操作系统 长沙:中南大学出版社,2005,8张尧学计算机操作系统教程(第二版)北京:清华大学出版社,2000,8,Lecture Format,Help you understand important and hard OS conceptsLectures do not cover everythingNot all questions in homework or exams are from lecturesStudents responsibilityAttend lecturesRead textbooks Homework,Ex

3、periments,ExamPeriodically check web page,Overview(1-3),Mainly explain:What operating systems are?How operating systems are designed and constructed?What the common features of an operating systems are?,Process management(4-8),Mainly introduce methods for:Process schedulingInterprocess communication

4、Process synchronizationDeadlock handlingDiscussion of threads,Storage management(9-13),Mainly deal with:Memory managementVirtual memoryFile systemsI/O systemsMass-storage structure,Protection and security(18-19),Mainly cover:ProtectionSecurity,Chapter 1:Introduction,What is an Operating System?Histo

5、ry of Operating Systems The Operating System Zoo,What is an Operating System?,There are a lot of definitions.Do you know?,Definition from Wikipedia,An operating system(OS)is an interface between hardware and applications;it is responsible for the management and coordination of activities and the sha

6、ring of the limited resources of the computer.,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.Application programs defi

7、ne 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),What is an Operating System?,a program that acts as an intermediary between a user of a computer and the

8、computer hardware.Operating system purpose:Provide an environment in which a user can execute programs.Operating system goals:Make the computer system convenient to use(Convenience).Use the computer hardware in an efficient manner(Efficiency).,Definitions of an Operating System,Resource allocator ma

9、nages 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).全时运行的一个程序,Our Traditional Definition,A set of programs that control and manage

10、computer hardware and software,and organize computers workflow so as to make the computer system convenient for users to use reasonably and efficiently.控制和管理计算机软硬件资源,合理组织计算机工作流程,方便用户合理使用计算机的程序的集合。,Operating System Goals,Manage system resources to make them utilized and shared effectively.Organize co

11、mputers workflow reasonably in order to improve system performance(response time/throughput).Provide user interfaces to simplify user operations.(Convenience、Efficiency、Scalability、Open),Abstract View of System Components,Virtual machine 裸机在每增加一层软件后,就成为一个功能更强的机器,通常将这个“新的功能更强的机器”称为“虚拟机”,Chapter 1:Int

12、roduction,What is an Operating System?History of Operating Systems The Operating System Zoo,History of Operating Systems,First generation 1945 1955 vacuum tubes,plug boards(no OS)Second generation 1955 1965transistors,batch systemsThird generation 1965 1980 ICs,multiprogrammingFourth generation 1980

13、 present personal computers,hand-held devices,sensors,First Generation 1945 1955,OS:none(programs were entered by setting some switches)Computer designer is:builder,programmer,operator,and“sys admin”A physicist who wanted to calculate the trajectory of a missile would sign up for an hour on the comp

14、uter in advance.When his time came,he would come into the room,feed in his program from punched cards or paper tape,watch the lights flash,maybe do a little debugging,get a print-out,and leave.,ENIAC(Electronic Numerical Integrator And Computer),It contained 17,468 vacuum tubes,weighed 30 short tons

15、(27 t),and took up 680 square feet(63 m),and consumed 150 kW of power.Input was possible from an IBM card reader,and an IBM card punch was used for output.No programming language,let alone OS,Punched Card,A Famous Remark!,I think there is a world market for maybe five computers.-Thomas Watson,chairm

16、an of IBM,1943,Second Generation 1955 1965,Universities started to buy computers(spending millions of dollars)OS:batch systemProgramming language:FORTRAN&AssemblyComputer:MainframesLow CPU utilization-slow mechanical I/O devices,Early Batch System,bring cards to 1401read cards to tapeput tape on 709

17、4 which does computingput tape on 1401 which prints output,Batch Systems,Hire an operator 设置一个操作员User operatorReduce setup time by batching similar jobs 批量处理同类作业减少了设置时间OSs main task:Automatic job sequencing automatically transfers control from one job to another.Resident monitorinitial control in mo

18、nitor 初始化管理程序control transfers to job 转换控制到作业when job completes control transfers back to monitor,作业=程序+数据+处理步骤,Memory Layout for a Simple Batch System,Control Cards,Problems1.How does the monitor know about the nature of the job(e.g.,Fortran versus Assembly)or which program to execute?2.How does th

19、e monitor distinguish(a)job from job?(b)data from program?SolutionIntroduce control cards,Control Cards(Cont.),Special cards that tell the resident monitor which programs to run$JOB$FTN$RUN$DATA$ENDSpecial characters distinguish control cards from data or program cards 特定的字符把数据卡片和程序卡片区分开来,Structure

20、of a typical Fortran Monitoring System job,$JOB card specifies:the max runtime in minutesThe account number to be chargedThe programmers name$FORTRAN card:tells the operatingSystem to load Fortran compiler$RUN means run the program withThe following data$END end of job,A Famous Remark!,I have travel

21、led the length and breadth of this country,and talked with the best people,and I can assure you that data processing is a fad that wont last out the year.-The editor in charge of business books for Prentice Hall,1957,Third generation 1965 1980,Integrated Circuits and multiprogrammingIBMs System/360

22、mainframe computer with a standard architecture designed to handle both scientific and commercial computing,Third generation 1965 1980,Prerequisite:interrupt,Channel I/O channel I/O is a generic term that refers to a high-performance input/output(I/O)architecture that is implemented in various forms

23、 on a number of computer architectures,especially on mainframe computers.In the past they were generally implemented with a custom processor,known alternately as peripheral processor,I/O processor(IOP),I/O controller,or DMA controller.A channel program is a sequence of I/O instructions executed by t

24、he input/output channel processor in the IBM System/360 and subsequent architectures.,OS:Multiprogramming/timesharing,spoolingSpooling-use disk as a very large buffer for input/output devicesOses DevelopedMULTICS(father of all modern OSes)UNIX(System V,BSD)POSIX(by IEEE)MINIX(by Tanenbaum)Linux(orig

25、inated by Linus Torvalds,inspired by MINIX),Multiprogrammed Batch Systems,Several jobs are kept in main memory at the same time,and the CPU is multiplexed among them.Multiprogramming increases CPU ultilization by organizing jobs such that CPU always has one to execute.,作业状态转换示意图,后备状态,提交状态,CPU,P1P2P3

26、,运行,I/O,完成状态,外存盘交换区,外存就绪,外存阻塞,中级调度,OS Features Needed for Multiprogramming,I/O routine supplied by the system.Memory management the system must allocate the memory to several jobs.CPU scheduling the system must choose among several jobs ready to run.Allocation of devices.,JobMonitorI/OJob AJob BSche

27、dulingType I/ODisk I/O,Simple/MultiprogrammingBatch System,(1)Improve CPU utilization 7%-100%(in theory)(2)Improve memory and I/O devices utilization(3)Increase system throughput,Advantages of Multiprogramming,Characteristics of Multiprogrammed Batch Systems:多道性、无序性、调度性(两级),Question,两个/两个以上的作业同时入主存处

28、于宏观运行状态共享所有系统资源,Can you tell me the concept of“Multiprogramming”?,A Famous Remark!,There is no reason anyone would want a computer in their home.-Ken Olson,president,chairman and founder of Digital Equipment Corp.,1977,Tourth Generation 1980 Present,personal computers were developed after LSI(Large

29、Scale Integration)circuits were invented.First Microcomputer:Intel 8080 CPU+attached 8-inch floppy diskFirst disk based OS:CP/M(Control Program for Microcomputers)Programming languages:C/C+,Java,OS:DOS,Windows,MacOS,Linux,A Famous Remark!,We dont see Windows as a long-term graphical interface for th

30、e masses.-A Lotus Software Development official,while demonstrating a new DOS version,1989,History of Operating Systems,Bill Gates suggested IBM that they should look at CP/M(by Gary Kildall)The biggest mistake of all:Kindall refused to sign a non-disclosure agreementIBM went back to Bill Gates and

31、signed a contract with him to write an OS for their new home computerMS-DOS was based on QDOS,the Quick and Dirty Operating System written by Tim Paterson of Seattle Computer Products QDOS was based on Gary Kildalls CP/MMicrosoft bought the rights to QDOS for$50,000,History of Operating Systems,Earl

32、y MS-DOS was very primitive but later versions included advanced features taken from UNIXThe early OS for microcomputers were based on users typing in commands from the keyboardDouglas Engelbart from SRI invented the Graphical User Interface(GUI)with windows,icons,menus,and mouse.,History of Operati

33、ng Systems,Steve Jobs saw the value of GUI in a PC and developed the Apple computer with GUI(Apple Macintosh)in his garage.He is also the co-founder of Pixar which has created very successful animated films:Toy Story;A Bugs Life;Toy Story 2;Finding Nemo;Monsters.,History of Operating Systems,Microso

34、ft developed a GUI-based system called Windows which originally ran on top of MS-DOSWindows 95 and 98 were real GUI based operating systems still based on 16 bit Intel assembly languageWindows NT familyWindows 2000,Windows MeWindows XPWindows VistaWindows Neptune:a version of Microsoft Windows that

35、was do to arrive at the same time as windows 2000,but was never released.,Chapter 1:Introduction,What is an Operating System?History of Operating Systems The Operating System Zoo,The Operating System Zoo,Mainframe operating systemsRoom-size computersHigh I/O capacityOffers:Batch processing(no intera

36、ction,such as large reports)Transaction processing(large number of small requests)Timesharing(multiple users sitting in front of clients),The Operating System Zoo,Server operating systemsOffer services like print,file,or webUNIX,Windows 2000,LinuxMultiprocessor operating systemsParallel computingPer

37、sonal computer operating systemsSingle user with a good GUI,such as Windows 98,Windows 2000,Macintosh OS,Linux,The Operating System Zoo,Real-time operating systemsE.g.industrial process control systems where each job must be completed in the specified time.Hard real-time(nuclear reactor control syst

38、ems)or soft-real time systems(e.g multimedia systems)depending on the acceptance of missing deadlines Embedded operating systemsReal-time systems with some resource constraints like memory,CPU,power.Smart card operating systemsExtremely primitive OS running on credit card-sized devices with a CPU.,T

39、ime-Sharing Systems,Time-Sharing Systems(Cont.),The CPU is multiplexed多路 among several jobs that are kept in memory and on disk(the CPU is allocated to a job only if the job is in memory).A job is swapped in and out of memory to the disk.On-line communication between the user and the system is provi

40、ded;when the operating system finishes the execution of one command,it seeks the next“control statement”not from a card reader,but rather from the users keyboard.On-line system must be available for users to access data and code.,Time-Sharing Systems(Cont.),Real-Time Systems,Often used as a control

41、device in a dedicated application such as controlling scientific experiments,medical imaging systems,industrial control systems,and some display systems.Well-defined fixed-time constraints.严格的时间限制,Real-Time Systems(Cont.),Real-Time Systems(Cont.),Real-Time Systems(Cont.),Real-Time Systems(Cont.),Har

42、d real-time system 硬实时系统Secondary storage limited or absent,data stored in short-term memory,or read-only memory(ROM)Conflicts with time-sharing systems,not supported by general-purpose operating systems.Soft real-time system 软实时系统Limited utility in industrial control or roboticsUseful in applicatio

43、ns(multimedia,virtual reality)requiring advanced operating-system features.,Personal-Computer Systems,Personal computers computer system dedicated to a single user.I/O devices keyboards,mice,display screens,small printers.User convenience and responsiveness.Can adopt technology developed for larger

44、operating system,often individuals have sole use of computer and do not need advanced CPU utilization of protection features.可采用大型操作系统研发的技术,个人独占计算机不需要高级CPU使用的保护技术,Migration of Operating-System Concepts and Features,Parallel Systems,Multiprocessor systems with more than one CPU in close communication

45、.Tightly coupled system紧耦合系统 processors share memory and a clock;communication usually takes place through the shared memory.Advantages of parallel system:Increased throughput 吞吐量EconomicalIncreased reliabilitygraceful degradation 故障时性能降低不大fail-soft systems 软失效系统,Parallel Systems(Cont.),Symmetric mu

46、ltiprocessing(SMP)对称多处理 Each processor runs an identical copy of the operating system.Many processes can run at once without performance deterioration.Most modern operating systems support SMPAsymmetric multiprocessing非对称多处理器Each processor is assigned a specific task;master processor schedules and a

47、llocates work to slave processors.More common in extremely large systems,Symmetric Multiprocessing Architecture,Distributed Systems,Distribute the computation among several physical processors.Loosely coupled system each processor has its own local memory;processors communicate with one another thro

48、ugh various communications lines,such as high-speed buses or telephone lines.Advantages of distributed systems.Resources SharingComputation speed upReliabilityCommunications,Distributed Systems(Cont.),Network Operating System provides file sharingprovides communication schemeruns independently from

49、other computers on the networkDistributed Operating Systemless autonomy between computers gives the impression there is a single operating system controlling the network.,Summary,Types of OS Single user single task:CP/M,MS-DOS Single user multiple tasks:OS/2,WINDOWSMultiple users multiple tasks:UNIXMain Functions of OSCPU managementMemory managementFile managementDevice managementJob management,Homework,P17-P18 1.11.61.9,

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号