CSC 4320/6320 Operating Systems Lecture 2 Operating System StructuresIntroductionChapter 2 ObjectivesA View of Operating System ServicesOperating System ServicesOperating System Services (Cont)Slide 7User Operating System Interface - CLIBourne Shell Command InterpreterUser Operating System Interface - GUIThe Mac OS X GUISystem CallsExample of System CallsExample of Standard APISystem Call ImplementationAPI – System Call – OS RelationshipStandard C Library ExampleSystem Call Parameter PassingParameter Passing via TableTypes of System Calls : Six Major CategoriesExamples of Windows and Unix System CallsProcess ControlSlide 23Single tasking system in execution :MS-DOSFreeBSD Running Multiple ProgramsTypes of System Calls (Contd.)Slide 27HISTORYMoore’s Law Change Drives OS ChangeMoore’s law effectsDawn of time ENIAC: (1945—1955)History Phase 1 (1948—1970) Hardware Expensive, Humans CheapIn 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book September 9th 1945 [sic]. Stemming from the first bug, today we call errors or glitch's [sic] in a program a bug.Core Memories (1950s & 60s)History Phase 1½ (late 60s/early 70s)A Multics System (Circa 1976)Early Disk HistoryHistory Phase 2 (1970 – 1985) Hardware Cheaper, Humans ExpensiveThe ARPANet (1968-1970’s)Slide 40ARPANet Evolves into InternetWhat is a Communication Network? (End-system Centric View)What is a Communication Network? (Infrastructure Centric View)Network Components (Examples)History Phase 3 (1981— ) Hardware Very Cheap, Humans Very ExpensiveHistory Phase 3 (con’t) Graphical User InterfacesHistory Phase 4 (1988—): Distributed SystemsHistory Phase 4 (1988—): InternetNetwork “Cloud”Regional Nets + BackboneBackbones + NAPs + ISPsComputers Inside the CoreThe Morris Internet Worm (1988)LoveLetter Virus (May 2000)History Phase 5 (1995—): Mobile SystemsDatacenter is the ComputerMigration of Operating-System Concepts and FeaturesHistory of OS: SummaryEnd of HistorySystem ProgramsSystem Programs (cont’d)Operating System Design and ImplementationOperating System Design and Implementation (Cont)OS ImplementationOS StructureSimple StructureMS-DOS Layer StructureLayered ApproachLayered Operating SystemSlide 70UNIXTraditional UNIX System StructureMicrokernel System StructureModulesSolaris Modular ApproachMac OS X StructureVirtual MachinesVirtual Machines (Cont)Virtual Machines History and BenefitsSimulationPara-virtualizationSolaris 10 with Two ContainersVMware ArchitectureThe Java Virtual MachineOperating-System DebuggingPerformance TuningSolaris 10 dtrace Following System CallOperating System GenerationSystem BootEnd of Lecture 2CSC 4320/6320CSC 4320/6320Operating SystemsOperating SystemsLecture 2Lecture 2Operating System StructuresOperating System StructuresSaurav KarmakarIntroductionIntroductionOS : Environment for application programSo before designing the GOALS should be well defined.View of an OS : 1) Services 2) Interfaces 3) Components/InterconnectionsChapter 2 ObjectivesChapter 2 ObjectivesTo describe the services an operating system provides to users, processes, and other systemsTo discuss the various ways of structuring an operating systemTo explain how operating systems are installed and customized and how they bootA View of Operating System ServicesA View of Operating System ServicesOperating System ServicesOperating System ServicesOne set of operating-system services provides functions that are helpful to the user:User interface - Almost all operating systems have a user interface (UI)Varies between Command-Line (CLI), Graphics User Interface (GUI), BatchProgram execution - Must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error)I/O operations - A running program may require I/O, which may involve a file or an I/O device File-system manipulation - Programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.Operating System Services (Cont)Operating System Services (Cont)Communications – Processes may exchange information, on the same computer or between computers over a networkCommunications via -- shared memory or -- message passingError detection – OS needs to be constantly aware of possible errorsMay occur in different sectors like the CPU and memory hardware, in I/O devices, in user programFor each type of error, OS should take the appropriate action to ensure correct and consistent computingDebugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the systemOperating System Services (Cont)Operating System Services (Cont)Another set of OS functions exists for ensuring the efficient operation of the system itself via resource sharingResource allocation - Multiple users or multiple jobs running concurrently, resources must be allocated to each of themMany types of resourcesAccounting - To keep track of which users use how much and what kinds of computer resourcesProtection and security – Information stored in a multiuser or networked computer system. control use of the information.concurrent processes should not interfere with each otherUser Operating System Interface - CLIUser Operating System Interface - CLICommand Line Interface (CLI) or command interpreter allows direct command entrySometimes implemented in kernel, sometimes by systems programSometimes multiple flavors implemented – shellsPrimarily fetches a command from user and executes it–Sometimes commands built-in, sometimes just names of programs»If the latter, adding new features doesn’t require shell modificationBourne Shell Command InterpreterBourne Shell Command InterpreterUser Operating System Interface - GUIUser Operating System Interface - GUIUser-friendly desktop metaphor interfaceUsually mouse, keyboard, and monitorIcons represent files, programs, actions, etcInvented at Xerox PARC in 1970sMany systems now include both CLI and GUI interfacesMicrosoft Windows is GUI with CLI “command” shellApple Mac OS X as “Aqua” GUI interface with
View Full Document