CSCI 3323 (Principles of Operating Systems), Fall 2020: 
Homework 6a
- Credit:
 
- 10 points.
 
Be sure you have read, or at least skimmed, Chapter 5.
Answer the following questions.  You may write out your answers by
hand and scan them, or you may use a word processor 
or other program, but please submit a PDF or plain text
via e-mail to my TMail address.
(No links to shared files on Google Drive please.)
Please use a subject line that mentions the course and
the assignment (e.g., 
“csci 3323 hw 6a” or
“O/S hw 6a”). 
- (5 points)
	Consider the following two I/O devices.  For each device,
	say whether you think programmed I/O or interrupt-driven I/O
	makes the most sense, and justify your answer.
	(Hint:  
	Consider the time required for interrupt processing 
	versus the time needed for the actual input/output operation.
	You will get more credit if you give actual numbers for these 
	times.)
- A printer that prints at a maximum rate of
	400 characters per second,
	connected to a computer system in which writing to 
	the printer's output register takes essentially no time,
	and using interrupt-driven I/O means that
	each character printed requires an interrupt that
	takes a total of 50 microseconds 
	(i.e., 
 seconds) to process.
 
- A simple memory-mapped video terminal (output only), 
	connected to a system where interrupts take a minimum of 100 nsec
	to process, 
	copying a byte into the terminal's video RAM takes 10 nsec,
	and each byte must be copied independently.
	(It's probably best to think of this as a hypothetical problem, 
	using only the description supplied,
	rather than trying to extrapolate from what you know or can read
	about typical actual hardware.)
 
 
- (5 points)
	The textbook divides the many routines that make up 
	an operating system's I/O software into four layers.
	
In which of these layers
	should each of the following be done?  Why?
	(Assume that in general 
	functionality should be provided at the highest level
	at which it makes sense -- 
	e.g., in user-level
	software rather than device-independent software,
	if that's possible.)
- Converting floating-point numbers to ASCII for
		printing.
		
 
- Computing the track, sector, and head for 
		a disk read operation.
 
- Writing commands to a printer controller's device
		registers.	
 
- Detecting that an application program is attempting
		to write data from an invalid buffer address.
		(Assume that detecting an invalid buffer address
		can be done in supervisor mode in some way other
		than just trying it and possibly generating 
		a no-such-address exception.)
 
 
Include the Honor Code pledge or just the word “pledged”, 
plus at least one of the following about
collaboration and help (as many as apply).1Text in italics is explanatory or something for you to
fill in.
For programming assignments, this should go in the body of the e-mail
or in a plain-text file pledge.txt (no word-processor files
please).
- This assignment is entirely my own work.
	(Here, “entirely my own work” means that it's
	your own work except for anything you got from the
	assignment itself -- some programming assignments
	include “starter code”, for example -- or 
	from the course Web site.
	In particular, for programming assignments you can
	copy freely from anything on the “sample programs page”.)
 
- I worked with names of other students on this
	assignment.
 
- I got help with this assignment from 
	source of help -- ACM
	tutoring, another student in the course, the instructor, etc.
	(Here, “help” means significant help,
	beyond a little assistance with tools or compiler errors.)
 
- I got help from outside source -- 
	a book other than the textbook (give title and author),
	a Web site (give its URL), etc..
	(Here too, you only need to mention significant help --
	you don't need to tell me that you
	looked up an error message on the Web, but if you found 
	an algorithm or a code sketch, tell me about that.)
 
- I provided help to names of students on this
	assignment.
	(And here too, you only need to tell me about
	significant help.)
 
Include a brief essay (a sentence or two is fine, though you can write
as much as you like) telling me what if anything you think
you learned from the assignment, and what if anything you found
found interesting, difficult, or otherwise noteworthy.
For programming assignments, it should go in the body of the e-mail
or in a plain-text file essay.txt (no word-processor files
please).
Footnotes
- ... apply).1
 
- 
Credit where credit is due:  
I based the wording of this list on a posting to a SIGCSE mailing list.  
SIGCSE is the ACM's Special Interest Group on CS Education.
 
 
 
2020-12-06