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

Understand the Interface that the OS Provides to the Software for Doing Input and Output | COMP 310, Assignments of Operating Systems

Material Type: Assignment; Class: Operating Systems; Subject: Computer Science; University: University of San Diego; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 08/16/2009

koofers-user-i7o-1
koofers-user-i7o-1 🇺🇸

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
COMP 310:
Operating Systems
Lecture 26:
Finish I/O
November 17, 2004
Christine Alvarado
Overview
Understand the interface that the OS
provides to the software for doing I/O
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understand the Interface that the OS Provides to the Software for Doing Input and Output | COMP 310 and more Assignments Operating Systems in PDF only on Docsity!

COMP 310:

Operating Systems

Lecture 26:

Finish I/O

November 17, 2004

Christine Alvarado

Overview

 Understand the interface that the OS provides to the software for doing I/O

Review  What were the hardware components involved in I/O? Drivers  Definition: Software routines that provide a uniform device-access interface to the I/O subsystem.  Different HW controllers may have different interfaces. Drivers make them look the same.

Abstraction: Device categories  Goal: Group devices into similar I/O styles  Dimensions:  Block and Character  Network  Timers  Blocking and Non-blocking Block and Character  Block:  Character:

Network Devices  Network fundamentally different than local interaction Blocking and Non-blocking I/O  What is it?  Why is it not normally used? (exception: select() for network I/O)  What is used instead?

Buffering Caching  What is a cache?  Caching vs. Buffering

Spooling  Some devices need data complete and in order. Example? Error Handling  Kernel will retry I/O calls until they succeed.  Makes I/O failure invisible to user program

Part 1: Demand Paging  Proj 2: What happened when a new process started?  What we want:  Pages are allocated, but not filled  How will you do this? When will they be filled? Part 1 issues  page may straddle two segments (e.g. code and data)  While handling one page fault, ReadMem (or WriteMem) may generate another page fault  How could this happen?  What should you do?  You can no longer close the executable file when you exec a new process

Part 2: Backing Store/Page Replacement  Now, you no longer allocate pages up front  If memory is full, you have to write a page to disk  Need to keep track of whether pages are in memory or on disk  Only write a page if it has been modified  Issues  pages may come from files or from disk  Use any page replacement strategy Part 3: Testing  Start simple (using the same test programs from last time)  Then move to matmult, sort, and snake  Then write your own  Good locality  Bad locality  Random locality