AS Computing 1.5.5 Hardware. Buffers and Interrupts A buffer is an area of memory used for holding data during input/output transfers to and from disk.

Slides:



Advertisements
Similar presentations
Computer Organization, Bus Structure
Advertisements

Buffers & Spoolers J L Martin Think about it… All I/O is relatively slow. For most of us, input by typing is painfully slow. From the CPUs point.
Computer Architecture
CS-334: Computer Architecture
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
CHAPTER 9: Input / Output
CPU Describe the purpose of the CPU
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
11:15:01 Storage device. Computer memory Primary storage 11:15:01.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
BLOCK DIAGRAM OF COMPUTER
Computing Hardware Starter.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Input/OUTPUT [I/O Module structure].
OPERATING SYSTEM OVERVIEW. Contents Basic hardware elements.
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.
Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System.
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
CHAPTER 9: Input / Output
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.
Input and output (IO) systems Last week we considered the memory management layer of the operating system. This week we will look at another layer of the.
Central Processing Unit
Intermediate 2 Computing Computer structure. Organisation of a simple computer.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
Fall 2000M.B. Ibáñez Lecture 25 I/O Systems. Fall 2000M.B. Ibáñez Categories of I/O Devices Human readable –used to communicate with the user –video display.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 2 I/O Software CS 342 – Operating Systems Ibrahim Korpeoglu.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
Transferring Data – Primary Memory to Secondary Storage F451 - AS Computing.
The Functions of Operating Systems Spooling. Learning Objectives Describe spooling, explaining why it is used.
Lecture Overview Shift Register Buffering Direct Memory Access.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
1 6 Further System Fundamentals (HL) 6.5 Computer – Peripheral Communication.
Von Neumann Machines. 3 The Von Neumann Architecture Model for designing and building computers, based on the following three characteristics: 1)The.
Operating System (Reference : OS[Silberschatz] + Norton 6e book slides)
24/06/20161 Hardware Processor components & ROM. 224/06/2016 Learning Objectives Describe the function and purpose of the control unit, memory unit and.
System Components Operating System Services System Calls.
3.1.4 Hardware a. describe the function and purpose of the control unit, memory unit and ALU (arithmetic logic unit) as individual parts of a computer;
Input/Output (I/O) Important OS function – control I/O
Input / Output Chapter 9.
Computer Architecture and Number Systems
Computer Systems Nat 4/5 Computing Science Computer Structure:
OPERATING SYSTEM CONCEPT AND PRACTISE
Chapter 13 The Function of Operating Systems
Component 2 6G, H, I, J, K.
Lesson Objectives Aims Key Words Interrupt, Buffer, Priority, Stack
Lesson Objectives Aims Key Words
Input/Output.
I/O system.
Overview Peripheral Devices Input-Output Interface
CSI 400/500 Operating Systems Spring 2009
Processor Management Damian Gordon.
Processor Fundamentals
Operating Systems Chapter 5: Input/Output Management
Components of a CPU AS Computing - F451.
Introduction to Operating Systems
Spooling Describe spooling, explaining why it is used.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Processor Management Damian Gordon.
Presentation transcript:

AS Computing Hardware

Buffers and Interrupts A buffer is an area of memory used for holding data during input/output transfers to and from disk or tape. By using buffers, the problem of working at the speed of the slowest devices can be overcome. It imporves the efficiency of data transfer betwwen two devices working at different speeds by allowing big blocks of data to be collected together and then set at once rather than a constant stream of that that needs constant CPU management. A buffer can also be an exernal piece of hardware designed specificlly for the purpose of buffering.

How buffers work If there is not a buffer CPU ALU Printer The CPU will take charge of the data transfer. The data goes from the RAM, vai the ALU and out to the printer. The printer works very slow compare to the CPU. If you send data constantly, byte by byte, the CPU will have to slow down the speed so that the printer can receive the data. This means that the CPU is not being used as efficiently as possible.

How buffers work 2 If there is a buffer. CPU ALU BufferPrinter When the CPU send data to a file, all of the data can be transferred to the buffer. The buffer works at the speed of the CPU so data tranfer between the CPU and the buffer s very fast. The CPU is now free to do other tasks while the buffer can transfer data to the printer. This immediately imporves the transfer of data because the CPU is not wating and trying to constantly send data.

An example of the use of a buffer Secondary storage devices, such as disks or tapes are usualy interfaced to the operating system software by using buffers. For example, sending a file to a printer. The file is held in memory (RAM). We know that memory is part of the CPU and therefore works very quickly and also all data in and out of the CPU goes via the ALU. Printer print out pages much slower than the speed a CPU can work at.

Buffers and Interrupts 1 For example, sending a file to a printer. What if the whole file is too large to fit intot he buffer? CPU Stack ALU Stop File BufferPrinter Step 1: the CPU fills the buffer with as much of a file as it can via the ALU. When it is full, a ‘stop’ singal ia sent by the buffer to the CPU.

Buffer and Interrupts 2 CPU Stack ALU Buffer Pinter Step 2: the CPU is now free to get on with another job. The buffer sends its contents to the printer. Buffer is full

Buffers and Interrupts 3 CPU Stack ALU BufferPrinter More Step 3: when the buffer is nealy empty, it sends an interrupt signal to the CPU requesting more data.

Buffers and Interrupts 4 CPU Stack ALU BufferPrinter File Stop Step 4: the CPU stops its current job. It saves the contents of its registers into the stack and then fills up the buffer again, until it receives the ‘stop’ interrupt from the buffer.

Buffers and Interrupts 5 CPU Stack ALU Buffer Printer Step 5: the buffer continues to transfer data to the printer. The CPU pops the contens of the stack back into the registers and carries on from before the interrupt.

Summary When the CPU gets the I/O interrupt, it checks the priority of the interrupt. The CPU has to decide whether or not the job it is currently doing is more important than filling up the buffer. If it is less important, then it carries on what it is doing until it is finished, and then it services the buffer interrupt; if it is more important, the CPU will stop what it is doing now and saves the contents of it registers onto the stack, then sends the buffer more of the files until it gets the ‘stop’ signal again. The buffer resumes sending data to the printer whilst the CPU go back to the job that it left off before the interrupt.