Silberschatz, Galvin and Gagne  2002 2.1 Operating System Concepts Bare Machine (early 1950s) Structure  Large machines run from console  Single user.

Slides:



Advertisements
Similar presentations
What is an Operating System?
Advertisements

Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
CMSC 421: Principles of Operating Systems Section 0202 Instructor: Dipanjan Chakraborty Office: ITE 374
Chapter 1: Introduction
1/23/2004CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Abhinav Kamra Computer Science, Columbia University 1.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 COMS 4118 Operating Systems Spring.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
1 CIS450/IMSE450/ECE478 Operating Systems Winter 2003 Professor Jinhua Guo.
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
1/16/2008CSCI 315 Operating Systems Design1 Introduction Notice: The slides for this lecture have been largely based on those accompanying the textbook.
1/18/2008CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
1 5/25/2016 操作系统课件 教材: 《操作系统概念(第六版 影印版)》 【原书名】 Operating System Concepts(Sixth Edition) [ 原书信息 ] Operating System Concepts(Sixth Edition) [ 原书信息 ] 【原出版社】
Introduction to Basic OS Concepts. Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems.
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 1 Introduction Read:
2.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 2: Computer-System Structures Computer System Operation I/O Structure.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2 Computer-System Structures n Computer System Operation n I/O Structure.
 H.M.BILAL Operating System Concepts.  What is an Operating System?  Mainframe Systems  Desktop Systems  Multiprocessor Systems  Distributed Systems.
المحاضرة الاولى Operating Systems. The general objectives of this decision explain the concepts and the importance of operating systems and development.
Operating System Concepts Chapter One: Introduction What is an operating system? Simple Batch Systems Multiprogramming Systems Time-Sharing Systems Personal-Computer.
1.1 Operating System Concepts Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.
Silberschatz, Galvin and Gagne  Operating System Concepts Lectured by Dr. Lican Huang
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Chapter 1: Introduction
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
Operating System. Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
1.1 Sandeep TayalCSE Department MAIT 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming Batched Systems Time-Sharing Systems.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Multiprocessor Systems Distributed.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real.
Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Applied Operating System Concepts
Chapter 1: Introduction
Chapter 1: Introduction
Introduction to Basic OS Concepts
Operating Systems Lecture 2.
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 1: Introduction
Chapter 1: Introduction
חוברת שקפים להרצאות של ד"ר יאיר ויסמן מבוססת על אתר האינטרנט:
Operating System Concepts
Chapter 1: Introduction
Operating Systems Lecture 2.
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Subject Name: Operating System Concepts Subject Number:
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Chapter 1: Introduction
Operating System Concepts
Chapter 1: Introduction
Presentation transcript:

Silberschatz, Galvin and Gagne  Operating System Concepts Bare Machine (early 1950s) Structure  Large machines run from console  Single user system  Programmer/User as operator  Paper tape or punched cards Early Software  Assemblers, compilers, linkers, loaders  Libraries of common subroutines  Device drivers Inefficient use of expensive resources  Low CPU utilization  Significant amount of setup time Solutions  Add a card reader  Hire an operator

Silberschatz, Galvin and Gagne  Operating System Concepts Simple Batch Systems Reduce setup time by batching similar jobs Automatic job sequencing - automatically transfers control from one job to another - first rudimentary OS Resident monitor  Initial control in monitor  Control transfers to job  Job transfers control back to monitor (or chaos ensues) Use control cards to  Separate jobs  Specify job types, e.g., FORTRAN  Separate code from data

Silberschatz, Galvin and Gagne  Operating System Concepts Memory Layout for a Simple Batch System

Silberschatz, Galvin and Gagne  Operating System Concepts Offline Operation Do card reading and printing offline  Jobs copied from cards to tape  Tape loads to CPU, and results output to tape  Tape content printed Advantages  CPU constrained only by tape speed  No changes to existing code  Multiple card readers and printers per CPU

Silberschatz, Galvin and Gagne  Operating System Concepts Offline Operation Layout

Silberschatz, Galvin and Gagne  Operating System Concepts Spooling Overlap I/O of one job with computation of another job. While executing one job, the OS:  Reads next job from card reader into a storage area on the disk (job queue).  Outputs printout of previous job from disk to printer. Job pool – data structure that allows the OS to select which job to run next in order to increase CPU utilization Critical change of hardware  Allows CPU to swap between IO control and job  Implemented with interrupts

Silberschatz, Galvin and Gagne  Operating System Concepts Spooling

Silberschatz, Galvin and Gagne  Operating System Concepts Two I/O Methods Synchronous Asynchronous

Silberschatz, Galvin and Gagne  Operating System Concepts Synchronous IO After I/O starts, control returns to user program only upon I/O completion.  Wait instruction idles the CPU until the next interrupt  At most one I/O request is outstanding at a time, no simultaneous I/O processing. More common in real time systems Asynchronous IO After I/O starts, control returns to user program without waiting for I/O completion.  System call – request to the operating system to allow user to wait for I/O completion  IO device interrupts on completion I/O devices and the CPU can execute concurrently.

Silberschatz, Galvin and Gagne  Operating System Concepts Asynchronous IO Request User process requests IO service  Device-status table contains entry for each I/O device indicating its type, address, and state  If device is idle the IO starts  If the device is busy, the request is queued (double buffering)

Silberschatz, Galvin and Gagne  Operating System Concepts Asynchronous IO Each device controller has a local buffer. CPU moves data from/to memory to/from local buffers Device controller informs CPU that it has finished its operation by causing an interrupt. On interrupt the OS indexes into I/O device table to determine device status and do service  Feed more data from this request  Start next request on queue  Note device idle

Silberschatz, Galvin and Gagne  Operating System Concepts Multiprogrammed Batch Systems Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

Silberschatz, Galvin and Gagne  Operating System Concepts OS Features Needed for Multiprogramming I/O routine supplied by the system. Memory management – the system must allocate the memory to several jobs. CPU scheduling – the system must choose among several jobs ready to run. Allocation of devices.

Silberschatz, Galvin and Gagne  Operating System Concepts Time-Sharing Interactive Computing Multi-programming plus …  Multi-user  On-line communication between the user and the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statement” from the user’s keyboard.  On-line file system must be available for users to access data and code Jobs may be swapped in and out of memory to the disk.

Silberschatz, Galvin and Gagne  Operating System Concepts Dual-Mode Operation Provide hardware support to differentiate between at least two modes of operations. 1.User mode – execution done on behalf of a user. 2.Monitor mode (also kernel mode or system mode) – execution done on behalf of operating system. Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). When an interrupt or fault occurs hardware switches to monitor mode When executing in monitor mode, the operating system has unrestricted access to both monitor and user’s memory. Privileged instructions can be issued only in monitor mode. monitoruser Interrupt/fault set user mode

Silberschatz, Galvin and Gagne  Operating System Concepts CPU Protection Timer – interrupts computer after specified period to ensure operating system maintains control.  Timer is decremented every clock tick.  When timer reaches the value 0, an interrupt occurs. Timer commonly used to implement time sharing. Timer also used to compute the current time. Load-timer is a privileged instruction. Setting the interrupt vector is privileged

Silberschatz, Galvin and Gagne  Operating System Concepts Memory Protection In order to have memory protection, add two registers that determine the range of legal addresses a program may access:  Base register – holds the smallest legal physical memory address.  Limit register – contains the size of the range Memory outside the defined range is protected. The load instructions for the base and limit registers are privileged instructions.

Silberschatz, Galvin and Gagne  Operating System Concepts Use of A Base and Limit Register

Silberschatz, Galvin and Gagne  Operating System Concepts I/O Protection All I/O instructions are privileged instructions.

Silberschatz, Galvin and Gagne  Operating System Concepts Personal Computers Computer system dedicated to a single user. I/O devices – keyboards, mice, display screens, small printers. Goals: User convenience and responsiveness. Can adopt technology developed for larger operating systems Individuals have sole use of computer - only multi- programming. May run several different types of operating systems (Windows, MacOS, UNIX, Linux)

Silberschatz, Galvin and Gagne  Operating System Concepts Multiprocessor Systems Multiprocessor systems with more than one CPU in close communication. Tightly coupled system – processors share memory and a clock; communication usually takes place through the shared memory.

Silberschatz, Galvin and Gagne  Operating System Concepts Multiprocessor Systems Symmetric multiprocessing (SMP)  Each CPU runs an identical copy of the operating system.  Many processes can run at once without performance deterioration.  Most modern operating systems support SMP Asymmetric multiprocessing  Each processor is assigned a specific task; master processor schedules and allocated work to slave processors.  More common in extremely large systems Advantages of multiprocessor systems:  Increased throughput  Economical  Increased reliability  Graceful degradation  Fail-soft systems

Silberschatz, Galvin and Gagne  Operating System Concepts Distributed Systems Distribute the computation among several physical processors. Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high- speed buses or telephone lines. May be either client-server or peer-to-peer systems.

Silberschatz, Galvin and Gagne  Operating System Concepts Distributed Systems (cont) Requires networking infrastructure.  Local area networks (LAN) or Wide area networks (WAN) Advantages of distributed systems.  Resources Sharing  Computation speed up – load sharing  Reliability  Communications

Silberschatz, Galvin and Gagne  Operating System Concepts Real-Time Systems Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Well-defined fixed-time constraints. Hard real-time: guaranteed task completion  Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM)  Conflicts with time-sharing systems, not supported by general- purpose operating systems. Soft real-time: absolute task priority  Limited utility in industrial control of robotics  Useful in applications (multimedia, virtual reality) requiring advanced operating-system features.

Silberschatz, Galvin and Gagne  Operating System Concepts Handheld Systems Personal Digital Assistants (PDAs) Cellular telephones Issues:  Limited memory  Slow processors  Small display screens.

Silberschatz, Galvin and Gagne  Operating System Concepts Migration of Operating-System Concepts and Features