Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.

Slides:



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

Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
Architectural Support for OS March 29, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
1 Lecture 2: Review of Computer Organization Operating System Spring 2007.
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
Hardware Support for Operating Systems Sunny Gleason Vivek Uppal COM S 414
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures 1/31/03 Computer System Operation I/O Structure.
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
1 Computer System Overview Chapter 1 Review of basic hardware concepts.
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.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
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 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 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Operating System Structure A key concept of operating systems is multiprogramming. –Goal of multiprogramming is to efficiently utilize all of the computing.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
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.
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.
Lecture 1: Review of Computer Organization
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.
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.
OSes: 2. Structs 1 Operating Systems v Objective –to give a (selective) overview of computer system architectures Certificate Program in Software Development.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Operating Systems Lecture 2.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Protection of System Resources
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer System Overview
Computer-System Architecture
Module 2: Computer-System Structures
Operating Systems Lecture 2.
Architectural Support for OS
Operating Systems Lecture 3.
Module 2: Computer-System Structures
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Architectural Support for OS
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Module 2: Computer-System Structures
Presentation transcript:

Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive controller disk printer tape CPU System bus

Interrupts n Signal sent to the CPU by hardware or software n Hardware triggers an interrupt when an event occurs n Software triggers an interrupt when a system call is performed – This is often called a trap

How Interrupts Work n When interrupt occurs, the current program stops execution n The interrupt service routine is executed n When routine is finished, the current program resumes n This is much like a function call except it is done by the hardware

Interrupt Service Routine n Each device does something different when interrupted n Each device must have a different interrupt service routine n A table of interrupt service routines is kept by the hardware. This table is called the interrupt vector and is indexed by the interrupt number

Interrupt Occurs n Current program stops n Using the interrupt number, the starting address of the ISR is found in the IV by indexing with the interrupt number n The ISR executes n When ISR completes, the current program continues execution

Interrupts: Priorities n An interrupt may occur when and ISR is executing. n Each interrupt has a priority, and the highest priority interrupt continues n If an interrupt interrupts another ISR, information must be placed on a stack so execution can continue when ISR finishes

Interrupts: Enable and Disable n If disabled, the current ISR cannot be interrupted n If enabled, the current ISR is interrupted if the interrupt has a higher priority than the current interrupt

Modern Operating Systems n Interrupt driven n If there is nothing to do, the OS waits n When an event occurs, the OS is interrupted and the event is handled n When a system call is done, a trap occurs n The proper system routine is executed n Control is then returned to the routine that called the system routine

I/O Structure n When a routine needs I/O, a system call is done n The OS consults the device status table to get the device’s types, address, and state n The device status table is updated to indicate the I/O needed n When the I/O is completed, the OS is interrupted and control returns to the user

DMA Transfer n Some devices maintain a buffer where the data is kept n The OS must copy the buffer when complete or I/O can’t continue n It would be better if the device could put the data directly into memory

DMA Transfer (cont.) CPU Memory I/O devices I/O instructions

DMA Transfer (cont.) n Data is placed directly in memory n This is done using cycle stealing – The DMA controller steals memory cycles from the CPU – This can slow down the CPU because it may have to wait to get data from memory

Storage Structure n Registers - associated with CPU n Cache - intermediate between CPU and memory n Main memory - where CPU obtains data n Secondary storage - permanent storage capacity – Disks - large capacity – Tapes - larger capacity – CDs - only readable

Disk Sector Track Platter

Hardware Protection n Dual-Mode operation n I/O protection n Memory protection n CPU protection

Dual-Mode Operation n Provides hardware support for two modes: – User mode - execution is done in behalf of a user – Monitor mode (supervisor mode or system mode) - execution is done in behalf of the OS n This insures that programs can’t do things they shouldn’t

Dual-Mode Operation (cont.) n Mode bit indicates which mode CPU is in n When an interrupt or trap occurs, hardware switches to monitor mode n When interrupt or trap is finished, hardware switches to user mode n Privileged instructions can only be issued in monitor mode

I/O Protection n All I/O instructions are privileged instructions n This insures that a user can’t execute instructions that could mess up the machine

Memory Protection n OS must keep users within their own memory n This is done using two registers: – Base register - start of the user’s memory – Limit register - size of the user’s memory n A checks is done by the hardware that insures that every memory access is inside the user’s memory space

CPU Protection n Timer - interrupts CPU after a specified period to insure the OS maintains control – Timer is decremented every clock tick – When timer reaches zero, an interrupt occurs n Timer is used for time sharing n Timer is used to compute the current time n Load-timer is a privileged instruction