ppt slides
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

ppt slides

on

  • 1,329 views

 

Statistics

Views

Total Views
1,329
Views on SlideShare
1,328
Embed Views
1

Actions

Likes
0
Downloads
14
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • No OS
  • Programming language Ada was named after her She was the daughter of the famed British Poet Lord Byron
  • Everything running in kernel mode is part of OS. Some programs running outside of it are also part of it. Applications running in user mode.
  • - OS provides a variety of services to programmers through SYSCALLs Resource management: Time sharing: CPU, printing Space sharing: memory, disk
  • - OS provides a variety of services to programmers through SYSCALLs Resource management: Time sharing: CPU, printing Space sharing: memory, disk
  • Not until World War II Programs to grind out tables of sines, cosines, and logarithms.
  • No evidence whatsoever to prove that he really said that. First citation was on Usenet 1986. Take it easy on all those misquotes
  • Transistors changed the picture Those computers called Mainframes, with pro operators to run them.

ppt slides Presentation Transcript

  • 1. Operating Systems Tim Ji Lecture 1
    • Outline
      • Course Information
      • History of Operating Systems
      • Basic Components of OS
    • Lab 1
    • Become familiar with Linux
    • Readings
    • Chapter 1
  • 2. 1 Course Information
    • Official Course Outline
      • On course webpage, MS Word document
    • Course Objectives/Learning Outcomes
      • Understand OS algorithms
      • Be able to write multitasking programs with a variety of inter-process communication methods
      • Be able to write scheduling, paging algorithms
    • Textbook: Tanenbaum, “Modern Operating Systems” 2 nd Edition, Prentice Hall
  • 3.  
  • 4. Course Information (2)
    • Instructor
      • Name: Tim Ji
      • Email tji AT conestogac.on.ca
      • Office: 2A503, x2230
      • Office hour: Drop by my office or by appointment
    • Grading
      • 3 tests, 20% each: 60%
      • Assignments + Labs: 40%
    • Assignments
      • Due in class at the end of lecture, 20% reduction in the assignment mark for each school day it is late.
      • The assignments must be your own work. Cheating/copying other people’s files will result in both papers receiving zero.
  • 5. Course Information (3)
    • Labs
      • Lab tasks will be demonstrated in the following week lab, and lab reports must be submitted by the end of the lab. You have 1 week to finish the lab task.
    • Course website
      • http://www.conestogac.on.ca/~tji/os
      • Announcements, assignments, lecture handouts, etc.
      • Check it out at least once per day.
    • Study to pass
      • You have to pass both the tests portion and the assignments portion
    • Assignments/Labs marking
      • Demonstrate your task in lab
      • Answer questions regarding to your own task
      • Programming style of printouts of your source code, for programming assignments/labs
  • 6. Introduction to Operating Systems
    • Topics:
      • Role and purpose of the operating system
      • History of operating system development
      • Functionality of a typical operating system
    • Learning Objectives:
      • Explain the objectives and functions of modern operating systems.
      • Describe how operating systems have evolved over time from primitive batch systems to sophisticated multiuser systems.
      • Describe the functions of a contemporary operating system with respect to convenience, efficiency, and the ability to evolve.
  • 7. Early Computers
    • First Computer
      • Charles Babbage (1791-1871) designed the first true digital computer called the analytical engine .
      • That was purely mechanical and intended to do math operations
      • The engine was supposed to be made of brass, and steam powered
      • He did not actually built the machine but inspired others in the field.
  • 8. Early Computers
    • Babbage also thought of the concept of software
    • And hired the first programmer (Lady Ada , Countess of Lovelace) for his analytical engine
  • 9. Current Computer Systems
    • A computer system consists of
      • hardware
      • system programs
      • application programs
  • 10. What is an Operating System (1)
    • Microsoft Glossary:
      • The software that controls the allocation and usage of hardware resources such as memory, central processing unit (CPU) time, hard disk space, and peripheral devices (like speakers or a mouse).
      • The operating system is the foundation software on which programs, such as Word or Excel, depend.
      • An example of an operating system is Microsoft Windows® XP.
  • 11. What is an Operating System (2)
    • Provide a service for clients - a virtual machine (top-down view)
    • An operating system is a layer of the computer system (a virtual machine) between the hardware and user programs.
      • Multiple processes
      • Multiple address spaces
      • File system
  • 12. What is an Operating System (3)
    • Resource manager (bottom-up view)
    • An operating system is a resource manager .  Resource management includes
      • Transforming resources - to provide an easier to use version of a resource
      • Multiplexing resources - create the illusion of multiple resources
      • Scheduling resources - when and who gets a resource
    • The hardware resources it manages include
      • Processors - process management system
      • Memory - memory management system
      • I/O devices - I/O system
      • Disk space - file system
  • 13. What is an Operating System (4)
    • The hardware resources are transformed into virtual resources so that an operating system may be viewed as providing a virtual computers , one to each user. A virtual machine (top down view) consists of
      • Processes - virtualization of the computer including a virtual processor that abstracts the cpu - user mode instruction set + system calls
      • Virtual memory - virtualization of physical memory
      • Logical devices - virtualization of physical devices
      • Files - virtualization of disk space
  • 14. What is an Operating System (5)
    • The general functions of an operating system
      • Allocation - assigns resources to processes needing the resource
      • Accounting - keeps track of resources - knows which are free and which process the others are allocated to.
      • Scheduling - decides which process should get the resource next.
      • Protection - makes sure that a process can only access a resource when it is allowed
    • Basic Functions
      • Process management
      • Resource management
        • Device managment
        • Memory management
        • File management
  • 15. History of Operating Systems (1)
    • First generation 1945 - 1955
      • Technology: vacuum tubes & plugboards
      • Programming: setting some switches
      • Programming language: machine language
      • Tasks: tables of sine, cosine, logarithms
      • OS: none
  • 16. A Famous Remark
    • "I think there is a world market for maybe five computers."
      • Thomas Watson, chairman of IBM - 1943
  • 17. History of Operating Systems (2)
    • Second generation 1955 – 1965
      • Technology: Transistors
      • Programming: Punched cards
      • Programming languages: FORTRAN & Assembly
      • Tasks: Scientific
      • Computer: Mainframes
      • OS: Batch system
    • Universities started to buy computers (millions $)
  • 18.
      • bring cards to IBM 1401 machine (good at card reading)
      • read cards to tape
      • put tape on IBM 7094 which does computing
      • put tape on IBM 1401 which prints output offline
    Early Batch System
  • 19. Famous Remarks
    • "I have traveled the length and breadth of this country and talked with the best people, and I can assure you that data processing is a fad that won't last out the year.“
      • The editor in charge of business books for Prentice Hall - 1957
  • 20. History of Operating Systems (3)
    • Third generation 1965 – 1980
      • Technology: ICs
      • Programming: Punched cards
      • Programming languages: FORTRAN & Assembly
      • Tasks: Scientific & commercial
      • Computers: IBM 360, DEC PDPs
      • OS: Multiprogramming/timesharing, spooling
    • OSes Developed:
      • MULTICS (father of all modern OSes)
      • UNIX (System V, BSD)
      • POSIX (by IEEE)
      • MINIX (by Tanenbaum)
      • Linux (derived from MINIX)
  • 21. Famous Remark
    • “ There is no reason anyone would want a computer in their home.“
      • Ken Olson, president, chairman and founder of Digital Equipment Corp. - 1977
  • 22. History of Operating Systems (4)
    • Fourth generation 1980-Present
      • Technology: VLSI
      • Programming: High level
      • Programming languages: C/C++, Java, ……
      • Computer: PC
      • OS: Windows, MacOS, Linux ……
    • Cheap PCs
  • 23. Famous Remark
    • “ We don't see Windows as a long-term graphical interface for the masses.“
      • A Lotus Software Development official, while demonstrating a new DOS version - 1989
  • 24. The Operating System Zoo (1)
    • Mainframe operating systems
      • Room-size computers
      • High I/O capacity
      • Offers:
        • Batch processing (no interaction, such as large reports)
        • Transaction processing (large number of small requests)
        • Timesharing (multiple users sitting in front of clients)
  • 25. Famous Forcast
    • "Computers in the future may weigh no more than 1.5 tons."
      • Popular Mechanics, forecasting the relentless march of science, 1949
  • 26. The Operating System Zoo (2)
    • Server operating systems
      • Offer services like print, file, or web
      • UNIX, Windows 2000, Linux
    • Multiprocessor operating systems
      • Parallel computing
    • Personal computer operating systems
      • Single user with a good GUI, such as Windows 98, Windows 2000, Macintosh OS, Linux
  • 27. The Operating System Zoo (3)
    • Real-time operating systems
      • E.g. industrial process control systems where each job must be completed in the specified time.
      • Hard real-time (nuclear reactor control systems) or soft-real time systems (e.g multimedia systems) depending on the acceptance of missing deadlines
    • Embedded operating systems:
      • Real-time systems with some resource constraints like memory, CPU, power.
    • Smart card operating systems
      • Extremely primitive OS running on credit card sized devices with a CPU.
  • 28. Computer Hardware
    • Components of a simple personal computer
    Monitor Bus
  • 29. CPU
    • Brain of the computer
      • ALU (Arithmetical- Logical Unit)
      • CU (Control Unit, fetch-execute-decode instructions)
    • Has a certain set of instructions it can recognize and execute
    • Basic CPU cycle
      • Fetch the next instruction
      • Decode it to determine its type and operands
      • Execute it
      • … ..
    • Programs are list of instructions executed by the CPU
    • When the computer powers up, CU of CPU starts the fetch-decode-execute cycle
    • Instructions may be OS instructions or other programs
  • 30. CPU Modes
    • A bit in PSW controls the mode
    • Kernel Mode :
      • CPU can execute every instruction in its instruction set
      • CPU can use every feature of the hardware
      • OS runs in kernel mode
    • User Mode :
      • Only a subset of instructions can be run
      • And a subset of hardware features are accessed
      • Generally all instructions involving I/O and Memory protection are disallowed in that mode
    • To obtain OS services, a user program must make a system call that traps into kernel mode and invokes the OS
    • Trap instruction switches from user mode to kernel mode and starts the operating system (system calls and errors such as division by zero causes trap instructions)
  • 31. Pipelining
    • Parallelize the fetch, decode, execute sequence
    • Three stage pipeline : While executing instruction N, decode instruction N+1, and fetch instruction N+2
    • What happens when a conditional branch occurs in an instruction?
  • 32. CPU Pipeline
    • (a) A three-stage pipeline (three instructions processed in 1 cycle)
    • (b) A superscalar CPU (with multiple execution units)
  • 33. Pipelining Instruction N+2 Instruction N+3 Instruction N + 4 One CPU Cycle Instruction N + 1 Instruction N Fetch N Decode N Fetch N+1 Execute N Decode N+1 Fetch N+2 Execute N+1 Decode N+2 Fetch N+3 Execute N+2 Decode N+3 Fetch N+4
  • 34. Memory Hierarchy (1)
    • Typical memory hierarchy
      • numbers shown are rough approximations
  • 35. Memory Hierarchy
    • Magnetic Tape :
      • Backup purposes and for storing very large data sets.
      • One dimensional, only sequential access is possible
      • Reliable (no tape crashes, or time based data corruption)
      • Was the main data storage medium of the past
    • Optic CDs:
      • Faster than tape
      • Used for permanent storage (now rewritable)
  • 36. Memory Hierarchy
    • Magnetic disks:
      • Are faster than tapes and CDs
      • They are the main storage medium these days
      • Data stored in concentric cylinders
      • Disk head moves in discrete steps
      • Each position of the disk head identifies a track (divided into multiple sectors, typically 512 bytes)
      • Rotates continuously with a certain speed (e.g. 7200 rpm)
  • 37. Memory Hierarchy
    • Disks and tapes are mechanical devices, therefore they are slow compared to (RAM and Cache)
    • Main Memory (Random Access Memory) :
      • Volatile
      • Much Much faster than magnetic disks but more expensive too
    • Cache:
      • Faster than RAM and more expensive
      • CPU requests first go to cache, and if they are there (cache hit) then fine, if not there (cache miss) then RAM is accessed
      • There can be multiple cache levels
      • Cache is divided into cache lines (usually 64 bytes at each line)
  • 38. Memory Hierarchy
    • Registers
      • They are the fastest accessible memory locations
      • Placed at the CPU.
      • They are usually of size 32 bits, or 64 bits depending on the CPU type
  • 39. Memory Hierarchy
    • Read Only Memory (ROM)
      • Write once, read many times
      • Low level I/O cards
      • Code for starting the computer
    • Electrically Erasable Rom (EEPROM)
      • Non volatile
    • Flash RAM
      • Non volatile
  • 40. Memory Hierarchy
    • CMOS (Complementary Metal Oxide Semiconductor)
      • Volatile but can be sustained with mother board battery for years.
      • May give checksum errors when being corrupted
      • Very small, 64 bytes.
      • Holds the current time and date, configuration parameters (like which disk to boot from etc.)
  • 41. Yet another famous quote!
    • "640K ought to be enough for anybody."
      • Bill Gates, 1981
  • 42. I/O Devices
    • An input device transfers data from a mechanism like keyboard, mouse, touch screen, or microphone into a CPU register. CPU will then store the data into Main Memory
    • For output devices , CPU fetches the information from main memory to its registers and transfers this information via the bus to an output device like screen, speaker, or printer.
    • Communication devices : serial and parallel ports, infrared transmitter/receivers, wireless network cards, network interface cards
  • 43. CPU DISK CONTROLLER DISK PRINTER PRINTER CONTROLLER MEMORY MEMORY CONTROLLER
    • Device controllers have microprocessors.
    • They can work in parallel.
    • They can tell CPU when they are done.
  • 44. How I/O Can Be Done
    • Three methods:
      • Busy waiting through system call
      • Interrupt
      • DMA (Direct Memory Access)
  • 45. Lab 1: Get Familiar with Linux
    • Introduction to Linux
    • Lab material is available on the course webpage
    • Follow the lab task specifications -- your marks depend on it.
  • 46. Readings
    • Tanenbaum, Chapter 1