Lecture20 - Wednesday, May 13 No lecture on Friday, May 15...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Wednesday, May 13 No lecture on Friday, May 15 Project #4 Engineering Expo Plan of Attack due by midnight Wednesday, May 20 Rob's Seminar Friday, May 22, in class Today's topics More I/O Scheduling File Systems Linus Elevator Modified version of LOOK Adds "request aging" As long as there are requests that have been in the queue for some predefined length of time, new requests are placed at the end of the queue (not sorted!) Deadline Each request is inserted into 2 queues All requests normal" (sorted elevator queue) " and Read requests read queue (FIFO) Write requests write queue (FIFO) When request is dispatched, it is removed from 2 queues If the front of read or write queue is not dispatched within a specified time limit, the first few requests from the corresponding queue are dispatched or Anticipatory Based on Deadline scheduler Often a process that reads from a file will require more data from the same area of the disk. Head "hangs around" for a few ms. to be ready for a second request of that type. CFQ Implements a sorted dispatch queue for each process that submits I/O requests Queues are serviced "roundrobin" Selecting a DiskScheduling Algorithm FCFS is easiest to implement SSTF is common OK for lightweight systems that are not speedcritical Can lead to starvation Elevator types: LOOK, CLOOK Performance depends on the number and types of requests. Use a reference string to test algorithms (see HW #4) perform better for systems that place heavy load on disk. NCQ Native Command Queuing Hardware implementation reorders requests to take advantage of rotational latency works well with slower rotational speeds Source: NVIDIA Homework #4 Solutions will be posted Questions? Note: "Distance tables" will be provided on the next quiz Questions on I/O scheduling? File System Usually refers to files and directories as configured on an external storage device and a file system interface as implemented in the OS File Concept Data stored under one name, usually on an external device Contiguous logical address space File Classifications By type By structure By access method File Types Sometimes indicated by name / extension Examples: Makefile .exe, .bin, etc. .asm, .c, .java, etc. .lib, .dll, etc. .txt, .jpg, .dat, etc. script executable source code library appspecific data File Structure Sequential Simple record structure has no structure sequence (stream) of words, bytes E.G.: Lines Fixed length record Variable length record File Structure Complex file structures E.G.: Formatted document Relocatable load file Record/Complex can be simulated with sequential file count bytes in record insert appropriate control characters etc. File Structure Who decides file structure? External device determines block size, actual location on device Operating system Program Some space is wasted Internal fragmentation File Structure File is an Abstract Data Type Attributes Operations Access methods File ADT: Attributes Information is kept in the directory structure, which is maintained on the disk. Name unique within context Type for systems that support different types. Location pointer to file location on device. Size current file size. Protection controls who can do reading, writing, executing. Time, date, user identification data for protection, security, and usage monitoring. etc. Create Rename Delete Write Read Append Truncate Reposition within file (seek) Open(Fi) (for reading / writing) File ADT: Operations Close (Fi) search the directory structure on disk for entry Fi, and move the content of entry to memory. if "dirty", move the content of entry Fi in memory to directory structure on disk. Others File ADT: Access Methods Sequential Access read next write next reset no rewrite Direct Access n = relative block number read n write n position to n read next write next rewrite n File ADT: Access Methods Indexed Access Built on Direct Access Uses index to locate individual record in a file For large files IndexedSequential Access primary index and secondary index Uses indexing to get block containing record Searches block sequentially AccessMethod Simulation Sequential Direct Access Easy using Direct Access method Possible using Sequential Access method E.G., C files May be implemented by applications and/or by OS Note: Don't confuse structure with access method Questions? Get moving on Project #4 Friday, May 22, in class Plan of Attack due by midnight Wednesday, May 20 Rob's Seminar Read Love Chapter 12 ...
View Full Document

This note was uploaded on 06/28/2009 for the course CS 411 taught by Professor Staff during the Spring '08 term at Oregon State.

Ask a homework question - tutors are online