Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

Comp 335 File Structures

Why File Structures?

Goal of the Class

To develop an understanding of the file I/O


process. Software must be able to interact
with files on secondary storage devices.
Learn primary methods of how files can be
structured and organized to aid in efficient
information storage and retrieval of the
information QUICKLY and EFFICIENTLY!

History of File Structures

Early in computing history, secondary storage was


in the form of magnetic tape and punched cards.
Storage was cheap but access was limited to
sequential.
In 1956, IBM introduced the RAMAC magnetic disk
device. It could be leased for $620 month and
could store approximately 5 Mb of data. Data could
be accessed directly instead of sequentially.
Conserving the space on the disk and getting to the
data quickly became an area of research. This was
the dawn of the study of file structures.
RAMAC Video

IBM 350 Disk File

History of File Structures

Advances in operating systems gave rise to


more research in operating systems. The
ability to multi-task processes was a new
concept. Disk drives were slow (and still
are) and became a big bottleneck in
software. It was important to come up with
ways to speed up the file I/O process.

How SLOW is a disk drive?

To the human, disk drives are extremely fast. Higher end


computers like servers can purchase 10K to 15K RPM.
For consumers, laptops and most desktops are 5400 or
7200 RPM.
However, when compared to a computer, disk drives are
very slow, especially when comparing them to the speed
of a CPU and main memory processes.
CPU (nanoseconds, one-billionth of a second), Disk
accesses (milliseconds, one-thousandth of a second)
SSDs are becoming more common. Faster because
there are no moving parts, but expensive.

Comparing CPU speed to


Disk speed
Assume a RAM access is 120 ns
Assume a Disk access is 30 ms.
How many RAM accesses can be made in the time it
takes to do one disk access?
Answer: ?
Folk and Zoellick (File Structures, An Object-Oriented
Approach using C++) mention in human terms that
if a RAM access were 20 SECONDS the DISK
access take 58 DAYS!

History of File Structures

The development of high level


languages moved file processing from
a physical level (hardware dependent)
to a logical level (software dependent
with the OS handling the specifics of
the hardware).
Code became more portable but lost
some in the efficiency area.

History of File Structures

Today, with shared data everywhere


(networks, internets, etc) efficient file
structures are even more crucial.
People want data fast. Crowded
networks do not need extra bits to
transmit.

File Structure Technique


Chronology

Sequential techniques - sequential search thru a file


Indexing traversing more than one file to access data
Tree structures

AVL self balancing concept, faster access

B-tree large branching factor from a node


Hashing - one access only to desired data achieved by
converting a record key to the storage address of the data

Techniques continually improved on access time to get to the data.


This is the most crucial element in file structure design.
A file structure is a combination of data representation on file and
the operations for accessing this data.

Understanding Disk Drives

Terms:

Seek
Rotational Latency
Read/Write Time
Platter
Read/Write head
Spindle speed
Cylinder
Track
Sector/Cluster

Hard Disk Drive Basics

Understanding Disk Drives

Understanding Disk Drives

Understanding Disk Drives

Disk Drive Videos

Inside a computer disk drive


Engineering viewpoint of a disk drive

Review

RAMAC
Why are disk drives slow?
Purpose of file structures
File structure techniques

You might also like