


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



3
4
Registers
Cache
Memory
Disk
Tapes
5
(Source: AlphaSort paper, 1995)
6
Spindle rotation
Platter
Platter Spindle
Platter
Tracks
Arm movement
Disk arm
Disk head
Cylinders
āMoving partsā are slow
Track
Track
Track
Sectors
Higher-density sectors on inner tracks and/or more sectors on outer tracks
A block is a logical unit of transfer consisting of one or more sectors
9
10
11
Ā Keep related things (what are they?) close together: same sector/block ā same track ā same cylinder ā adjacent cylinder
Ā While processing the current block in memory, prefetch the next block from disk (overlap I/O with processing)
Ā Example: āelevatorā algorithm
Ā Read/write one entire track at a time
Ā More disk heads working at the same time
12
142 Bart 10 2.3 123 Milhouse 10 3.
456 Ralph 8 2.
857 Lisa 8 4.
142 Bart 10 2.3 123 Milhouse 10 3.1 857 Lisa 8 4. 456 Ralph 8
Cache
Ā When a particular column of a row is brought into the cache, the same column of the next row is brought in together
142 123 857 456
1111
Bart Milhouse Lisa Ralph
10 10 8 8
2.3 3.1 4.3 2.
4 (number of records)
1111
Reorganize after every update (for variable-length records only) and delete to keep fields together
(IS NOT NULL bitmap)
21
Ā Why I/Oās dominate the cost of database operations
Ā Steps in completing a disk access Ā Sequential versus random accesses
Ā Handling variable-length fields Ā Handling NULL Ā Handling modifications
Ā NSM: the traditional layout Ā PAX: a layout that tries to improve cache performance