------------------------------------------------------ Session 22 – March 31, 2003 ------------------------------------------------------ AGENDA: 0 Admin 1 VSP V.2 2 Ch 5.1: files 3 Ch 5.2: directories ------------------------------------------------------ 0 – ADMIN ------------------------------------------------------ Startout Q: What did you learn from VSP V.1? Due Wednesday * RI #7, covers Ch 5.1-5 Due Friday * HM #5: Questions 5.3, 5.6, 5.7, 5.10, and 5.14. ------------------------------------------------------ 1 – VSP V.2 DISCUSSION ------------------------------------------------------ What did you learn from VSP V.1? What are your thoughts for V.2? How about having both a block & serial device interface? What are the design considerations? * universal read, authenticated write * how to handle the semantics of multiple writers * UDP vs. TCP ------------------------------------------------------ 2 – CH 5.1 FILES ------------------------------------------------------ So you want to design a file system. What do you need to think about. * Discussion Things to think about * file naming - case, length, extensions * internal file structure - byte stream, fixed size records, DB tree * file types - regular files, directories, block and char. dev., binary vs. ASCII, bin. formats (fig 5-3 p. 406) * file access - sequential vs. random/arbitrary sequential may be read only sequentially, may be rewound to beginning of file - random provides a seek() function for positioning * file attributes - protection, password, creator, owner, read-only, hidden, system, archive, ASCII/binary, random access, temporary, lock, record length, key pos w/in record, key length, creation time, last access, last change, size, max_size, append-only, etc. - multiple file data streams, eg. Mac & NT * file operations - create, delete, open, close, read, write, append, seek, get attributes, set attributes, rename ------------------------------------------------------ 3 – CH 5.2 DIRECTORIES ------------------------------------------------------ What is a directory? Where do you store the file attributes? * in dir, elsewhere, some combo. * multiple file systems fig 5-6 p. 412 * path names - absolute vs. relative - working directory - '.' and '..' in UNIX/DOS/etc. Directory operations * create, delete * open, close, read opendir, closedir, readdir * rename, link, unlink COS 421 – Lecture Notes #22 SPRING 2003 COS421-lect-2003-03-31 Page 1 Printed 31.03.03