operatingsystem《操作系统》ch01-introdu.ppt

上传人:小飞机 文档编号:6513281 上传时间:2023-11-08 格式:PPT 页数:46 大小:729.50KB
返回 下载 相关 举报
operatingsystem《操作系统》ch01-introdu.ppt_第1页
第1页 / 共46页
operatingsystem《操作系统》ch01-introdu.ppt_第2页
第2页 / 共46页
operatingsystem《操作系统》ch01-introdu.ppt_第3页
第3页 / 共46页
operatingsystem《操作系统》ch01-introdu.ppt_第4页
第4页 / 共46页
operatingsystem《操作系统》ch01-introdu.ppt_第5页
第5页 / 共46页
点击查看更多>>
资源描述

《operatingsystem《操作系统》ch01-introdu.ppt》由会员分享,可在线阅读,更多相关《operatingsystem《操作系统》ch01-introdu.ppt(46页珍藏版)》请在三一办公上搜索。

1、Operating System,Instructor:Hou Mengbo(Dr.&Associate Prof.)Office:Institute of Information Security.Specialist Building Rm.324,Software Campus,SDU,Computer Science&Technology School of ShanDong University&Software College,Course No:0303100111,O,Introduction,Textbook:Operating System Concepts(7th Edi

2、tion)-A.Silberschatz Fri.8:00-10:00am Q&A Time:Tues.15:30-16:30pm Requirements for success:Read the book in detailDo well on the homework and experimentsDo well on the final exam Attend class and participate,Supplements,Scope:Chap.1-Chap.15 Slides Source:or from me _Reference(Bibliographies):计算机操作系统

3、 汤子赢编著 西安电子科技大学出版社出版 实用操作系统概念 Applied Operating System Concepts Higher Education Press(English Edition)Notes:All the slides used in this course is adopted from the web site with some modification,and copyright belongs to the authors of this book.,Outline of the Textbook,Only 5 parts will be covered:

4、Overview(C1-2)what it is/what it can do/how it designed and constructed/historyProcess management(C3-7)process&concurrentMemory management(C8-9)allocation/Virtual Memory Storage management(C10-13)file system/mass storage/IOProtection&security(C14-15)Distributed systems,special-purpose systems and ot

5、hers will be omitedCases Study Linux/windows2000/windows XP/FreeBSD/Mach/Nachos omited,Chapter 1:Introduction,Chapter Objectives,To provide a grand tour of the major operating systems componentsTo provide coverage of basic computer system organization,Content Overview,What Operating Systems DoComput

6、er-System OrganizationComputer-System ArchitectureOperating-System StructureOperating-System OperationsProcess ManagementMemory ManagementStorage ManagementProtection and Security,1.1 What Operating Systems Do,A program that acts as an intermediary between a user of a computer and the computer hardw

7、are.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 Structure,Computer system can be divided into 4 components(see Fig.below):Hardware provides basic comput

8、ing resourcesCPU,memory,I/O devicesOperating systemControls and coordinates use of hardware among various applications and usersApplication programs define the ways in which the system resources are used to solve the computing problems of the usersWord processors,compilers,web browsers,database syst

9、ems,video gamesUsersPeople,machines,other computers,Four Components of a Computer System,Roles:Two views of Operating System,User view ease of use/performance/resource utilizationSystem viewOS is a resource allocatorManages all resourcesDecides between conflicting requests for efficient and fair res

10、ource useOS is a control programControls execution of programs to prevent errors and improper use of the computer,Operating System Definition,No universally accepted definition“Everything a vendor ships when you order an operating system”is good approximation,But varies wildly“The one program runnin

11、g at all times on the computer”is the kernel.Everything else is either a system program(ships with the operating system)or an application programOur definition:Software sets:Resource management;Control programs;Convenient to users;,1.2 Computer System Organization,Basic OrganizationOne or more CPUs,

12、device controllers connect through common bus providing access to shared memoryConcurrent execution of CPUs and devices competing for memory cycles,Computer Startup,bootstrap program is loaded at power-up or rebootTypically stored in ROM or EPROM,generally known as firmwareInitializes all aspects of

13、 systemLoads operating system kernel and starts executionInterrupt drivenHardware InterruptsSoftware Interrupts(system call,or monitor call),Computer-System Operation,I/O devices and the CPU can execute concurrently.Each device controller is in charge of a particular device type.Each device controll

14、er has a local buffer.CPU moves data from/to main memory to/from local buffersI/O is from the device to local buffer of controller.Device controller informs CPU that it has finished its operation by causing an interrupt from hardware or software.,Common Functions of Interrupts,Interrupt transfers co

15、ntrol to the interrupt service routine generally,through the interrupt vector,which contains the addresses of all the service routines.Interrupt architecture must save the address of the interrupted instruction.Incoming interrupts are disabled while another interrupt is being processed to prevent a

16、lost interrupt.A trap is a software-generated interrupt caused either by an error or a user request(system call).An operating system is interrupt driven.,Interrupt Handling,The operating system preserves the state of the CPU by storing registers and the program counter.Determines which type of inter

17、rupt has occurred:pollingvectored interrupt systemSeparate segments of code determine what action should be taken for each type of interrupt,Interrupt Timeline,Storage Structure,Main memory only large storage media that the CPU can access directly.RAM(small&volatile)Secondary storage extension of ma

18、in memory that provides large nonvolatile storage capacity.such as:Magnetic disks rigid metal or glass platters covered with magnetic recording material Disk surface is logically divided into tracks,which are subdivided into sectors.The disk controller determines the logical interaction between the

19、device and the computer.,Storage Hierarchy,Storage systems organized in hierarchy(see below).SpeedCostsizeVolatilityCaching copying information into faster storage system;main memory can be viewed as a last cache for secondary storage.,Storage-Device Hierarchy,I/O Structure,Storage is only one of ma

20、ny types of I/O devices within a computer.CPU-Device Driver-Common Bus-Device Controller-Device,Direct Memory Access(DMA)Structure,Used for high-speed I/O devices able to transmit information at close to memory speeds.Device controller transfers blocks of data from buffer storage directly to main me

21、mory without CPU intervention.Only one interrupt is generated per block,rather than the one interrupt per byte.,1.3 Computer System Architecture,Single-Processor SystemsMultiprocessor Systems Terms:graceful degradation平稳退化Increased throughput Fault tolerant Economy of scale.Increased reliability(fau

22、lt tolerant)asymmetric multiprocessing(AMP)/symmetric multiprocessing(SMP)Clustered Systemscomputers share storage and are closely linked via a local-area network(LAN),to provide high-availability service,1.4 Operating System Structure,Multiprogramming needed for efficiencySingle user cannot keep CP

23、U and I/O devices busy at all timesMultiprogramming organizes jobs(code and data)so CPU always has one to executeA subset of total jobs in system is kept in memoryOne job selected from job pool on the disk and run via job schedulingWhen it has to wait(for I/O for example),OS switches to another jobT

24、imesharing(multitasking)is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running,creating interactive computingResponse time should be 1 secondEach user has at least one program executing in memory processIf several jobs ready to run at

25、the same time CPU schedulingIf processes dont fit in memory,swapping moves them in and out to runVirtual memory allows execution of processes not completely in memory,Memory Layout for Multiprogrammed System,1.5 Operating-System Operations,Interrupt driven by hardwareSoftware error or request create

26、s exception or trapDivision by zero,request for operating system serviceOther process problems include infinite loop,processes modifying each other or the operating systemDual-mode operation allows OS to protect itself and other system componentsUser mode and kernel mode(supervisor,system,privileged

27、 mode)Mode bit provided by hardwareProvides ability to distinguish when system is running user code or kernel codeSome instructions designated as privileged instructions,only executable in kernel modeSystem call changes mode to kernel,return from call resets it to user,Transition from User to Kernel

28、 Mode,Timer to prevent infinite loop/process hogging resourcesSet interrupt after specific periodOperating system decrements counterWhen counter zero generate an interruptSet up before scheduling process to regain control or terminate program that exceeds allotted time,1.6 Process Management,A proce

29、ss is a program in execution.It is a unit of work within the system.Program is a passive entity,process is an active entity.Process needs resources to accomplish its taskCPU,memory,I/O,filesInitialization dataProcess termination requires reclaim of any reusable resourcesSingle-threaded process has o

30、ne program counter specifying location of next instruction to executeProcess executes instructions sequentially,one at a time,until completionMulti-threaded process has one program counter per threadTypically system has many processes,some user,some operating system running concurrently on one or mo

31、re CPUsConcurrency by multiplexing the CPUs among the processes/threads,Process Management Activities,The operating system is responsible for the following activities in connection with process management:Creating and deleting both user and system processesSuspending and resuming processesProviding

32、mechanisms for process synchronizationProviding mechanisms for process communicationProviding mechanisms for deadlock handling,1.7 Memory Management,All data in memory before and after processingAll instructions in memory in order to executeMemory management determines what is in memory whenOptimizi

33、ng CPU utilization and computer response to usersMemory management activitiesKeeping track of which parts of memory are currently being used and by whomDeciding which processes(or parts thereof)and data to move into and out of memoryAllocating and deallocating memory space as needed,1.8 Storage Mana

34、gement,OS provides uniform,logical view of information storageAbstracts physical properties to define a logical storage unit-fileEach medium is controlled by device(i.e.,disk drive,tape drive)Varying properties include access speed,capacity,data-transfer rate,access method(sequential or random)Stora

35、ge ManagementLogical Storage-File-system managementPhysical Storage-Mess-storage management,File-System management,Files usually organized into directoriesAccess control on most systems to determine who can access whatOS activities includeCreating and deleting files and directoriesPrimitives to mani

36、pulate files and dirsMapping files onto secondary storageBackup files onto stable(non-volatile)storage media,Mass-Storage Management,Usually disks used to store data that does not fit in main memory or data that must be kept for a“long”period of time.Proper management is of central importanceEntire

37、speed of computer operation hinges on disk subsystem and its algorithmsOS activitiesFree-space managementStorage allocationDisk schedulingSome storage need not be fastTertiary storage includes optical storage,magnetic tapeStill must be managedVaries between WORM(write-once,read-many-times)and RW(rea

38、d-write),Caching,Important principle,performed at many levels in a computer(in hardware,operating system,software)Information in use copied from slower to faster storage temporarilyFaster storage(cache)checked first to determine if information is thereIf it is,information used directly from the cach

39、e(fast)If not,data copied to cache and used thereAssumption:the information will be used again soon.Cache is smaller than storage being cachedCache management is an important design problemCache size and replacement policy,Performance of Various Levels of Storage,Movement between levels of storage h

40、ierarchy can be explicit or implicit,Migration of Integer A from Disk to Register,Multitasking environments must be careful to use most recent value,no matter where it is stored in the storage hierarchyMultiprocessor environment must provide cache coherency in hardware such that all CPUs have the mo

41、st recent value in their cacheDistributed environment situation even more complexSeveral copies of a datum can existVarious solutions covered in Chapter 17,I/O System,One purpose of OS is to hide peculiarities of hardware devices from the userI/O subsystem responsible forMemory management of I/O inc

42、luding:buffering(storing data temporarily while it is being transferred),caching(storing parts of data in faster storage for performance),spooling(the overlapping of output of one job with input of other jobs)General device-driver interfaceDrivers for specific hardware devices,1.9 Protection and Sec

43、urity,Protection any mechanism for controlling access of processes or users to resources defined by the OSSecurity defense of the system against internal and external attacksHuge range,including denial-of-service,worms,viruses,identity theft,theft of serviceSystems generally first distinguish among

44、users,to determine who can do whatUser identities(user IDs,security IDs)include name and associated number,one per userUser ID then associated with all files,processes of that user to determine access controlGroup identifier(group ID)allows set of users to be defined and controls managed,then also a

45、ssociated with each process,filePrivilege escalation allows user to change to effective ID with more rights,1.10 Distributed Systems,is a collection of physically separate,possibly heterogeneous computer systems that are networked to provide the users with access to the various resources that the sy

46、stem maintains.Access to a shared resource increases computation speed,functionality,data availability,and reliability.,1.11 Special-Purpose Systems,Real-Time Embedded Systems Embedded systems almost always run real-time operating systems.Multimedia SystemsHandheld Systems,1.12 Computing Environment

47、s,Traditional computingOffice environmentPCs connected to a network,terminals attached to mainframe or minicomputers providing batch and timesharingNow portals allowing networked and remote systems access to same resourcesHome networksUsed to be single system,then modemsNow firewalled,networked,Clie

48、nt-Server Computing,Dumb terminals supplanted by smart PCsMany systems now servers,responding to requests generated by clientsCompute-server provides an interface to client to request services(i.e.database)File-server provides interface for clients to store and retrieve files,Peer-to-Peer Computing,

49、Another model of distributed systemP2P does not distinguish clients and serversInstead all nodes are considered peersMay each act as client,server or bothNode must join P2P networkRegisters its service with central lookup service on network,orBroadcast request for service and respond to requests for

50、 service via discovery protocolExamples include Napster and Gnutella,Web-Based Computing,Web has become ubiquitousPCs most prevalent devicesMore devices becoming networked to allow web accessNew category of devices to manage web traffic among similar servers:load balancersUse of operating systems li

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

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


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号