Background: File System Implementation, Disk Access Costs and Free Space Management

1 / 18
About This Presentation
Title:

Background: File System Implementation, Disk Access Costs and Free Space Management

Description:

Background: File System Implementation, Disk Access Costs and Free Space Management ... MS-DOS. file name = 8 chars, .', 3-char extension ... –

Number of Views:88
Avg rating:3.0/5.0
Slides: 19
Provided by: adrianai
Category:

less

Transcript and Presenter's Notes

Title: Background: File System Implementation, Disk Access Costs and Free Space Management


1
Background File System Implementation, Disk
Access Costs and Free Space Management
2
File Names
  • Unix
  • long file names (255 bytes)
  • include special characters
  • case sensitive (myshell.c ! Myshell.c)
  • MS-DOS
  • file name 8 chars, ., 3-char extension
  • case insensitive (Grades.txt, grades.txt,
    GRADES.txt, all the same file)

3
File Attributes
4
File Operations(system calls related to files)
  • Create
  • Delete
  • Open
  • Close
  • Read
  • Write
  • Append
  • Seek
  • Get attributes
  • Set Attributes
  • Rename
  • Lock

5
Directories
  • Each directory is a collection of entries, one
    entry per file. Among attributes the address on
    disk where the file starts.
  • Opening a file
  • search directory for the corresponding file entry
  • Read attributes and disk addresses into the main
    memory

6
Directory Structure
7
A Unix Directory Tree
8
Directory Operations
  • Create
  • Delete
  • Opendir
  • Closedir
  • Readdir
  • Rename
  • Link
  • Unlink

9
Moving-head Disk Mechanism
  • Disk access costs Transfer time access time
  • Access time
  • Seek time time to move the disk heads to the
    desired cylinder
  • Rotational latency time for rotating to desired
    sector

10
Files Contiguous allocation
  • (a) Contiguous allocation of disk space for 7
    files
  • (b) State of the disk after files D and E have
    been removed

11
Files Linked List
The links are on the disk (using block numbers)
12
Linked List File Allocation Table
  • Keep the list links in a separate table in memory

13
i-nodes
14
A UNIX i-node
Max file size d direct pointers, n
indirect pointers p/block Blocksize (d n
n2 n3)
15
A UNIX V7 directory entry
16
Reminder Disk organization in UNIX
17
The steps in looking up /usr/ast/mbox
18
Disk Space Management
  • (a) Storing the free list on a linked list
  • (b) A bit map
Write a Comment
User Comments (0)
About PowerShow.com