1 / 75

Introduction to Operating Systems: Concepts, History, and Structure

This chapter provides an introduction to operating systems, including their history, categories, and concepts. It also covers the structure of an operating system and the role it plays in managing computer hardware and resources. The chapter explores the evolution of operating systems through generations and highlights key advancements in the field.

acraig
Download Presentation

Introduction to Operating Systems: Concepts, History, and Structure

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. Chapter 1Introduction

  2. Outline • What is an operating system? • History of operating systems • Categories of operating systems • Computer hardware review • Operating system concepts • System calls • Operating system structure

  3. Computer As A Complex System • Many resources • Hardware: processors, memory, disks, printers, keyboard, display, network interfaces, … • Software: office tools, multimedia players, … • Many tasks • Surfing web, handling emails, solving equations, playing music, … • Many users • Playing with computer should be easy

  4. Read From Diskette … • Basic commands: read and write • 13 parameters, packed into 9 bytes • Controller chips • 23 status and error field • Motor switch: on/off • Don’t leave motor on too long! • Do you want to program the hardware directly? • A simpler interface is needed!

  5. Why A Simple Interface Possible? • Many tedious details can be handled by default • They are out of the user’s interest • Only some key features are important • Examples: file name, length of the file, etc • A simple interface • Present key features to programmer • Hide many tedious details • Meet requirements from many programs

  6. OS As An Extended Machine • Extended machine/virtual machine • Easier to program than the underlying hardware • Provide a variety of services (system calls) • Trade-off • Higher efficiency in program development and system management • Less efficiency in program execution

  7. Programs Without Coordination • Three programs want to output to a printer • A chaos if no coordination • How to coordinate? • Buffer outputs on disk • Copy complete outputs to printer one by one • Do you want to coordinate everything in a computer system? • A resource manager is needed!

  8. OS As A Resource Manager • Multiplexing (sharing) resources • In time • Users/programs take turns using resources • CPU, printers, etc. • In space • Users/programs get parts of resources • Main memory, disk, etc. • Issues about a good manager • Fairness, efficiency, protection, …

  9. What Is An Operating System? Provide user programs with a simpler interface Manage resources

  10. Outline • What is an operating system? • History of operating systems • Categories of operating systems • Computer hardware review • Operating system concepts • System calls • Operating system structure

  11. History of Operating Systems • OS and architecture of computers • Computer evolves  so does OS • To provide better service  OS has impact on computer design • Keep evolving through years • Four generations so far

  12. The First Generation Computer • Vacuum tubes and plugboards • 1944-1955 • Applications: • Straightforward numerical calculations • Scenario • Single group of people designed, built, programmed, operated and maintained a machine • All in absolute machine language • No operating system • The people maintaining the computers are OS?!

  13. The Second Generation OS • Transistors and batch systems • 1955-1965 • Applications • Scientific and engineering calculation IBM 1401 IBM 7094 IBM 1401 Do computing Print out Read batch of jobs onto tape Cards from programmers Input tape Output tape

  14. Ancestor of Today’s OS • Scenario: batch systems • Fortran • Operating system • Read a job from tape  run the job  write output onto a second tape • Load next job • Examples: • FMS, IBSYS

  15. The Third Generation OS • Features: ICs and multiprogramming • 1965-1980 • Applications • Numerical calculations in science & engineering • Word-oriented, large-scale scientific computers • Massive commercial data processing • Character-oriented, commercial computers • Can we solve both problems at a single stroke?

  16. System/360 and OS/360 • One family • A series of software-compatible machines • Different only in price and performance • Capable of both scientific & commercial apps • Problems • Dinosaurs: huge operating systems • Millions of instructions, thousands of developers

  17. Key Advances in 3rd Gen OS • Multiprogramming • Run job 2 while job 1 waiting for I/O • Keep CPU busy • Spooling • Read job from cards to disk asap • Load new jobs from disk whenever old job done • Time sharing • CPU is allocated in turn

  18. Milestones • IBM OS/360 • M.I.T. CTSS • M.I.T. MULTICS • Ken Thompson UNIX • AT&T UNIX System V • UC Berkeley UNIX BSD • IEEE POSIX • Andrew S. Tanenbaum MINIX • Linus Torvalds Linux

  19. The Fourth Generation OS • Personal computers • 1980-now • An individual has her own computer • Milestones • Kildall CP/M for Intel 8080, Z80 • MS-DOS/BASIC for IBM PC • Engelbart GUI • MS Windows, Windows NT • UNIX X Windows • Network & distributed operating systems

  20. Outline • What is an operating system? • History of operating systems • Categories of operating systems • Computer hardware review • Operating system concepts • System calls • Operating system structure

  21. Categories of Operating Systems • Mainframe operating systems • Server operating systems • Multiprocessor operating systems • Personal computer operating systems • Real-time operating systems • Embedded operating systems • Smart card operating systems

  22. Mainframe Operating Systems • Why mainframe computers • Strong I/O capability, e.g., 1000 disks, TB space • High-end servers • Features of OS • Batch • Transaction processing • Timesharing • Example: IBM OS/390

  23. Server Operating Systems • Hardware platforms • Very large personal computers or workstations • Services • Printing • File accessing • Web • Examples • UNIX, Windows 2000, Linux

  24. Multiprocessor Operating Systems • Multiple CPUs within a single system • Parallel computers: loosely coupled • Multi-computers: tightly coupled • Multiprocessors: share memory • Features of OS • Communications and connectivity • Variations of the server operating systems

  25. Personal Computer OS • Good interface to a single user • Word processing, spreadsheets, internet access, … • Examples • Windows 98, Windows 2000 • Macintosh operating system • Linux

  26. Real-time Operating Systems • Having time as a key parameter • Industrial process control systems • Hard/soft real-time systems • Hard real-time system: actions absolutely must occur at a certain moment • Robot at an assembly line • Soft real-time system: missing an occasional deadline is acceptable • Digital audio or multimedia systems

  27. Embedded Operating Systems • Very small computers • Palmtop/PDA • Device controllers • Features of OS • Kind of real-time systems • Restrictions in size, memory, power, … • Example: PalmOS, Windows CE

  28. Smart Card Operating Systems • CPU chips on credit card-sized devices • Proprietary systems • Features • Java oriented • Multiprogramming for Java applets • Resource management and protection

  29. Outline • What is an operating system? • History of operating systems • Categories of operating systems • Computer hardware review • Operating system concepts • System calls • Operating system structure

  30. Components of a Computer • System bus: connect all components Floppy disk driver Hard disk driver Monitor Keyboard Floppy disk controller Video controller Keyboard controller Hard disk controller CPU Memory Bus

  31. CPU • Registers • General registers • Program counter: pointer to next instruction • Stack pointer: to the top of current memory • PSW: condition code bits • Basic model • Fetching instruction  decoding  executing • Execution image: a snapshot of registers

  32. Pipeline and Superscalar • Pipeline: overlap instruction execution • Superscalar: multiple execution units I1 Fetch unit Decode unit Execute unit I2 I3 Execute unit Fetch unit Decode unit Holding buffer Execute unit Fetch unit Decode unit Execute unit

  33. System Calls • Two modes in CPU • Kernel mode: full capability • User mode: disallow I/O, memory protection • System calls: get OS service for user program • Traps: OS gets control • TRAP instruction switches from user mode to kernel mode and starts OS • When the work done, control is returned to user program

  34. Memory Hierarchy

  35. Nonvolatile RAM • ROM • Programmed once, cannot be changed afterward • Fast and inexpensive • Boot strap loader, fixed programs • EEPROM and flash RAM • Rewritable • CMOS • Volatile, one battery lasts for several years

  36. Memory Management • Hold multiple programs in main memory • Improve CPU utilization • Problems • Protection • Program A is not allowed to fetch data within program B • Relocation • Each program starts from logical address 0 • How to load and allocate them into main memory?

  37. Base/limit Registers 0xFFFFFFF • Base register • Point to the start of a program • Its content is added to every program address • Limit register • Record the size of program + data • Limit of addresses • Virtual address  physical address • Base = 4096, limit = 6114 • Virtual addr = 2000  physical addr = 6096 < limit, legal! • MMU: memory management unit Limit Base 0

  38. Split Program and Data Registers when running program 2 Registers when running program 1 • Why: multiple users may run a same program • How: base/limit registers for program and data, respectively • Overhead of switching: context switch Limit-2 Base-2 Limit-1 Base-1 Limit-1 Limit-2 Base-1 Base-2

  39. I/O Devices • Controller: physically controls the devices • Devices are diverse and complicated • Device driver: software talks to a controller • Depends on operating systems • Installation of drivers • Relink kernel with new driver, reboot • Register driver in system file, reboot • Install on-the-fly, NO reboot Operating system driver controller device

  40. Busy Waiting I/O

  41. I/O by Interrupt • Driver programs controller by writing its device registers. Controller starts device • Controller finishes reading/writing, and then signals the interrupt controller • If interrupt controller can accept the interrupt, it informs CPU • Interrupt controller puts the number of device on the bus, CPU read it Disk drive CPU Interrupt controller Disk controller 3 4 1 2

  42. Interrupt Processing 3. Return 1. Interrupt 2. Dispatch to handler

  43. Direct Memory Access (DMA)

  44. Advanced Computer With Multiple Buses Cache bus Local bus Memory bus Level 2 cache PCI bridge Main memory CPU PCI bus USB bus IDE bus Available PCI slot SCSI USB ISA bridge Graphics adaptor IDE disk Mouse Keyboard Monitor SCSI bus ISA bus Available ISA slot Modem Sound card Printer

  45. Plug and Play • Problems without plug and play • Each I/O card has a fixed interrupt level/address • When new card comes  conflict level/address • Use switches/jumpers to select good level/address  more than an art • How plug and play • System collects info/assign level/address for I/O devices • BIOS does major work

  46. Warm-up • Operating system = extended (virtual) machine + resource manager • Hardware evolving  operating system evolving • 4 generations • Various hardware platform  various OS • Important components of a computer • CPU, bus, memory, I/O

  47. Outline • What is an operating system? • History of operating systems • Categories of operating systems • Computer hardware review • Operating system concepts • System calls • Operating system structure

  48. Process • A program in execution • Address space: a list of memory locations the process can read/write • Registers, e.g., PC, SP, … • Examples • Two processes running two programs: Word, Excel • Two processes running the same program: multiple web-browsers in a PC

  49. Information About Processes • Process table in operating systems • Registers, etc. • Core image: suspended process address space • Process information = Process table entry + core image

  50. Process Management System Calls • Create a new (child) process • Process tree • Interprocess communication • Communication • Synchronization • Request/release memory • Alarm signal • E.g., remote communication A B C D E F

More Related