OS-Data Hierarchy

THE DATA HIERARCHY:

Bits are grouped together in bit patterns to represent all data items. There are 2^n possible bit patterns for a string of n bits.

The two most popular character sets in use today are ASCII (American Standard Code for Information Interchange) and EBCDIC (Extended Binary Coded Decimal Interchange Code). ASCII is popular in personal computers and in data communication systems. EBCDIC is popular for representing data internally in mainframe computer systems, particularly those of IBM.

A field is a group of characters. A record is a group of fields. A record key is a control field that uniquely identifies the record. A file is a group of related records. A database is a collection of files.

BLOCKING AND BUFFERING:

A physical record or block is the unit of information actually read from or written to a device. A logical record is a collection of data treated as a unit from the user’s standpoint. When each physical record contains exactly one logical record, the file is said to consist of unblocked records. When each physical record may contain several logical records, the file is said to consist of blocked records. In a file with fixed-length records, all records are the same length. In a file with variable-length records, records may vary in size up to the block size.

Buffering allows computation to proceed in parallel with input/output. Spaces are provided in primary storage to hold several physical blocks of a file at once – each of these spaces is called a buffer. The most common scheme is called double buffering and it operates as follows (for output). There are two buffers. Initially, records generated by a running process are deposited in the first buffer until it is full. The transfer of the block in the first buffer to secondary storage is then initiated. While this transfer is in progress, the process continues generating records that are deposited in the second buffer. When the second buffer is full, and when the transfer from the first buffer is complete, transfer from the second buffer is initiated. The process continues generating records that are now deposited in the first buffer. This alternation between the buffers allows input/output to occur in parallel with a process’s computations.
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved