Midterm II
Part of
materials for 22C:50, Summer 2004
|
Name: ________________________________________________ ID Number: ___________________
Please answer in the space provided! Your name must be legible and in the form used on your University ID card! Illegible and verbose answers will be penalized! This exam is open-book, open-notes, closed neighbor! This exam 10 points; allocate 4-5 minutes per point.
Assume that these have been assembled and that a linking loader is used to link first file1 and then file2 and load them into memory starting at address 30016. Show the resulting contents of memory as consecutive words:; file1.a ; file2.a EXT A INT A INT B EXT B W A W A B: W B W B W C C: W C C = #200 A = #300
location value location value 0300 ____________ 030A ____________ 0302 ____________ 030C ____________ 0304 ____________ 030E ____________ 0306 ____________ 0310 ____________ 0308 ____________ 0312 ____________
a) exit <status>
________________________________________________________ ________________________________________________________
b) cd <filename>
________________________________________________________ ________________________________________________________
Name: ________________________________________________
a) The suite also includes an application called else. What does this do? (1 point)
________________________________________________________ ________________________________________________________ ________________________________________________________
b) What other application programs must you write as part of this suite, and what do they do? (1 point)
________________________________________________________ ________________________________________________________ ________________________________________________________
a) Assuming a fast serial port, is disk scheduling still relevant? (1 point)
b) How many interrupts it would take to complete one disk transfer to or from this device? (1 point)________________________________________________________ ________________________________________________________
________________________________________________________ ________________________________________________________ ________________________________________________________ ________________________________________________________
Name: ________________________________________________
a) How many bytes per second does the interface for this disk process? (0.5 points)
________________________________________________________
b) How many microseconds pass during reading the header on one sector? (0.5 points)
c) Given that the disk interrupt service routine takes 2 microseconds, what is the minimum interleaving factor that will work for this disk, ignoring the count of sectors per track? (0.5 points)________________________________________________________
________________________________________________________
d) Given the number of sectors per track, what interleaving factor will be likely to be used? (0.5 points)
________________________________________________________
a) What information would you need to add to a classical UNIX i-node to allow the tail of a file to be packed together with other file tails in a single disk sector? (0.5 points)
________________________________________________________ ________________________________________________________ ________________________________________________________
b) What file operations would be significantly slower with this scheme? (0.5 points)
________________________________________________________ ________________________________________________________ ________________________________________________________