• Verkeerd document? Gratis ruilen
  • Geschreven door studenten die geslaagd zijn
  • Direct beschikbaar na je betaling
  • Online lezen of als PDF
Verkopen
Kies je studieland
Kies je taal
Document preview thumbnail
Voorbeeld 4 van de 44 pagina's
Samenvatting

Summary EO3 COS122 preparation 2021 - Chapter 11 and Chapter 12

Document preview thumbnail
Voorbeeld 4 van de 44 pagina's

This document covers the following chapters of Operating Systems: Internals and Design by William Stallings: Chapter 11: I/O Management and Disk Scheduling Chapter 12: File Management

Voorbeeld van de inhoud

Chapter 11: Part 1
I/O management and Disk Scheduling(Ch11.1 – Ch11.3: I/O Design & Ch11.4: I/O Buffering)


I/O Design
Categories of I/O Devices
 External devices that engage in I/O with computer systems can be grouped into 3
categories:
o Human Readable
 Suitable for communicating with the computer user
 Printers, terminals, video display, keyboard, mouse
o Machine Readable
 Suitable for communicating with electronic equipment
 Disk drivers, USB keys, sensors, controllers
o Communication
 Suitable for communicating with remote devices
 Modems, digital line drivers

Differences in I/O Devices
Data Rate Differences of magnitude between the data transfer
states
Application Use to which a device is put has an influence on the
software
Complexity of Control Effects on the operating system is filtered by the
complexity of the I/O module that controls the device
Unit of Transfer Data may be transferred as a stream of bytes or
characters in larger blocks
Data Representation Different encoding schemes are sued by different
devices
Error Conditions Nature of errors, the way in which they are reported,
their consequences, and the available range of
responses differ from one device to another




Figure 11.1: Typical I/O Device Data Rates

,Organisation of the I/O Function
 3 techniques for performing I/O are
 Processor issues an I/O command on behalf of a
process to an I/O module
Programmed I/O
 Process then busy waits for the operation to be
completed before proceeding
 Processor issues an I/O command on behalf of a
process
o If non-blocking: processor continues to execute
instructions from the process that issues that I/O
Interrupt-driven I/O command
o If blocking: next instruction the processor executes
is from the OS, which will put the current process in
a blocked state and schedule another process

 DMA module controls the exchange of data between
Direct Memory
main memory and an I/P module
Access (DMA)




Table 11.1: I/O techniques




Evolution of the I/O Function
1. Processor directly controls a peripheral device
2. A controller of I/O module is added
3. Same configuration as step 2, but now interrupts are employed
4. I.O module is given direct control of memory via DMA
5. I/O module is enhanced to become a separate processor, with a specialized instruction
set tailored for I/O
6. I/O module has a local memory of its own and is, in fact a computer in its own right

,  CPU sends a command with the following info
o Read/write using read or write control line
o Address of I/O device using data lines
o Starting location of memory to read/write using data lines
o Number of words to read/write via data lines




Figure 11.2: Typical DMA Block
Diagram




Figure 11.3: Alternative DMA Configuration




Design Objectives
 Efficiency
o Major effort in I/O design
o Important because I/O devices are extremely slow compared to main
memory and the processor
o Area that has received the most attention is disk I/O
 Generality
o Desirable to handle all devices in a uniform manner
o Applies to the way the OS manages I/O devices and operation
o Diversity of devices makes it difficult to achieve true generality
o Use of hierarchical, modular approach to the design of the I/O function



Hierarchical Design
 Functions of the OS should be separated according to
their complexity, their characteristic time scale, and
their level of abstraction
 Leads to an organization of the OS into a series of
layers
 Layers should be defined so that changes in one layer
do not require changes in other layers

Figure 11.4: A Module of I/O
Organisation

, I/O Buffering

No Buffer  Without a buffer, the OS
directly accesses the device
when it needs
 2 problems
o User process hung up
waiting for relatively
slow I/O requests to
complete
o Interferes with swapping
decision made by OS
 Perform input transfers in advance of requests being made and perform output transfers some
time after the request is made
Block-oriented device Stream-oriented device
 Stores info in blocks that are usually of fixed  Transfers data in and out as a stream of bytes
size  No block structure
 Transfers are made one block at a time  Examples:
 Possible to reference data by its block number  Communication ports
 Examples:  Most other devices that are not
 Disks secondary storage
 USB keys




Single Buffer  OS assigns a buffer in main
memory for an I/O request




Block-oriented Single Buffer Stream-oriented Single Buffer
 Input transfers are made to the system Line-at-a-time Byte-at-a-time
buffer operation operation
 Reading ahead/anticipated input  Appropriate for  Used on form-
 Is done in the expectation that the scroll-mode mode terminals
terminals (dumb  When each
block will eventually be needed
terminals) keystroke is
 When the transfer is complete, the  User input is one significant
process moves the block into user line at a time with  Other peripherals
space and immediately requests a carriage return such as sensors
another block signalling the end and controllers
 Generally provides a speedup compared to of a line
the lack of system buffering  Output to the
terminal is similarly
 Disadvantages:
one line at a time
 Complicates the logic in the OS
 Swapping logic is also affected

Documentinformatie

Geüpload op
2 december 2021
Aantal pagina's
44
Geschreven in
2021/2022
Type
Samenvatting
$6.21

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Verkocht
32
Volgers
25
Items
23
Laatst verkocht
2 jaar geleden




Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen