100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary EO3 COS122 preparation 2021 - Chapter 11 and Chapter 12

Rating
-
Sold
-
Pages
44
Uploaded on
02-12-2021
Written in
2021/2022

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

Institution
Course











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

Uploaded on
December 2, 2021
Number of pages
44
Written in
2021/2022
Type
Summary

Subjects

Content preview

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
$6.13
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Document also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
mpumi__tshabalala University of Pretoria
Follow You need to be logged in order to follow users or courses
Sold
32
Member since
5 year
Number of followers
25
Documents
23
Last sold
1 year ago
Greetings All!

I hope that these aesthetically pleasing notes make studying more fun for you all! * Please don\'t distribute my notes. As I have put in lots of time to make sure that they look the way they do as well as having accurate information * Don\'t forget to leave a review :)

3.4

5 reviews

5
1
4
0
3
4
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions