------------------------------------------------------ Session 23 - April 07, 2003 ------------------------------------------------------ AGENDA: 0 Admin 1 Homework #5 2 Ch 5.6: overview of the MINIX file system ------------------------------------------------------ 0 - ADMIN ------------------------------------------------------ Startout Q: What is an inode? Due today * HM #5 Due Wednesday * RI #8: Ch 5.6-7 ------------------------------------------------------ 1 - HM #5 ------------------------------------------------------ Discuss homework. ------------------------------------------------------ 2 - CH 5.6: OVERVIEW OF THE MINIX FILE SYSTEM ------------------------------------------------------ MINIX file system is a network file server that is on same machine as caller. FS can be modified, experimented with, etc. with almost no modifications for rest of O/S. Very easy to turn into remote file server. MESSAGES 39 messages * fig 5-27 p. 455 * most regard system calls * basic algorithm similar to MM FILE SYSTEM LAYOUT A MINIX file system is self-contained * it is not hardware dependent * fig 5-28 p. 456 Boot block * contains executable code that read at startup * starts loading O/S * not all storage devices can be used for booting, but to keep structure uniform, every block device has a block reserved * magic number in specific location prevents trying to boot unbootable device. No magic => don't boot. Super-block * fig 5-29 p. 457 * Why both number of nodes and number of i-node bitmap blocks? Same for zones. * Zones are similar to clusters - Track Log2 (block/zone) => quick conversion from zones to blocks. - Track only data blocks with zones * super-block acts partially as cache of calculable info about file system * super-block in memory BIT MAPS * track i-nodes and zones I-NODES * fig 5-30 p. 461 BLOC CACHE * fig 5-31 p. 462 DIRECTORIES & PATHS * 16 bytes, 2 for I-node + 14 for name * fig 5-32 p. 464 FILE DESCRIPTORS * fig 5-33 p. 466 * where does file pointer go? - not in i-node - must have shared pointer between parent and child -> separate table FILE LOCKING * MINIX supports advisory file locking PIPES & SPECIAL FILES * suspend a process if tries reading from a pipe and no data is available * suspend it and restart syscall when data available COS 421 - Lecture Notes #25 SPRING 2003 COS421-lect-2003-04-07.doc Page 1 Printed 07.04.03