DOC PREVIEW
UT Dallas CS 6360 - Ch17

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

PowerPoint PresentationDisk Storage DevicesDisk Storage Devices (cont.)Slide 4Slide 5Slide 6RecordsBlockingFiles of RecordsFiles of Records (cont.)Unordered FilesOrdered FilesOrdered Files (cont.)Average Access TimesHashing TechniquesSlide 16Hashed FilesHashed Files (cont.)Slide 19Slide 20Hashed Files - Overflow HandlingDynamic And Extendible Hashed FilesDynamic And Extendible Hashing (cont.)Extendible HashingSummaryCopyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-WesleyChapter 17Disk Storage, Basic File Structures, and HashingCopyright © 2011 Ramez Elmasri and Shamkant NavatheDisk Storage DevicesPreferred secondary storage device for high storage capacity and low cost.Data stored as magnetized areas on magnetic disk surfaces.A disk pack contains several magnetic disks connected to a rotating spindle.Disks are divided into concentric circular tracks on each disk surface.Track capacities vary typically from 4 to 50 Kbytes or moreCopyright © 2011 Ramez Elmasri and Shamkant NavatheDisk Storage Devices (cont.)A track is divided into smaller blocks or sectorsbecause it usually contains a large amount of information The division of a track into sectors is hard-coded on the disk surface and cannot be changed.A track is divided into blocks.The block size B is fixed for each system.Typical block sizes range from B=512 bytes to B=4096 bytes.Whole blocks are transferred between disk and main memory for processing.Copyright © 2011 Ramez Elmasri and Shamkant NavatheDisk Storage Devices (cont.)Copyright © 2011 Ramez Elmasri and Shamkant NavatheDisk Storage Devices (cont.)A read-write head moves to the track that contains the block to be transferred.Disk rotation moves the block under the read-write head for reading or writing.A physical disk block (hardware) address consists of:a cylinder number (imaginary collection of tracks of same radius from all recorded surfaces)the track number or surface number (within the cylinder)and block number (within track).Reading or writing a disk block is time consuming because of the seek time s and rotational delay (latency) rd.Double buffering can be used to speed up the transfer of contiguous disk blocks.Copyright © 2011 Ramez Elmasri and Shamkant NavatheDisk Storage Devices (cont.)Copyright © 2011 Ramez Elmasri and Shamkant NavatheRecordsFixed and variable length recordsRecords contain fields which have values of a particular typeE.g., amount, date, time, ageFields themselves may be fixed length or variable lengthVariable length fields can be mixed into one record:Separator characters or length fields are needed so that the record can be “parsed.”Copyright © 2011 Ramez Elmasri and Shamkant NavatheBlockingBlocking: Refers to storing a number of records in one block on the disk.Blocking factor (bfr) refers to the number of records per block. There may be empty space in a block if an integral number of records do not fit in one block.Spanned Records:Refers to records that exceed the size of one or more blocks and hence span a number of blocks.Copyright © 2011 Ramez Elmasri and Shamkant NavatheFiles of RecordsA file is a sequence of records, where each record is a collection of data values (or data items).A file descriptor (or file header) includes information that describes the file, such as the field names and their data types, and the addresses of the file blocks on disk.Records are stored on disk blocks. The blocking factor bfr for a file is the (average) number of file records stored in a disk block.A file can have fixed-length records or variable-length records.Copyright © 2011 Ramez Elmasri and Shamkant NavatheFiles of Records (cont.)File records can be unspanned or spanned Unspanned: no record can span two blocksSpanned: a record can be stored in more than one blockThe physical disk blocks that are allocated to hold the records of a file can be contiguous, linked, or indexed.In a file of fixed-length records, all records have the same format. Usually, unspanned blocking is used with such files.Files of variable-length records require additional information to be stored in each record, such as separator characters and field types.Usually spanned blocking is used with such files.Copyright © 2011 Ramez Elmasri and Shamkant NavatheUnordered FilesAlso called a heap or a pile file.New records are inserted at the end of the file.A linear search through the file records is necessary to search for a record.This requires reading and searching half the file blocks on the average, and is hence quite expensive.Record insertion is quite efficient.Reading the records in order of a particular field requires sorting the file records.Copyright © 2011 Ramez Elmasri and Shamkant NavatheOrdered FilesAlso called a sequential file.File records are kept sorted by the values of an ordering field.Insertion is expensive: records must be inserted in the correct order.It is common to keep a separate unordered overflow (or transaction) file for new records to improve insertion efficiency; this is periodically merged with the main ordered file.A binary search can be used to search for a record on its ordering field value.This requires reading and searching log2 of the file blocks on the average, an improvement over linear search.Reading the records in order of the ordering field is quite efficient.Copyright © 2011 Ramez Elmasri and Shamkant NavatheOrdered Files (cont.)Copyright © 2011 Ramez Elmasri and Shamkant NavatheAverage Access TimesThe following table shows the average access time to access a specific record for a given type of fileCopyright © 2011 Ramez Elmasri and Shamkant NavatheHashing TechniquesInternal HashingFor internal files, hashing is implemented as a hash table through the use of an array of records.External HashingCopyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-WesleyCopyright © 2011 Ramez Elmasri and Shamkant NavatheHashed FilesHashing for disk files is called External HashingThe file blocks are divided into M equal-sized buckets, numbered bucket0, bucket1, ..., bucketM-1.Typically, a bucket corresponds to one (or a fixed number of) disk block.One of the file fields is designated to be the hash key of the file.The record with hash key value K is stored in bucket i, where i=h(K), and h is the hashing


View Full Document

UT Dallas CS 6360 - Ch17

Documents in this Course
Ch22(1)

Ch22(1)

44 pages

Ch21

Ch21

38 pages

Ch19

Ch19

46 pages

Ch18

Ch18

25 pages

Ch17

Ch17

21 pages

Ch15

Ch15

42 pages

Ch09

Ch09

42 pages

Ch05

Ch05

34 pages

Ch22

Ch22

45 pages

Ch21

Ch21

38 pages

Ch19

Ch19

48 pages

Ch18

Ch18

24 pages

Ch17

Ch17

22 pages

Ch16

Ch16

17 pages

Ch15

Ch15

42 pages

Ch09

Ch09

42 pages

Ch08

Ch08

39 pages

Ch07

Ch07

34 pages

Ch06

Ch06

43 pages

Ch05

Ch05

34 pages

Ch04

Ch04

39 pages

Ch03(2)

Ch03(2)

36 pages

Ch02

Ch02

33 pages

Ch08

Ch08

28 pages

Ch07

Ch07

31 pages

Ch06

Ch06

43 pages

Ch05

Ch05

39 pages

Ch04(1)

Ch04(1)

39 pages

Ch03(1)

Ch03(1)

38 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch24

Ch24

36 pages

Ch21

Ch21

54 pages

Ch19

Ch19

48 pages

Ch18

Ch18

24 pages

Ch17

Ch17

22 pages

Ch03(1)

Ch03(1)

38 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch24

Ch24

36 pages

Ch21

Ch21

54 pages

Ch19

Ch19

48 pages

Ch18

Ch18

24 pages

Ch17

Ch17

22 pages

Ch08

Ch08

28 pages

Ch07

Ch07

31 pages

Ch06

Ch06

43 pages

Ch05

Ch05

39 pages

Ch04(1)

Ch04(1)

39 pages

Ch08

Ch08

39 pages

Ch07

Ch07

40 pages

Ch06

Ch06

47 pages

Ch05

Ch05

41 pages

Ch04

Ch04

43 pages

Ch03

Ch03

41 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch18

Ch18

24 pages

Ch08

Ch08

39 pages

Ch07

Ch07

40 pages

Ch06

Ch06

47 pages

Ch05

Ch05

41 pages

Ch04

Ch04

43 pages

Ch03

Ch03

41 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch18

Ch18

24 pages

Ch17

Ch17

25 pages

lab-manual

lab-manual

215 pages

Ch08

Ch08

39 pages

Ch07

Ch07

40 pages

Ch06

Ch06

47 pages

Ch05

Ch05

41 pages

Ch04

Ch04

43 pages

Ch03

Ch03

41 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch17

Ch17

25 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch18

Ch18

24 pages

Ch17

Ch17

25 pages

Ch08

Ch08

39 pages

Ch07

Ch07

40 pages

Ch06

Ch06

47 pages

Ch05

Ch05

41 pages

Ch04

Ch04

43 pages

Ch03

Ch03

41 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Ch04(1)

Ch04(1)

43 pages

Ch07

Ch07

40 pages

Ch03

Ch03

42 pages

Ch01

Ch01

36 pages

Ch02

Ch02

38 pages

Ch05

Ch05

41 pages

Ch06

Ch06

47 pages

Ch08

Ch08

39 pages

Ch17

Ch17

25 pages

Ch18

Ch18

24 pages

Ch09

Ch09

42 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch21

Ch21

54 pages

Ch19

Ch19

51 pages

Ch18

Ch18

24 pages

Ch09

Ch09

42 pages

Ch08

Ch08

39 pages

Ch07

Ch07

40 pages

Ch06

Ch06

47 pages

Ch05

Ch05

41 pages

Ch04(1)

Ch04(1)

43 pages

Ch03

Ch03

42 pages

Ch02

Ch02

38 pages

Ch01

Ch01

36 pages

Load more
Download Ch17
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Ch17 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Ch17 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?