Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.

Similar presentations

Presentation on theme: "1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage."— Presentation transcript:

1 1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage

2 2 Disks Direct access storage devices (DASD) It is possible to access data directly as well as sequentially Accessing data has a lower overhead than serial devices (e.g., tapes) Types Fixed-head hard disks Removable hard disks Floppy disks

3 3 Disk Drives Platters Spindle read/write head Arm Boom

4 4 Sector: the smallest addressable portion of a disk. Tracks Sector Disk Organization Gap

5 5 Disk Packs Seven cylinders Ten tracks

6 6 Capacity Calculation Capacity = #cylinders  Cylinder capacity = #cylinders  (# tracks/cylinder  Track capacity) = #cylinders  #tracks/cylinder  #sectors/track * Bytes/sector

7 7 Data Organization Sector organization of track fixed length determined by the operating system Block organization of track variable length user defined

8 8 Sector Organization Clusters contiguous group of sectors on cylinder fixed size smallest space assigned to a file Extents collection of contiguous clusters  can be accessed with a minimum amount of seeking Therefore each extent consists of several adjacent clusters each cluster consists of several adjacent sectors

9 9 Cluster number location 1 2 3 : File Allocation Table (FAT)

10 10 Sector Organization Advantages simplifies allocation of storage space simplifies address calculation simplifies synchronization of CPU computation with record accessing Disadvantage internal fragmentation: space unused within a sector

11 11 Block Organization no internal fragmentation complicated address calculations increased non-data overhead data block data block count block count block User defined length …

12 12 Disk Access Time = Seek time + Rotational delay + transfer time Seek time: time to move access arm to correct cylinder T(seek) = S + Const  N, where S = Initial time, N = # of cylinders moved For PC’s T(seek)= 20 + 0.3  N ms; For large disks T(seek)= 3 + 0.1  N ms Rotational delay: time to find correct place on track on average: half a revolution Transfer time: time to move data (# of bytes transferred)  (# of bytes of track )  rotation time Cost of Disk Access

13 13 Example Consider  A 300 Mbyte disk with average seek time = 18 msec, rotational delay = 8.3 msec, 512 Bytes/sector, 8 sectors/cluster  A file of 8000 256-byte records = 2048 K bytes 500 clusters within 100 extents Case 1: The file is stored in 100 extents, i.e., 100 seek times and transfer time for one extent is 16.7 msec. Total time = 100  ( 18 + 8.3 + 16.7) = 4.3 seconds Case 2: The file is stored in 8000 sectors, randomly distributed over the disk, thus, 8000 seek times are needed Total time = 8000  (18 + 8.3 + 3.3 ) = 236.8 seconds

14 14 Program requests Write OS passes job to file manager File manager finds physical file name does security check search FAT for physical address in disk transfer data to buffer pass job to I/O processor I/O processor gets data from buffer breaks it into sectors sends it to disk controller Disk controller instructs disk driver to do dirty job Disk Access Process

15 15 Improving Access Time Organize data by cylinders Use multiple disks Mirror disks More intelligent disk scheduling Elevator algorithm Prefetching and buffering

16 16 Buffer Management Goal: reduce the number of disk accesses Reside in RAM Buffer strategies multiple buffering buffer pooling Program data area I/O Buffer Disk

17 17 Magnetic Tapes Sequential access devices Very slow Inexpensive (??) Used as backup and archives

18 18 parity track Nine Track Tape Above set-up assumes odd, vertical parity There is no concept of an address; reading is sequential 1 0 0 0 1 0 0 1 0

19 19 data block gap Tape Layout A data block is a group of frames whose sizes can very from a few bytes to many kilobytes. An interblock gap is a space on tape without information that separates blocks. the gap provides sufficient space for the tape to start and/or stop.

20 20 Tape Drivers Tape density bits per inch (bpi) commonly 800, 1600, 6250,..., bpi Tape speed inches per second (ips) usually 30 to 200 ips Size of intergap: commonly between 0.3in and 0.75in

21 21 Calculating Space Requirements Space requirements: s = n (b + g) where b = block size (inches) g = gap (inches) n = number of blocks s = total space Blocking factor: number of records stored in a physical block

22 22 Example Consider: a file with one million 100-byte records type drive: 6250 bpi, with 0.3in gap Case 1: blocking factor = 1 S= n(b + g) = 1,000,000  (100/6250 + 0.3) = 26,334 (feet) Case 2: blocking factor = 50 S = 20,000  (5000/625 +0.3) = 1834 (feet)

Download ppt "1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage."

Similar presentations

Ads by Google