Lecture 07
Lecture 07
System
Professor Mangal Sain
Lecture 7
Storage Management
Lecture 7 – Part 1
Mass-Storage Systems
OBJECTIVES
1956
IBM RAMDAC computer included the I
BM Model 350 disk storage system
5M (7 bit) characters
50 x 24” platters
Access time = < 1 second
SOLID-STATE DISKS
Nonvolatile memory used like a hard drive
Many technology variations
Can be more reliable than HDDs
More expensive per MB
Maybe have shorter life span
Less capacity
But much faster
Busses can be too slow -> connect directly to
PCI for example
No moving parts, so no seek time or rotational
latency
MAGNETIC TAPE
Was early secondary-storage medium
Evolved from open spools to cartridges
Relatively permanent and holds large quantities of data
Access time slow
Random access ~1000 times slower than disk
Mainly used for backup, storage of infrequently-used
data, transfer medium between systems
Kept in spool and wound or rewound past read-write
head
Once data under head, transfer rates comparable to disk
140MB/sec and greater
200GB to 1.5TB typical storage
Common technologies are LTO-{3,4,5} and T10000
DISK STRUCTURE
Disk drives are addressed as large 1-dimensional
arrays of logical blocks, where the logical block is the
smallest unit of transfer
Low-level formatting creates logical blocks on physical
media
The 1-dimensional array of logical blocks is mapped
into the sectors of the disk sequentially
Sector 0 is the first sector of the first track on the outermost
cylinder
Mapping proceeds in order through that track, then the rest
of the tracks in that cylinder, and then through the rest of
the cylinders from outermost to innermost
Logical to physical address should be easy
Except for bad sectors
Non-constant # of sectors per track via constant angular velocity
DISK ATTACHMENT
Host-attached storage accessed through I/O ports
talking to I/O busses
SCSI itself is a bus, up to 16 devices on one cable,
SCSI initiator requests operation and SCSI targets
perform tasks
Each target can have up to 8 logical units (disks attached
to device controller)
FC is high-speed serial architecture
Can be switched fabric with 24-bit address space – the
basis of storage area networks (SANs) in which many
hosts attach to many storage units
I/O directed to bus ID, device ID, logical unit (LUN)
STORAGE ARRAY
completes successfully
Systems frequently use NVRAM as one physical to
accelerate
Lecture 7 – Part 2
binary
Program
Contents defined by file’s creator
Many types
Consider text file, source file, executable file
FILE ATTRIBUTES
Name – only information kept in human-readable form
Identifier – unique tag (number) identifies file within file
system
Type – needed 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, and user identification – data for protection,
security, and usage monitoring
Information about files are kept in the directory structure,
which is maintained on the disk
Many variations, including extended file attributes such as file
checksum
Information kept in the directory structure
FILE INFO WINDOW ON MAC OS X
FILE OPERATIONS
File is an abstract data type
Create
Write – at write pointer location
Read – at read pointer location
Reposition within file - seek
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
OPEN FILES
Several pieces of data are needed to manage open files:
Open-file table: tracks open files
File pointer: pointer to last read/write location, per
process that has the file open
File-open count: counter of number of times a file
is open – to allow removal of data from open-file
table when last processes closes it
Disk location of the file: cache of data access
information
Access rights: per-process access mode information
OPEN FILE LOCKING
Directory
Files
F1 F2 F4
F3
Fn
Create a file
Delete a file
List a directory
Rename a file
Naming problem
Grouping problem
TWO-LEVEL DIRECTORY
Path name
Can have the same file name for different user
Efficient searching
No grouping capability
TREE-STRUCTURED DIRECTORIES
ACYCLIC-GRAPH DIRECTORIES
Solutions:
Backpointers, so we can delete all pointers
Variable size records a problem
Backpointers using a daisy chain organization
Entry-hold-count solution
Types of access
Read
Write
Execute
Append
Delete
List
ACCESS LISTS AND GROUPS
Mode of access: read, write, execute
Three classes of users on Unix / Linux
RWX
a) owner access 7 111
RWX
b) group access 6 110
RWX
c) public access 1 001
Ask manager to create a group (unique name),
say G, and add some users to the group.
For a particular file (say game) or subdirectory,
define an appropriate access.