1 / 62

Computer Systems 2009-2010

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. Need for system software.

korene
Download Presentation

Computer Systems 2009-2010

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Systems2009-2010 Week 12: System Software Alma Whitfield

  2. 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

  3. Need for system software • Computers very complex • Come with large bundles of software to help the non-specialist • This software is called system software

  4. 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.

  5. 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

  6. What an operating system does Just like mother Teenager does not know how to operate toaster etc .. … but mother does

  7. 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

  8. 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?

  9. What an operating system does Who is mother Operating system Who is the teenager Application program

  10. Tasks carried out by an operating system Running programs Managing files Managing main memory Controlling peripherals Utility programs

  11. Running programs • User requests a program • mouse click • program name at command line • This triggers a sequence of actions • 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

  12. 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

  13. 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

  14. Controlling peripherals • Operating system • includes • kernel • drivers • Drivers • plug and play

  15. 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

  16. Utility programs • Editors • Clock • Calculator • Calendar • Whatever else those nice guys at Microsoft can think of

  17. 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

  18. Do we need an Operating System? Is the statement below True or False ? • You can’t use a computer without an Operating System!

  19. 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

  20. Studying the tasks carried out by an operating system Running programs Managing files Managing main memory Controlling peripherals Utility programs

  21. Studying the tasks carried out by an operating system Running programs today (Week 12) Managing files done in Week 10, 11 Managing main memory Week 14 Controlling peripherals Week 13 (hard disk) Utility programs

  22. Running programs

  23. Running programs • First machines • single user • single program running at a time • uniprogramming • More modern machines • multiple users • e.g. bank system • each user perhaps running several programs at same time • e.g. Windows PC • multiprogramming

  24. 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

  25. Programming with a femaleoperating 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

  26. ENIAC (Electronic NumericalIntegrator and Computer) 1946 Men occasionally involved as well!

  27. ENIAC (Electronic NumericalIntegrator 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

  28. Uniprogramming

  29. Multiprogramming • Multiple users accessing the same data • e.g. bank system • Single user running several programs at the same time • e.g. Windows PC

  30. 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?

  31. 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? Today Week 14

  32. Sharing the processor • Original problem: • expensive , fast CPU waiting for slow peripherals – uneconomic • Solution • have CPU run another program while waiting

  33. Other advantages • Carry out tasks simultaneously • E.g. control central heating and word process • Share peripherals • Mainframe and minis can centralise printers etc • Dumb terminals are cheap • Share data • Users can access same files • Concurrent programs on same machine • This is how we use Windows

  34. Disadvantages • Breakdowns affect everybody • Portability – need link to central machine • Expense – but getting cheaper • Security risks

  35. 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

  36. 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

  37. Time slicing Each interval is a time slice Blocked programs (waiting for a peripheral) are not allocated time slices Scheduling – deciding which program runs next

  38. 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

  39. 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

  40. Process states • Running • During its timeslice • Ready • While some other process is running • Blocked • Unable to proceed e.g. waiting for input device

  41. Changing Process States • ready/waiting • running • blocked

  42. Context switching with interrupts • Interrupt • Signal to CPU to stop what it is doing and execute an interrupt routine • Clock interruptgenerated by clock at fixed intervals

  43. Scheduling Algorithms • A schedulingalgorithm is the method by which processes are given access to processor time. • e.g. • Round Robin • Fair Queuing • FIFO

  44. Lots of Scheduling Algorithms • A • Anticipatory scheduling • Atropos scheduler • C • CFQ • Critical path method • D • Deadline-monotonic scheduling • Deficit round robin • E • Earliest deadline first scheduling • Elevator algorithm • F • FIFO • FINO • Fair Queuing • Fair-share scheduling And so forth

  45. 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

  46. Round 1 Which of the following best describe the purpose of an Operating System? • To make the computer easy to use • To ensure hardware is used efficiently • To store data. • To execute program instructions.

  47. Round 1 Which of the following best describe the purpose of an Operating System? • To make the computer easy to use • To ensure hardware is used efficiently • To store data. • To execute program instructions.

  48. Round 2 • Which of the following are operating systems: • Unix • Visual Basic • Pascal • Pie Eater • Windows • Linux

  49. Round 2 • Which of the following are operating systems: • Unix • Visual Basic • Pascal • Pie Eater • Windows • Linux

  50. Round 3 Which of the following best describe the responsibilities of an Operating System? • To Manage Resources • To store data. • To execute program instructions.

More Related