Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CmpE 241 Fall 2006 CHAPTER 1- INTRODUCTION TO OPERATING SYSTEM Read: Tanenbaum Ch. 1. Computer System Overview A computer system consists of hardware and software that are combined to provide a tool to solve specific problems. Hardware Resources Processor (CPU): instructions. The brain of the computer. Executes Memory: Stores program and data. A typical memory hierarchy: Registers, Cache, Main Memory(RAM), Magnetic disk, Magnetic Tape. Input / Output (I/O) controllers: I/O devices. Disk device: Transfers data to and from Long term storage for data. Software Classification System Programs: Provides a general environment in which programmers can create specific applications. Operating System, Application Software’s(compilers, editors, command interpreter, etc.) Application Programs: Intended to solve a specific problem. Word processing, spread sheets, database systems. Introduction- p: 1/12 CmpE 241 Fall 2006 Banking System Airline reservation Web browser Command Compilers Editors interpreter Operating system Application programs System Programs Machine language Hardware Microarchitecture Physical devices A Computer system consist of hardware, system programs, and application programs Introduction- p: 2/12 CmpE 241 Fall 2006 What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware OS goals: o Control and execute user programs o Make solving user problems easier o Make the computer system convenient to use. Ultimate goal is to use the computing resources in an efficient and effective manner. The OS is the part of the system programs that manages the utilization of the hardware used by other system programs and all application programs. It is the system program that acts between the hardware and the user programs. Operating System provides services to user programs. o Through system calls / message passing o File system service o I/O service o Memory service OS hides hardware from user programs. Introduction- p: 3/12 CmpE 241 Fall 2006 Computer System Components Hardware: Provides basic computing resources (CPU, memory, I/O devices, network connections) Operating System: Controls and coordinates the use of the hardware among the various applications programs for various users. Application programs: Define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). Users: Require management and provisioning for (people, machines, other computers). Abstract View of System Components Introduction- p: 4/12 CmpE 241 Fall 2006 Operating System Definitions Resource allocator: Manages and allocates resources between the processes and the users(CPU, memory, file storage, I/O devices, etc.). Control program: Controls the execution of user programs and operations of I/O devices. Kernel: The one program running at all times in the memory (all else being application programs). It forms the core of the operating system. Shell(command interpreter): It is the interface between the OS and the user. It allows the user to instruct the machine and to run programs. History of Operating Systems First Generation: *1945-1955 *Vacuum Tubes *OS: Plugboards Second Generation: *1955-1965 *Transistors *OS: Batch Systems Third Generation: *1965-1980 *Integrated circuits *OS: Multiprogramming Fourth Generation: *1980-present *Large scale integration *Personal computers *OS: personal systems Next Generation: *???? *System connected to high speed networks *Wide area resource control *OS: net-centric computing, embedded systems. Introduction- p: 5/12 CmpE 241 Fall 2006 Simple Batch Systems First real OS: * OS was stored in one part of memory * OS loaded a single job from a card reader into memory * Ran that one job then loaded the next job. * Cards told the OS what to do card reader Early batch system – bring cards to 1401 – read cards to tape – put tape on 7094 which does computing – put tape on 1401 which prints output Memory layout Introduction- p: 6/12 CmpE 241 Fall 2006 Spooling( a future of third generation) Operating system reads jobs from cards onto disk instead of reading directly into memory (reading is time consuming so during reading some other jobs are also performed). Whenever a running job finished the operating system load a new job from the disk into the now-empty partition and run it. Spooling uses disk as a huge buffer e.g. storing output files until the output devices are able to accept them. Overlap I/O of one job with computation of another job. While executing one job, the OS: o Reads next job from card reader into a storage area on the disk (job queue). o Outputs printout of previous job from disk to printer. Job pool – The sets of jobs. Spooling: Simultaneous Peripheral Operation on-line: o Computer overlapped I/O of one job with execution of another o Still only one job active at any given time o Reduces CPU idle time. Introduction- p: 7/12 CmpE 241 Fall 2006 Multi-programmed Batch Systems The operating system keeps several jobs in memory at a time (known as job pool).The CPU is multiplexed (shared) among them. The OS picks one job to be executed by CPU from memory(jobs pool). The job may have to wait e.g. (I/O task) for some tasks. When that job has to wait, OS switches to another job. Eventually, the first job finishes waiting and gets the CPU back. Multiple jobs in memory; all are protected from one another. • Multiprogramming system – three jobs in memory – 3rd generation Introduction- p: 8/12 CmpE 241 Fall 2006 OS Features for Multi-programming: I/O routine supplied by the system. Memory management- the system must allocate the memory to several jobs and should know their exact locations. CPU Scheduling--the system must choose among several jobs ready to run. Allocation of devices (other resources) Job scheduling mechanism is needed to know which job in the job pool is to be loaded into memory Disk storage management Time-Sharing Systems -- Interactive Computing Each user has online terminal A time-shared OS uses CPU scheduling and multiprogramming that provides each user a small portion of a time-shared computer. Each user executes his own process. The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory). The CPU is switched among multiple jobs so frequently that the users may interact with each program during execution. On-line communication between the user and the system is provided; when the operating system finishes the execution of one request / command, it seeks the next “control statement” not from a card reader, but rather from the user’s keyboard. Online system must be available for users to access data and code Introduction- p: 9/12 CmpE 241 Fall 2006 Personal Computer Systems Typically, in personal computers the computer system is dedicated to a single user. May run several different types of operating systems (Windows, Unix, Linux, MacOS, etc.) Components of a simple personal computer Parallel Systems Multiprocessor systems with more than one CPU in close communication. Tightly coupled system- processors share memory and a clock; communication among processors usually takes place through the shared memory. Advantages of Parallel Systems: o Increased throughput: more work done in the same time period. o Increasing processors by n does not mean decreasing operation time by n. o Economical: Since peripherals, power supplies are all shared, several programs can be run on data on a shared disk. o Increased reliability: Fault tolerance: Failure of one processor does not halt the system. Introduction- p: 10/12 CmpE 241 Fall 2006 Symmetric Multiprocessing (SMP) Each processor runs and identical copy of the operating system. Each processor running a copy of the OS communicate with each other as needed. Each processor can run any process. Many processes can run at once without performance deterioration. Most modern OS’ s support SMP. Asymmetric Multiprocessing (AMP): Each processor is assigned a specific task; master processor schedules and allocates work to slave processors. More common in extremely large Systems. Symmetric Multiprocessing (SMP) Architecture: Introduction- p: 11/12 CmpE 241 Fall 2006 Operating System Concepts Processes Deadlocks Memory Management Input /Output Files Systems Calls The interface between the operating system and the user programs is defined by the set of system calls that the operating system provides. Metric Units Introduction- p: 12/12