Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Input/Output Control: Exceptions, Interrupts, and Data Transfer in Computer Systems, Study notes of Introduction to Sociology

An overview of input/output (i/o) control in computer systems, focusing on exceptions and interrupts. It explains the terminology, classification, and handling of exceptions, as well as the differences between user-level and system-level operations. The text also covers giving commands to i/o devices using special instructions and memory-mapped i/o, i/o device notification methods like polling and interrupts, and direct memory access (dma) for transferring data to and from memory.

Typology: Study notes

2009/2010

Uploaded on 03/28/2010

koofers-user-7cs
koofers-user-7cs 🇺🇸

5

(1)

10 documents

1 / 10

Toggle sidebar

Related documents


Partial preview of the text

Download Input/Output Control: Exceptions, Interrupts, and Data Transfer in Computer Systems and more Study notes Introduction to Sociology in PDF only on Docsity! 3/11/2002 CSE 141 - Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor CSE 141 - Input/Output2 Exceptions and Interrupts Terminology isn’t consistent. We’ll define: • Exceptions: any unexpected change in control flow Branches and jumps are not considered exceptions. • Exceptions are classified as either: – Internal Interrupts: Exception caused by something in the execution pipeline. • arithmetic overflow • illegal instruction • divide by zero • user program invoking the OS – External Interrupts: ones caused by something else. • I/O device signals completion to CPU • memory parity error • timer signal • low battery warning CSE 141 - Input/Output5 Giving Commands to I/O Devices • Two methods are used to address I/O devices: – Special I/O instructions – Memory-mapped I/O • Special I/O instructions specify a device number and a command • Memory-mapped I/O: – Each I/O device is given a portion of the real address space To prevent chaos, these addressed aren’t mapped to users’ virtual memory. – Read and writes to those addresses (by the OS) are interpreted as commands by the I/O device CSE 141 - Input/Output6 I/O Device Notifying the OS • The OS needs to know when: – The I/O device has completed an operation – The I/O operation has encountered an error • This can be accomplished in two different ways: – Polling: • The I/O device put information in a status register • The OS periodically check the status register – I/O Interrupt: • Whenever an I/O device needs attention from the processor, it issues an interrupt to the processor. CSE 141 - Input/Output7 Polling • Advantage: – Simple: the processor is in control and does all the work • Disadvantage: – Polling overhead can consume a lot of CPU time yes busy wait loop is an inefficient way to use the CPU unless the device is very fast! but checks for I/O completion can be dispersed among computation intensive code CPU IOC device Memory Is the data ready? read data store data yes no done? no
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved