2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.

Slides:



Advertisements
Similar presentations
Computer-System Structures Er.Harsimran Singh
Advertisements

Interactive lesson about operating system
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
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 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.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
ICS Principles of Operating Systems
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
Chapter 1.2: Introduction These slides, originally provided by your authors, have been modified by your instructor.
Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures 1/31/03 Computer System Operation I/O Structure.
1.1 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Instructor:
Lecture 1: Introduction CS170 Spring 2015 Chapter 1, the text book. T. Yang.
A. Frank - P. Weisberg Operating Systems Functional View of Operating System.
1/21/2010CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
Chapter 2: Computer-System Structures
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Operating System Concepts Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh University.
Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 1: Introduction.
Operating Systems Lecture 3 Computer Systems Review
Chapter 1. Introduction What is an Operating System? Mainframe Systems
2.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 2: Computer-System Structures Computer System Operation I/O Structure.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage 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.
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do (previous.
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 1: Introduction What Operating Systems Do Computer-System.
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
© 2005 Pearson Addison-Wesley. All rights reserved Figure 2.1 This chapter focuses on key hardware layer components.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
By : Reem Hasayen. A storage device is a hardware device capable of storing information. There are two types of storage devices used in computers 1. Primary.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
BIT213,CISY Operating Systems 1
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  What Operating Systems Do  Computer-System Organization  Computer-System Architecture  Operating-System Structure.
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures(Hardware) or Architecture or Organization Computer System Operation I/O Structure Storage Structure Storage Hierarchy.
Chapter 2. Computer-System Structure Device controllers: synchronize and manage access to devices.
Chapter 1: Introduction. 1.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Objectives To provide a grand tour of the major operating.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer System Structures Storage
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer-System Architecture
Module 2: Computer-System Structures
Lecturer Bilal Alqudah, PhD
Module 2: Computer-System Structures
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

2.2 Operating System Concepts Computer-System Architecture

2.3 Operating System Concepts Computer-System Operation I/O devices and the CPU can execute concurrently. Each device controller is in charge of a particular device type. Each device controller has a local buffer. CPU moves data from/to main memory to/from local buffers I/O is done from the device to local buffer of controller. Memory controller is used to ensure orderly access to shared memory. So, its function is to synchronize access to the shared memory. Device controller informs CPU that it has finished its operation by causing an interrupt.

2.4 Operating System Concepts Interrupt Time Line For a Single Process Doing Output

2.5 Operating System Concepts Storage Structure Main memory – only large storage media that the CPU can access directly. The programs must be in main memory to be executed. Secondary storage – extension of main memory that provides large nonvolatile storage capacity. Magnetic disks – rigid metal or glass platters covered with magnetic recording material –Disk surface is logically divided into tracks, which are subdivided into sectors. –The disk controller determines the logical interaction between the device and the computer.

2.6 Operating System Concepts Moving-Head Disk Mechanism

2.7 Operating System Concepts Magnetic Disk Mechanism The two surfaces of a platter are covered with magnetic material. Platter diameters range from 1.8 to 5.25 inches. There may be thousands of concentric cylinders in a disk drive, and each track may contain hundreds of sectors. The transfer rate is the rate at which data flow between the drive and the computer. The positioning time (or random access time), consists of seek time and rotational latency. The seek time is the time to move the disk arm to the desired cylinder. The rotational latency is the time for the desired sector to rotate to the disk head.

2.8 Operating System Concepts Storage Structure Floppy disks consist of one platter and the head sits directly on the surface. Its inexpensive, less storage 1.4MB and slower compare it to the hard disk. Also, it is removable. The load instruction moves a word from main memory to an internal register, within the CPU for execution. The store instruction moves the content of a register to main memory. Can we store the programs and data in main memory permanently? The answer is no for two reasons: –Main memory is small to store all programs and data. –Main memory (RAM) is volatile storage device that loses its contents when power is turned off or otherwise lost. Therefore, to store all programs and data permanently you use secondary storage such as hard disk and diskette.

2.9 Operating System Concepts Storage Hierarchy Storage systems organized in hierarchy. –Speed –Cost –Volatility Caching – copying information into faster storage system; main memory can be viewed as a last cache for secondary storage.

2.10 Operating System Concepts Storage-Device Hierarchy Size Small Size Large Fast and Expensive Slow and Cheap

2.11 Operating System Concepts Storage-Device Hierarchy Registers, cache, and main memory are volatile. All storage after main memory are non-volatile. Caching: Check first cache memory if data not there go to main memory and copy it into cache under the assumption that there is a high probability that it will be needed again. Data must be moved from secondary storage into main memory before use. Data transfer from cache to CPU and registers is usually a hardware function with no operating system control. Data transfer from disk to memory is usually controlled by the operating system. Cache Coherency and Consistency is the state that exists in a multiprocessor system, when any shared data is held by 2 or more caches, and no 2 caches hold different values of such a shared data simultaneously.

2.12 Operating System Concepts Hardware Protection Dual-Mode Operation I/O Protection Memory Protection CPU Protection

2.13 Operating System Concepts Dual-Mode Operation Protection is needed for any shared resource. Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly. 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 supervisor mode or system mode) – execution done on behalf of operating system.

2.14 Operating System Concepts Dual-Mode Operation (Cont.) At system boot time, the hardware starts in monitor mode. The O.S. is then loaded, and starts user processes in user mode. Whenever, an interrupt occurs, the hardware switches from user mode to monitor mode. Whenever, the O.S. gains control of the computer, it is in monitor mode. If you do not have dual mode then you can wipe or write over the O.S. Example: MS-DOS for 8088 architecture does not have a dual mode. MS-Widows NT and IBM OS/2 take advantage of dual mode feature and provide greater protection for the O.S.

2.15 Operating System Concepts Dual-Mode Operation (Cont.) 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. Privileged instructions can be issued only in monitor mode. monitoruser Interrupt/fault set user mode

2.16 Operating System Concepts I/O Protection All I/O instructions are privileged instructions. Must ensure that a user program could never gain control of the computer in monitor mode (i.e., a user program that, as part of its execution, stores a new address in the interrupt vector).

2.17 Operating System Concepts Memory Protection We want to protect the O.S. from access by user programs, and to protect user programs from one another. 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.

2.18 Operating System Concepts A Base And A limit Register Define A Logical Address Space Limit register =

2.19 Operating System Concepts Protection Hardware This protection is accomplished by the CPU hardware comparing every address generated in user mode with the registers. The base and limit registers can be loaded by only the O.S.

2.20 Operating System Concepts General System Architecture I/O instructions can be executed by only the O.S. To do I/O, a user program executes a system call to request that the O.S. perform I/O. User of A System Call to Perform I/O: