* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download System Software
Survey
Document related concepts
Library (computing) wikipedia , lookup
Plan 9 from Bell Labs wikipedia , lookup
Mobile operating system wikipedia , lookup
Unix security wikipedia , lookup
Security-focused operating system wikipedia , lookup
Burroughs MCP wikipedia , lookup
Distributed operating system wikipedia , lookup
Spring (operating system) wikipedia , lookup
Copland (operating system) wikipedia , lookup
Transcript
Computer Systems 2009-2010 Week 12: System Software Alma Whitfield Session Aims Understand what System Software is Operating System as an example of System Software Functions of an operating system Study of operating system process management function 2 Need for system software Computers very complex Come with large bundles of software to help the non-specialist This software is called system software 3 Software types System software operating systems language translators (e.g. Java language) Application software programs we buy (sometimes and use) e.g. Microsoft Word, Powerpoint, web browsers, games. 4 Operating systems In this session we focus on the most important kind of system software – the operating system Examples of operating systems include MS-DOS Windows Linux 5 What an operating system does Just like mother Teenager does not know how to operate toaster etc .. … but mother does 6 What a mother does Teenager makes service call Mother responds by controlling the device needed When device done it interrupts mother Mother responds by delivering output to teenager 7 What an operating system does Alternative would be to have the teenager understand how to work all the hardware Not regarded by teenager as efficient! Computers are invented by teenagers Can you see where this is heading? 8 What an operating system does Who is mother Operating system Who is the teenager Application program 9 Tasks carried out by an operating system Running programs Managing files Managing main memory Controlling peripherals Utility programs 10 Running programs User requests a program This triggers a sequence of actions mouse click program name at command line ensure program is in main memory start fetch execute manage program’s file access manage program’s I/O device access Operating system can detect and respond to errors end a program after illegal attempt to access memory retry an operation when device not ready recover after power failure 11 Managing files Programs and data saved on disc as files Operating System file manager organises files enables user to add, update delete files controls file ownership in shared system e.g. network, mainframe 12 Managing main memory Managing memory space Simultaneous programs must not interfere with each other’s space Large programs possible to load only required parts may use overlays e.g. Word with little used menu options 13 Controlling peripherals Operating system includes kernel drivers Drivers plug and play 14 Kernel The kernel is a key portion of the Operating System that is loaded into memory when the machine is switched on and remains constantly in memory. Contains the programs to handle the most frequent commands The kernel is also know as the nucleus Good performance by the kernel is very important for good performance by the machine 15 Utility programs Editors Clock Calculator Calendar Whatever else those nice guys at Microsoft can think of 16 Issues over System Software What constitutes an operating system? e.g. should it include Web browser, Java Virtual Machine and media player? Microsoft was taken to court in the United States for anti-competitive conduct in making Internet Explorer 4.0 (and a non-standard JVM) non-removable parts of Windows 98 In 2004 the European Commission ruled that Microsoft broke EU competition law in tying Windows Media Player to its operating system 17 Do we need an Operating System? Is the statement below True or False ? You can’t use a computer without an Operating System! 18 False You can use a computer without an operating system. However, you must be highly skilled in Electrical and Mechanical Engineering Some of the very first computers did not have Operating Systems 19 Studying the tasks carried out by an operating system Running programs Managing files Managing main memory Controlling peripherals Utility programs 20 Studying the tasks carried out by an operating system Running programs Managing files Week 14 Controlling peripherals done in Week 10, 11 Managing main memory today (Week 12) Week 13 (hard disk) Utility programs 21 Running programs 22 Running programs First machines single user single program running at a time uniprogramming More modern machines multiple users each user perhaps running several programs at same time e.g. bank system e.g. Windows PC multiprogramming 23 Uniprogramming No Operating System Machines run from a console with display lights and toggle switches, input device and printer Scheduling time was an issue because one job had to finish before another could start CPU must wait for I/O instructions to complete before proceeding 24 Programming with a female operating system The girls organise the loading and running of programs. They are effectively the 1940s version of the modern operating system http://www.berkeleyprep.org/webhouse/bh/html/histpic.htm 25 ENIAC (Electronic Numerical Integrator and Computer) 1946 Men occasionally involved as well! 26 ENIAC (Electronic Numerical Integrator and Computer) 1946 ... was the first large-scale, electronic, digital computer capable of being reprogrammed cost $500,000 only operational for 5 months before it had to be shut down for refurbishment and a memory upgrade 27 Uniprogramming 28 Multiprogramming Multiple users accessing the same data e.g. bank system Single user running several programs at the same time e.g. Windows PC 29 Multiprogramming – two main issues Sharing the processor how can two programs be fetching and executing at the same time in the same CPU? Sharing the main memory how can we avoid the different sets of program instructions and data in main memory getting mixed up? 30 Multiprogramming – two main issues Sharing the processor Today how can two programs be fetching and executing at the same time in the same CPU? Sharing the main memory how can we avoid the different sets of program instructions and data in main Week memory getting mixed up? 14 31 Sharing the processor Original problem: expensive , fast CPU waiting for slow peripherals – uneconomic Solution have CPU run another program while waiting 32 Other advantages Carry out tasks simultaneously Share peripherals Mainframe and minis can centralise printers etc Dumb terminals are cheap Share data E.g. control central heating and word process Users can access same files Concurrent programs on same machine This is how we use Windows 33 Disadvantages Breakdowns affect everybody Portability – need link to central machine Expense – but getting cheaper Security risks 34 Switching between programs Done by the kernel (part of operating system) Known as a context switch Each program needs a control block Preserves program’s state CPU register contents Which data files are opened 35 Different strategies for switching When program finished or blocked Simple to implement But, programs can hog the processor At regular intervals (time slicing) Programs cannot hog processor But, complex to control so time overhead This is the strategy in common use 36 Time slicing Blocked programs (waiting for a peripheral) are not allocated time slices Each interval is a time slice Scheduling – deciding which program runs next 37 Running programs are “processes” Processes consist of: The program (set of instructions) Current state of data structures Current state of CPU registers Which I/O devices currently open Which files are currently open 38 Process Creation Parent processes create children processes, which, in turn create other processes, forming a tree of processes Resource sharing alternatives Parent and children share resources Children share subset of parent’s resources Parent and child share no resources Execution alternatives Parent and children execute concurrently Parent waits until children terminate 39 Process states Running Ready During its timeslice While some other process is running Blocked Unable to proceed e.g. waiting for input device 40 Changing Process States ready/waiting running blocked 41 Context switching with interrupts Interrupt Signal to CPU to stop what it is doing and execute an interrupt routine Clock interrupt generated by clock at fixed intervals 42 Scheduling Algorithms A scheduling algorithm is the method by which processes are given access to processor time. e.g. Round Robin Fair Queuing FIFO 43 Lots of Scheduling Algorithms A C D E F Anticipatory scheduling Atropos scheduler CFQ Critical path method Deadline-monotonic scheduling Deficit round robin And so forth Earliest deadline first scheduling Elevator algorithm FIFO FINO Fair Queuing Fair-share scheduling 44 What have we covered? Characteristics of System Software The responsibilities of Operating System The KERNEL Uniprogramming and Multiprogramming Context Switching What makes a process How Processes are managed CPU allocation and Scheduling Algorithms 45 Round 1 Which of the following best describe the purpose of an Operating System? a) b) c) d) To To To To make the computer easy to use ensure hardware is used efficiently store data. execute program instructions. 46 Round 1 Which of the following best describe the purpose of an Operating System? a) b) c) d) To make the computer easy to use To ensure hardware is used efficiently To store data. To execute program instructions. 47 Round 2 Which of the following are operating systems: 1. 2. 3. 4. 5. 6. Unix Visual Basic Pascal Pie Eater Windows Linux 48 Round 2 Which of the following are operating systems: 1. 2. 3. 4. 5. 6. Unix Visual Basic Pascal Pie Eater Windows Linux 49 Round 3 Which of the following best describe the responsibilities of an Operating System? a) To Manage Resources b) To store data. c) To execute program instructions. 50 Round 3 Which of the following best describe the responsibilities of an Operating System? a) To Manage Resources b) To store data. c) To execute program instructions. 51 Round 4 Which of the following best describes the KERNEL? a) The centre of the Operating System b) The part of the Operating System that remains resident in memory c) The execution element of the Operating System 52 Round 4 Which of the following best describes the KERNEL? a) The centre of the Operating System b) The part of the Operating System that remains resident in memory c) The execution element of the Operating System 53 Round 5 Which best describes Multiprogramming Operating Systems? a) The ability to process multiple applications at once b) The ability to give the impression that it is processing multiple applications at once 54 Round 5 Which best describes Multiprogramming Operating Systems? a) The ability to process multiple applications at once b) The ability to give the impression that it is processing multiple applications at once 55 Round 6 Context Switching can best be described as: a) Switching from one CPU to another in a Dual Core Processor b) Saving the state of a process and loading the state of another process c) Switching from one Multiple Simulation to the next 56 Round 6 Context Switching can best be described as: a) Switching from one CPU to another in a Dual Core Processor b) Saving the state of a process and loading the state of another process c) Switching from one Multiple Simulation to the next 57 Round 7 Windows will work on an Apple Macintosh because the computer architecture is similar. TRUE or FALSE ? 58 Round 7 Windows will work on an Apple Macintosh because the computer architecture is similar. FALSE 59 Next Week Hard disc management Quiz in your seminar which is TIMED. You should also be working on the research in relation to your presentation assignment 60 Additional Reading O’Gorman J (2000) Operating Systems 61 References Coustan D, Franklin C How Operating Systems Work [online] http://Computer.Howstuffworks.com [Accessed 10-1-2011] 62