Professional Documents
Culture Documents
Files and Disks
Files and Disks
Chap 0
Hardware
monitor
CPU
cache
cache
graphics
controller
system bus
IDE Disk
Controller
disk 1
...
disk n
Chap 0
Chap 0
Communication (cont)
Chap 0
Handling Interrupts
defer interrupts
call the proper interrupt service routine (ISR)
distinguish and prioritize between high- and low-priority
interrupts
Chap 0
More on Interrupts
Chap 0
Kernel IO Subsystem
user
OS
DD
ISR
controller
device
Chap 0
sector
Chap 0
Chap 0
Chap 0
Chap 0
Interleaving
Rotational
Seek (or arm speed)
Transfer
Chap 0
Chap 0
Chap 0
Complex Structures
Formatted document
Relocatable load file
19
Lines
Fixed length
Variable length
Operating system
Program
File Attributes
20
File Operations
21
create
write
read
file seek: reposition within file
delete
truncate
open(Fi) search the directory structure on disk
for entry Fi, and move the content of entry to
memory.
close (Fi) move the content of entry Fi in memory
to directory structure on disk.
Directory Structure
Files
22
F1
F2
F3
F4
Fn
23
Name
Type
Address
Current length
Maximum length
Date last accessed (for archival)
Date last updated
Owner ID
Protection information
24
Goals:
Efficiency locating a file quickly.
Naming convenient to users.
25
Single-Level Directory
26
Naming problem
Grouping problem
Two-Level Directory
27
Path name
Can have the same file name for different
user
Efficient searching
No grouping capability
Tree-Structured Directories
Efficient searching
Grouping Capability
Current directory (working directory)
28
cd /spell/mail/prog
type list
prog
29
Acyclic-Graph Directories
30
Protection
Types of access
31
7
6
1 1 1
1 1 0
c) public access
0 0 1
owner
32
group
public
33