Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 11 File Systems and Directories. Chapter Goals Files, directories, and file systems Text and Binary files Disk-scheduling algorithms 11-2.

Similar presentations


Presentation on theme: "Chapter 11 File Systems and Directories. Chapter Goals Files, directories, and file systems Text and Binary files Disk-scheduling algorithms 11-2."— Presentation transcript:

1 Chapter 11 File Systems and Directories

2 Chapter Goals Files, directories, and file systems Text and Binary files Disk-scheduling algorithms 11-2

3 File Systems 11-3

4 File Systems How do we make this: 5-18 Look like this?

5 File Systems File – A named collection of related data – A sequence of bytes File system – The logical view that an operating system provides – Physically, information on the disk is scattered Directory or Folder – A named group of files 11-5

6 Directory Trees Directory tree – A logical view of a file system; – uses a tree structure to represent organization of a file system Root The directory at the highest level 11-6

7 The Disk – A Physical View Data is stored in blocks One file may be spread across several blocks 5-18

8 Directory Trees - A Logical View 11-8

9 File Types 11-9

10 2 File Types 1) Text 2) Binary Depends on: – Are the bytes ASCII Characters or not? 11-10

11 Text and Binary Files Text file – Each byte represents an ASCII character Binary file – Each byte or group of bytes represents something other than a character – The specific meaning of the format of bytes must be understood by the program using the file 11-11

12 Disk Scheduling 11-12

13 Disk Scheduling The File System is a shared resource Many programs ask the operating system for access to the disk Disk scheduling The technique that the operating system uses to determine which disks access requests to satisfy first 11-13

14 Disk Scheduling The File System must be accessed in an efficient manner As a computer deals with multiple processes over a period of time, a list of requests to access the disk builds up 11-14

15 Disk Scheduling How should we move the head to service requests? Figure 5.5 The organization of a magnetic disk 5-18

16 Disk Scheduling Algorithms First-Come, First-Served (FCFS) Shortest-seek-time-first (SSTF) Scan (aka Elevator Algorithm) 11-16

17 FCFS 11-17 First-Come, First-Served Requests are serviced in the order they arrive in the list, without regard to the current position of the heads Problem: Inefficient – The disk heads are moving too much

18 SSTF 11-18 Shortest-seek-time-first (SSTF) The closest item in the list is services first Problem: Starvation – New requests may be closer than older requests, so older requests never get serviced.

19 Scan Scan (aka Elevator Algorithm) Like an elevator Travels from top to bottom, servicing requests along the way Problems?? Problems may exist for special cases. 11-19


Download ppt "Chapter 11 File Systems and Directories. Chapter Goals Files, directories, and file systems Text and Binary files Disk-scheduling algorithms 11-2."

Similar presentations


Ads by Google