Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment.

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.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
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.
OS Spring’03 Introduction Operating Systems Spring 2003.
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
Modified from Silberschatz, Galvin and Gagne ©2009 CS 446/646 Principles of Operating Systems Lecture 1 Chapter 1: Introduction.
1 Introduction Chapter What is an operating system 1.2 History of operating systems 1.3 The operating system zoo 1.4 Computer hardware review 1.5.
Computer-System Structures
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.
OS Spring’04 Introduction Operating Systems Spring 2004.
1 What is an operating system? CSC330Patricia Van Hise.
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 1: Introduction.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
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.
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 E-Main: Phone:
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.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
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.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
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.
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.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 2, 2005 I/O through system calls Protection.
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.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edit9on Lecture 3 Chapter 1: Introduction Provided & Updated by Sameer Akram.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Introduction to Operating Systems Concepts
Chapter 2: Computer-System Structures(Hardware)
Applied Operating System Concepts
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
Module 2: Computer-System Structures
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:

Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone: Textbook: Operating System Concepts, 7 th edition, Silberschatz, Galvin, and Gagne. URL:

Components of a Computer System A computer system consists of hardware system programs application programs

Hardware: Physical Devices: Memory, CPU, I/O devices…. Micro-architecture: Executes machine-level instructions. Hardware or firmware (microcode). Machine language: Hardware and instructions visible to an assembly language program. System Components

Components of a Computer System Operating System: Hides complexity of hardware and provides simplified set of instructions (API, Application Program Interface).

Components of a Computer System System programs: Generally execute in user mode. (Why?) Command interpreter (shell), compilers, editors, …..

So What is an Operating System? It is an extended machine Hides the messy details. Presents user with a virtual machine, easier to use Don’t want to program I/O devices, handle interrupts, etc. It is a resource manager (and scheduler) Each program gets time with the resource E.g., CPU, I/O devices, memory Each program gets space on the resource E.g., Disk space.

So What is an Operating System? Control Program Manages the execution of user applications to prevent errors and improper use of system. Program A should not be able to access memory of an unaffiliated program B. No one user should be able to starve OS and/or other users of system resources (e.g., CPU). No user should be able to trash I/O devices (deliberately or by error).

Computer Hardware Review Components of a simple personal computer Monitor Bus

Special registers: Program counter. Stack pointer. Process Status Word (PSW).

CPU and other devices can run concurrently. When device needs attention, it issues an interrupt. Character transferred from keyboard to system buffer. Disk read/write completed. Page fault. User programs generate interrupts when making system calls. Trap instruction. Generally termed software interrupt.

Interrupts Operating systems are interrupt-driven. Perform action, such as executing a process, then wait until receives an interrupt. Makes developing an operating system a very complex task. When an interrupt is generated the CPU stops what it is doing and execution is transferred to the appropriate interrupt handler. Addresses of interrupt handlers are found in the interrupt vector. Table of addresses Each device has a particular offset within the table.

Interrupts The state of the interrupted computation must be saved before interrupt can be processed. This state is restored when the OS returns from the interrupt handler. Termed a context switch.

I/O Devices Each type of device has its own controller that accepts and carries out commands from the operating system. Because each controller is different, manufacturer provides device driver for each operating system it supports. OS talks to device driver.

I/O Operation Program makes I/O request (e.g., read/write to/from a file). Device driver loads appropriate controller registers. Controller reads registers and determines the operation requested. Starts data transfer from the device to its local buffer. When completed, generates an interrupt. State of currently executing program is saved. Interrupt handled by the device driver. Device driver returns control to the OS. OS restarts suspended program.

(a) Steps in starting an I/O device and getting interrupt (b) How the CPU is interrupted (a)(b)

Three I/O Methods Synchronous Asynchronous DMA (Direct Memory Access).

Three I/O Methods Synchronous After I/O starts, control returns to user program only upon I/O completion. Wait instruction idles the CPU until the next interrupt Wait loop (contention for memory access). Generally a bad idea.

I/O Methods Asynchronous After I/O starts, control returns to user program without waiting for I/O completion. I/O completion signaled by an interrupt. More complicated than synchronous I/O.

Two of the I/O Methods Synchronous Asynchronous

I/O Methods DMA Used for high-speed I/O devices able to transmit information at close to memory speeds. Device controller transfers blocks of data from buffer storage directly to main memory without CPU intervention. Only one interrupt is generated per block, rather than the one interrupt per byte.

I/O Methods Asynchronous I/O requires the ability to handle multiple I/O commands concurrently. Uses device status table. Queue waiting requests.

Device-Status Table