1 / 26

Operating Systems

Operating Systems. Lecture #11 Dr. Adam P. Anthony. Overview. Operating System History Early OS theory and terminology Operating System Components The many hats an OS wears Glance at the advanced: process management and deadlock Survey of existing operating systems.

nalani
Download Presentation

Operating Systems

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. Operating Systems Lecture #11 Dr. Adam P. Anthony

  2. Overview • Operating System History • Early OS theory and terminology • Operating System Components • The many hats an OS wears • Glance at the advanced: process management and deadlock • Survey of existing operating systems

  3. Types of Computer Software • Application software • Performs specific tasks for users • System software • Provides infrastructure for application software • Consists of: • operating system: today’s lecture • utility software: side programs that help other applications (picture viewers, DVD burner software, etc.)

  4. Figure 3.3 Software classification

  5. The First “Operating System” Computer Operator http://www.library.upenn.edu/exhibits/rbm/mauchly/jwm8b.html

  6. Early OS History • First Operating System: None at all! • Even in the first desktop computers, to run a new program, a human would insert a new disk, then hit the RESET button (think early game consoles) • Next step: Batch processing • Set up a ‘batch’ of several (say, 5) programs to be run automatically in sequence • But still set up manually by a human • Done to reduce crowds in the computer room • Two main influences in operating system development: interactivity and sharing

  7. Interactivity and Sharing • Interactive Process: computer programs meant to be observed and/or interacted with by a human • Remember, processors are too fast to be observed! • Real-time processing job: anything that cannot be paused and/or accelerated to favor the processor • Music, movies, games, word processors • Sharing: What is a fair way to reserve/allocate computer resources?

  8. The “Dark” Ages of computing • GASP! In the 70’s and 80’s one computer was shared by 100’s of people (and it didn’t even have Farmville!) • This limitation in computing power drove much of computing theory and practice • People began to expect more—to be able to interact with their programs and make decisions in real time • Not fair to give a person exclusive, real-time access to a computer when there were 100’s of others who wished to run their programs (which may not be interactive)

  9. Modern Operating Systems • Modern operating systems deal with past problems using Multi-Programming: • The ability to run multiple programs “simultaneously” (next slide) • Enables time sharing • Multiple users running their own programs at the same time • Enables multitasking • One user running multiple programs at the same time • Time-sharing leads to several modern concepts and problems: • Usernames and passwords to permit/restrict access • Information and Process Security are now necessary

  10. Fitting between the gaps • Processors move faster than the human eye can perceive • Homework problem: “If a typist types 60 words per minute…how much time would pass between typing each character? If a multiprogramming operating system allocated time slices in 20 mSec time units…how many time slices could be allocated between characters being typed? • Idea: we can run a different user’s program in between key presses, and the user will never know the difference • To each user, it appears that their programs are being run exclusively (i.e. it simulates simultaneous execution)

  11. Time-sharing between process A and process B

  12. Glance at the Advanced: Process Management • Modern computers will run between 50 and 100 processes “simultaneously” • “Simultaneous” means that programs rapidly take turns using the processor • Process switch: time it takes to freeze a process and record where it left off, then load a new process • What is the best way to decide which program goes next? • Random? • First come, first served? • Priority?

  13. Time Sharing and Load Balancing • Time sharing was invented when computers had only one processor • New computers have 2,4,8+ processors • Time sharing still applied, but to a lesser extent • Also important: load balancing • If one processor is at 90% capacity, and the other is at 15% capacity, it makes sense to balance the system by transferring some processes to run on the second processor • A more difficult task: scaling • Breaking a program up into separate pieces to achieve a speedup

  14. Anatomy of a Modern Operating System Shell Text-based shell Window Manager Kernel Input/output Device Manager Process Manager Drive/File Manager User Access/ Security Manager Network Manager Memory Manager

  15. What an OS Does • Process management (run programs) • File management (store data) • Security (files and programs) • Resource control • Disks • Printers • Monitors/Video Cards • Speakers/Sound Cards • USB/Firewire • Networking • Much more!

  16. Loading the Operating System • In Chapter 2, we learned that a processor does nothing until it receives an instruction • Modern computers follow a bootstrapping process to get the operating system up and running on the computer • Find the OS on the hard drive • Load the OS into memory • Set the program counter at the beginning of the OS instructions

  17. ROM and Firmware • ROM = Read Only Memory • All computers have a small amount of ROM that permanently stores its information • Write a program for the bootstrapping process (find, load, transfer control to OS) and store it on ROM • Configure processor to run program in ROM each time the computer is powered on

  18. Bootstrapping in Pictures

  19. Glance at the Advanced: Deadlock • To eliminate conflicts, a process can lock a resource (e.g. only one process can use the printer at the same time) • Imagine: One process has a lock on the printer, but needs access to the hard drive. A second process has a lock on the hard drive, but needs access to the printer. Neither will release their lock until they obtain the other

  20. Conditions for Deadlock • Conditions required for deadlock 1. Competition for non-sharable resources 2. Resources requested on a partial basis 3. An allocated resource can not be forcibly retrieved

  21. Survey of Major Operating Systems • Two dominating classes of operating systems Windows and Unix • We’re familiar with Windows (25+ copies in this room right now!) • Many Versions/Types of Windows • Newer versions build on top of past versions • Strive for backward compatability • Parallel versions: more about controlling price • Better versions = lesser version + more stuff

  22. What is UNIX? • UNIX was (is) originally an operating system in its own right • Originally developed in 1969 by AT&T • UNIX is a name trademarked by The Open Group • Can’t say your operating system is UNIX without their approval • There are also many “unix-like” operating systems which offer nearly-identical functionality • Usually we’ll just say it’s a UNIX system though

  23. Characteristics of a UNIX system • Time-sharing multi-user operating system • Strong emphasis on usernames and passwords • Processes have ‘owners’ • Command-line interface (keyboard only, no windows) • Popular with programmers • Popular with web servers • UNIX is known for being stable over long periods without rebooting

  24. Unix Example: Linux • Linux = Unix-like system created by LinusTorvalds • Major early contributor to the Open-Source Movement • Open source led to many independently controlled variations: Distributions • Linux and most of the software the runs on it is 100% free • Operating system made BY programmers/system administrators, FOR programmers/system administrators • Can be a very enjoyable computing experience if you deal with the steep learning curve

  25. UNIX Example: MAC OS X • Created by Apple in 2000 • Complete re-design of the MAC OS • Threw all their old code out! • Has a UNIX back-end for (they say) stability and power • Also has lots of graphical power in the user-interface to provide a nice windowed experience • Many CS and CIS majors enjoy the ‘best of both worlds’ with MAC OS X • Commercialized, user-friendly experience • UNIX backend allows loading of classic power tools for programming, web servers, and other system administration tasks

  26. Summary • Operating system: first program a computer runs • OS has many roles • Disks/Memory • Input/Output • Process Management • Deadlock: a real problem that Operating Systems work to solve • There are many types of operating systems out there • You DO have a choice!

More Related