Magnetic Tapes Cd-Rom: Adil Yousif, PHD
Magnetic Tapes Cd-Rom: Adil Yousif, PHD
Magnetic Tapes
CD-ROM
Lecture 3
Characteristics
No direct access, but very fast sequential access.
Resistant to different environmental conditions.
Easy to transport, store, cheaper than disk.
Before it was widely used to store application data;
nowadays, it’s mostly used for backups or archives.
2
MT Characteristics-2
A sequence of bits are stored on magnetic tape.
For storage, the tape is wound on a reel.
To access the data, the tape is unwound from one
reel to another.
As the tape passes the head, bits of data are read
from or written onto the tape.
3
Reel 1 Reel 2
tape
Read/write head
4
Tracks
Typically data on tape is stored in 9 separate bit
streams, or tracks.
Each track is a sequence of bits.
Recording density = # of bits per inch (bpi).
Typically 800 or 1600 bpi.
30000 bpi or more on some recent devices.
5
MT recording in detail
8 bits = 1 byte
… 0 0 0 0 …
1 1 1 1
1 1 1 1
0 0 0 0
1 1 1 1 ½”
1 1 1 1
0 0 0 0
…
…
1
0
1
0
1
0
1
0
…
…
parity bit
6
Tape Organization
logical record
2400’
EOT
BOT marker
Data blocks Interblock gap
marker
(for acceleration &
deceleration of tape)
Header block
(describes data blocks)
7
Data Blocks and Records
Each data block is a sequence of contiguous records.
A record is the unit of data that a user’s program
deals with.
The tape drive reads an entire block of records at
once.
Unlike a disk, a tape starts and stops.
When stopped, the read/write head is over an
interblock gap.
8
Example: tape capacity
Given the following tape:
Recording density = 1600 bpi
Tape length = 2400 '
Interblockgap = ½ "
512 bytes per record
Blocking factor = 25
9
10
11
Organization of data
Reading a CD is done by shining a laser at the disc and
detecting changing reflections patterns.
1 = change in height (land to pit or pit to land)
0 = a “fixed” amount of time between 1’s
12
CD-ROM
While the speed of CD-ROM readers is relatively
higher, such as 24X(24 times CD audio speed), the
speed of writing is much slower, as low as 2X.
Note that the speed of the audio is about 150KB per
second.
The DVD (Digital Video Disc or Digital Versatile
Disc) technology is based on CD technology with
increased storage density.
The DVD technology allows two-side medium,
which may extend the CD-ROM to a storage
capacity of up to 17GB, using special SW and HW
decoder....
13
DVD vs CD-ROM
The main differences between the CD and DVD are summarized in the following table:
Feature DVD CD-ROM
Substrate diameter / thickness (mm) 120 / 1.2 120 / 1.2
Sides 1 or 2 1
Layers per side 1 or 2 1
Capacity (GB) 4.7, 8.54, 9.4, or 17 ~ 0.7
Track pitch (microns) 0.74 1.6
Min pit length (microns) 0.4 - 0.44 0.83
Linear velocity used for scan (m/s) 3.5 - 3.84 1.3
Laser wavelength (nm) 635 or 650 780
Numerical aperture 0.6 0.45
Modulation 8 to 16 EFM (8 to 17)
Error correction code (ECC) RSPCCIRC
Durability and dust/scratch same as that of CD high
14
CD-ROM
16
File Structures for CD-ROM
17
File Structures for CD-ROM
In this case, one seek may be necessary per
subdirectory. For example
/usr/home/mydir/ceng351/exam1
will require five seeks to locate the file exam1
only…
Solution
One approach place the entire directory structure in
one file, such that it allows building a left child right
sibling structure to be able to access any file.
For a small file structure file, the entire
directory structure can be kept in the memory
all the time, which allows method to work.
18
File Structures for CD-ROM
The second approach is to create an index to the
file locations by hashing the full path names of
each file.
This method will not work for generic file or
directory searches.
A third method may utilize both above methods,
one can keep the advantage of Unix like one file per
directory scheme, at the same time allows building
indexes for the subdirectories.
19
File Structures for CD-ROM
A forth method, assume directories as files as well
and use a special index that organizes the
directories and the files into a hierarchy where a
simple parental index indicates the relationship
between all entries.
Rec Number File or dir name Parent
0 Root
1 Subdir1 0
2 Subdir11 1
3 Subdir12 1
4 File11 1
5 File 0
6 Subdir2 0
20
Representation of individual files on CD-
ROM
21
Representation of individual files on CD-
ROM
22
23
A journey of a Byte
and
Buffer Management
A journey of a byte
24
Application program
Requests the I/O operation
Operating system / file manager
Keeps tables for all opened files
Brings appropriate sector to buffer.
Writes byte to buffer
Gives instruction to I/O processor to write data from this
buffer into correct place in disk.
Note: the buffer is an exact image of a cluster in disk.
I/O Processor
a separate chip; runs independently of CPU
Find a time when drive is available to receive data and put dat
in proper format for the disk
Sends data to disk controller
Disk controller
A separate chip; instructs the drive to move R/W head
Sends the byte to th surface when the proper sector comes
under R/W head.
25
Buffer Management
Data transferred
by blocks
Secondary
Storage Buffer Program
Data transferred by
records
Temporary storage in MM
for one block of data
27
Buffer Bottlenecks
30
Questions