《操作系统课件Introdu.ppt》由会员分享,可在线阅读,更多相关《操作系统课件Introdu.ppt(66页珍藏版)》请在三一办公上搜索。
1、Operating System,Chapter 1:IntroductionGuangShun ShiDepartment of Computer Science,NanKai UniversityEmail:Web Site:,Operating System,CITS,NanKai University,2,Computer Science:Why?What?How?,Why do you choose Computer Science?What do you get during past 2 years?How to become a computer expert/scientis
2、t?CS have changed the world,why?What is CS?How to master/promote CS?,Operating System,CITS,NanKai University,3,Science,Engineering and Technology,SciencePrimitive and general theoryMake everything possible via computing EngineeringSystemic and reasonable strategyRules and forms to construct digital
3、worldTechnologySmart and politic methodsAlgorithms and mechanisms to resolve specific problems,Operating System,CITS,NanKai University,4,Changes in IT domain,before 1990:,EE,CS,IS,after 1990:,EE,CE,CS,SE,IT,IS,Hardware,Software,Business,Hardware,Business,Software,Operating System,CITS,NanKai Univers
4、ity,5,Difference between related majors:CS,Operating System,CITS,NanKai University,6,Difference between related majors:CE,Operating System,CITS,NanKai University,7,Difference between related majors:IS,Operating System,CITS,NanKai University,8,Difference between related majors:IT,Operating System,CIT
5、S,NanKai University,9,Difference between related majors:SE,Operating System,CITS,NanKai University,10,What is CS-CC2005,design and implement softwareComputer scientists take on challenging programming jobs.They also supervise other programmers,keeping them aware of new approaches.devise new ways to
6、use computers.Progress in the CS areas of networking,database,and human-computer-interface enabled the development of the World Wide Web.Now CS researchers are working with scientists from other fields to make robots become practical and intelligent aides,to use databases to create new knowledge,and
7、 to use computers to help decipher the secrets of our DNA.develop effective ways to solve computing puter scientists develop the best possible ways to store information in databases,send data over networks,and display complex images.Their theoretical background allows them to determine the best perf
8、ormance possible,and their study of algorithms helps them to develop new approaches that provide better performance.,Operating System,CITS,NanKai University,11,How to master/promote CS skills,Operating System,CITS,NanKai University,12,The most important concepts,Operating System,CITS,NanKai Universi
9、ty,13,What is OS?,OperatingDrive all hardware devices in computerManage all software in computerProvide proper service environment SystemVirtual machine and resource managertheories,mechanisms,algorithms and techniquesMy opinionCPU is the heart of computerOS is the soul of computer,Operating System,
10、CITS,NanKai University,14,My goals in this course,My minimal expectationEveryone can learn somethingdont waste your timeMy strategyBreadth&Depth in OS domainCase study&discussion&thinking&analysisMy challengeHow to improve your passion of CS and OSHow to integrate the related knowledge and interacti
11、ve with you,Operating System,CITS,NanKai University,15,What about your goals?,Motivation and attitudeSmart and independent thinkingExperience about science,engineering and technology,Operating System,CITS,NanKai University,16,How to get a“A”?,Finish several exercises after class(20%)Finish 4 project
12、s based on OS kernel(40%)Pass final examination(40%),Operating System,CITS,NanKai University,17,Scores in past semesters(2003),901008 students,92 is the top score 809020 students 708036 students 607020 students less than 602 students,Operating System,CITS,NanKai University,18,Scores in past semester
13、s(2004),9010018 students,100 is the top score 809030 students 708048 students 607042 students less than 605 students,Operating System,CITS,NanKai University,19,Scores in past semesters(2005),9010014 students,98 is the top score 809017 students 708061 students 607039 students less than 607 students,O
14、perating System,CITS,NanKai University,20,Scores in past semesters(2006),9010030 students,100 is the top score 809033 students 708047 students 607045 students less than6015 students,Operating System,CITS,NanKai University,21,Scores in past semesters(2007),9010017 students,100 is the top score 809032
15、 students 708022 students 607020 students less than6016 students,Operating System,CITS,NanKai University,22,Scores in past semesters(2008),901005 students,94 is the top score 809018 students 708022 students 607020 students less than6013 students,Operating System,CITS,NanKai University,23,Scores in p
16、ast semesters(2009),901000 808910 students 708041 students 607028 students less than6011 students,Operating System,CITS,NanKai University,24,Scores in past semesters(2010),9010010(99)808914 students 708026 students 607023 students less than6013 students,Operating System,CITS,NanKai University,25,Tea
17、ching books and reference,Teaching books“现代操作系统”,机械工业出版社,Tanenbaum著Reference books“操作系统:设计与实现”,电子工业出版社,中译本“操作系统内核与设计原理”,电子工业出版社,William Stallings著,英文原版“Windows操作系统原理”,机械工业出版社,陈向群,Operating System,CITS,NanKai University,26,Teaching books and reference,Operating System,CITS,NanKai University,27,Other
18、reference books,操作系统教程 王素华 人民邮电出版社计算机操作系统教程 张尧学史美林 清华大学出版社计算机操作系统教程周长林 左万历 高等教育出版社操作系统基础 屠立德 屠祁 清华大学出版社操作系统教程 孟庆昌 西安电子科大出版社计算机操作系统 汤子瀛等 西安电子科大出版社操作系统原理DOS篇 张昆苍 清华大学出版社操作系统教程 孙钟秀主编 高等教育出版社操作系统原理技术与编程蒋静 徐志伟 机械工业出版社Operating System Concept Abrahan Silberschatz,etcApplied Operating System ConceptAbrahan
19、 Silberschatz,etc,Operating System,CITS,NanKai University,28,Concept of Software,Operating System,CITS,NanKai University,29,Role of OS in computer system,计算机硬件设备,如何使用?,底层硬件控制,用户输入,处理结果,Operating System,CITS,NanKai University,30,What happens behind“Hello World”,#include int main(int argc,char*argv)pu
20、ts(hello world);return 0;,Operating System,CITS,NanKai University,31,Processing steps of OS,Human-Computer Interaction Input the content of the program(keyboard)Command IDE to compile the program(mouse)Output the exe file to disk(file system)Question 1:How can computer know your input?Question 2:How
21、 can IDE compile and generate exe files?Exe file loadingCreate a thread to run the program(Thread)Load the Exe file from disk to memory(Memory)Schedule the thread to occupy CPU time(Thread)Question 3:How to allocate memory for a thread?Question 4:How to schedule the thread?Program runningLoad instru
22、ction from memory to CPU register(Thread)Execute the first instruction of the programQuestion 5:The mechanism of instruction execution,Operating System,CITS,NanKai University,32,Processing steps of OS(cont.),Interaction between Graphic card and CPULoad graphic card driver(I/O device)Set the content
23、to be displayed(BUS&DMA)Question 6:The working mode of driver and BUS&DMAPrint the string on monitorConvert the string to be pixel-matrix(I/O device)Start printing.Question 7:The working mode of monitorExiting stepsBlock the graphic driver thread,it will wait for next callingRelease all resource all
24、ocated for“hello world”programLoad next thread,or sleep until next command reached.Overview of this exampleAll modules of OS kernel are activatedOS is the basement for almost all programs,Operating System,CITS,NanKai University,33,Basic concepts,SystemA philosophy word derived from ancient GreeceOrg
25、anism consisted of interactive componentsStructureA word used in building industry,means“construction”The schema of relationship between components in a SystemOperatingFunctions:How many things it can doPerformance:speed,efficiency,stability,security etc.The meaning of“Operating System”A system with
26、 many components.Different application purposes lead to different structuresThe function and performance of OS is very important,Operating System,CITS,NanKai University,34,Functions of OS,Hardware abstractionProvide unified,friendly UI for usersHide the configuration difference of hardware component
27、sApplication integrationProvide simple and useful methods for programs designingSchedule and control the running of programsEnvironment managementMonitor whole environment of computerProvide a secure,stable and comfortable space for uses,OS,Hardware,Operating System,CITS,NanKai University,35,Archite
28、cture of OS,OS,Basic concept,CPU management,Device management,Memory management,File system,Programminginterface,Operating System,CITS,NanKai University,36,Architecture of Win 2k/XP,Operating System,CITS,NanKai University,37,Architecture of Minix,Level 1,Level 2,Level 3,Level 4,I/O Task,Service,User
29、 space,Kernel,进程管理,Operating System,CITS,NanKai University,38,Topics of OS,Introduction and prerequisites knowledge(46 lessons)Opinion of OS:resource manage VS extended machineConcept:batch system/cocurrency/real-systemKnowledge about interruption,CPU,clock,DMA,storage system,bus,motherboard.CPU man
30、agement(810 lessons)Concept:process/thread,CPU instructionProcess/thread schedulingInterprocess communicationMemory management(810 lessons)Concept:swapping,virtual memory,paging,segmentationMemory allocation,relocation,protection and sharingMultiprogramming,running image of threadDevice management(6
31、8 lessons)Concept:DMA,I/O channel,I/O softwareWorking mechanism of different kinds of I/O devicesDead lock and related processing,Operating System,CITS,NanKai University,39,Topics of OS(cont.),File system(Disk management)(68 lessons)Concept:files,directories,volume,file format and system Disk space
32、managementFile system design and implementationFile system securitySystem call and user interface(24 lessons)Concept:soft interruption,hard interruption,CPU trapInitialization and system service loading of OSInteraction between user space and kernel spacesEnvironment management(2 lessons)Power manag
33、ementSecurity and stability maintenance Case analysis and advanced topics discussion(2 lessons)Source code review of several OSResearch on OS and some academic topics,Operating System,CITS,NanKai University,40,Overview of OS history,The motivation of OS Using computer in an easier wayUsing computer
34、in a more efficient wayProvide more powerful functions based on hardwareThe history of hardwareVacuum tubes and plugboards:no OS existedTransistors and batch systemsIntegrated Circuits and multiprogrammingPersonal computers Network and digital world,Operating System,CITS,NanKai University,41,History
35、 of OS:Stone Age,Prehistoric age of OS(1940s mid-1950s)Famed persons:Babbage,Ada,Howard Aiken,John von Neumann,J.Presper Eckert and William Mauchley,Konrad Zuse(Germany)They constructed computing machines with vacuum tubesProgramming is done in absolute machine language,which means changing the stru
36、cture of circuit.The primary function of computer is scientific computingPlease remember this ageThe foundation of Computing Science and TechnologyThey dreamed of automatic computing machines,and they realized this dream with terrible basic facilities,Operating System,CITS,NanKai University,42,Histo
37、ry of OS:Bronze Age,Batch system(mid-1950s 1965)Famed persons&organizations&OS:IBM,DEC,IBM 7094/1401,FMSComputer is consisted of transistorsStructure of the operating systemBatch process,a smart job scheduling methodOn line VS Off lineProgramming language:Fortran,Assember,Operating System,CITS,NanKa
38、i University,43,History of OS:Bronze Age,Operating System,CITS,NanKai University,44,FMS:Bronze Age,Operating System,CITS,NanKai University,45,History of OS:Industrial Age,Multiprogramming System(19651980)Famed persons&organizations&OS:Intel,IBM OS/360,Multics,Ken Thompson and Unix,Tanenbaum and Mini
39、x,Linus and LinuxIndustrial standard for computer and OSStructure of the operating systemCompatible:the beginning of standardMultiprogramming,Spooling,Time-sharingSoftware engineeringProgramming language:C,Fortran,Assembler,Operating System,CITS,NanKai University,46,Compatible and Soft Engineering,C
40、ompatibleDifferent purpose need different structures,different OSIt is too expensive for any company to maintain distinct and totally incompatible produce lineOne produce line,series product,different functionsSoftware engineeringCompatible VS IntegrationNo way to write a software to meet conflictin
41、g requirementsSoftware dinosaurs:too complex,too enormousIBM OS/360,released with more than 1000 bugs,Operating System,CITS,NanKai University,47,Compatible and Soft Engineering,Operating System,CITS,NanKai University,48,Multics:seed of modern OS,Multics(1963 1965 1969)Multiplexed information and com
42、puting servicesAnother software dinosaursMultiprogramming and Time-sharingAllocate CPU time to multi programs in simultaneous wayTime-sharing,one mainframe can support 100 online terminal,Operating System,CITS,NanKai University,49,Multics:seed of modern OS,Operating System,CITS,NanKai University,50,
43、Multics:seed of modern OS,OS manage only one PC register for all jobs,It seems that each job owns independent PCs,Timesharing:only one job can use CPU at any tick,Operating System,CITS,NanKai University,51,Ken Thompson:I want to play game,brilliantly achievementMultics in 1965,Unix in 1969B language
44、,the precursor to Ritchies CQED in Unix,Belle in chess computerTuring award in 1983,National Medal of Technology in 1999,Tsutomu Kanai Award in 1999Minix and LinuxTanenbaum(1980):mini unixLinux(1991):Linuss minix,Operating System,CITS,NanKai University,52,Ken Thompson,Operating System,CITS,NanKai Un
45、iversity,53,Unix family:more popular than CN&KN,Operating System,CITS,NanKai University,54,Linus Torvalds:Just do it,Linuss minix=LinuxHe create an OS for himself,also for the worldDIY:do it yourself,the world will be changedModern opinion for softwareOpen Mind:Everyone can change it Team Work:All p
46、eople work for itThe essential of LinuxCompatible and extendableEfficiency and Security is the most important thing,Operating System,CITS,NanKai University,55,History of OS:Golden Age,Personal Computer&Network(1981)Famed persons&organizations&OS:Gary Kildall and CP/M,Bill Gates and DOS,Steve Jobs an
47、d Mac,IBM OS/2,Open Source and GPL,Embedded systemDigital world based on computingStructure of the operating systemGUI:virtual world constructed by computerDistributed and Sharing:C/S,B/S,GridMultiprogramming and parallel Computer&Network:new world,new life,Operating System,CITS,NanKai University,56
48、,Gary Kildall:There was a chance for me,CP/MA successful OS that suitable for PCIntel:they think that PC is valuelessAcademic,Technology and BusinessAcademic:Find the essential of the worldTechnology:Change the world in more efficient wayBusiness:Create a world based on law,science and technology,Op
49、erating System,CITS,NanKai University,57,Bill Gates&Microsoft,Bill GatesFind the request,and hold the chanceLaw is more important than technologyThe story of MicrosoftDOS:the first popular PC OSWin32:GUI+WYSWYGWin95:Bill cheated IBM,but changed the worldWinNT,2K,XP.,Operating System,CITS,NanKai Univ
50、ersity,58,Steve Jobs&Macintosh,Steve JobsMake computer to be more interestedApple,Lisa,MacintoshThe story of Steve JobsDoul Engelbar:father of GUIXerox PARC:omitted the value of GUISteve Jobs:more romantic than Bill GatesDigital media worldFashion&Immersionefficient,effective,easy to learn,easy to r