Boot Sector

Booting is a process of loading Operating System(OS) to primary storage(usually Random Access Memory[RAM]), and readying a computer system for use. This process is carried out using a firmware which loads a small program from a special region in in hard disc,floppy disk, optical disc or other storage devices. This region is known as Boot Sector.

Boot sector is a first sector on a disk which contains boot record(a machine code) which is loaded into RAM by ROM(BIOS) firmware which in turn loads OS/start-up program into RAM to make the computer into a meaningful machine. There are mainly two types of boot sector:

  • Master Boot Record(MBR): For partitioned storage device MBR is the first sector. Hard disk drives
  • Volume Boot Record(VBR): For non-partitioned storage device VBR is the first sector. Floppy disk, USB flash drive.

BIOS does not know about MBR or VBR it simply looks for the first sector of the storage device. VBR which holds the code for booting invoked either directly by the BIOS or indirectly by MBR. In non-partitioned device there is only VBR which is the first sector. In partitioned device VBR is the first sector of an individual partition. The MBR, which understand the disk partitioning of the storage device, invokes the VBR of a partition (primary/active partition) which set to boot, loads OS or other start up program installed within that partition

Bit Stuffing

Bit stuffing is a widely used process in network and communication protocols as a part of transmission process, also used while sending arbitrary data over a communications channel with bandwidth limits (sometime known as run-length limited (RLL)coding).

In communication, to separate one frame from another frame delimiters are used. For most protocols the delimiter usually a sequence of 8-bit pattern are used. In the bit oriented protocol the frame contains sequence of bits representing data. On receiving these frame the layer in the receiver interpret the data part of the frame into usual form. Sometimes the data part are misinterpreted by receiver for delimiter because same pattern used for delimiter may occur in data part. To overcome this, a single bit is stuffed into the data part of the frame to distinguish the delimiter separately. On reaching, receiver remove he stuffed bit from the data part in the frame. For instance if the pattern used for delimiter is 01111110 and in the data part if five consecutive 1 followed by a zero occurred an extra 0 bit is stuffed after fifth 1 into data which is removed by receiver. For example if the data part of the frame contains the following sequence 101111110101, then 0 is stuffed into it after five consecutive 1s, 1011111010101
Bit stuffing, technique is useful when communication protocol requires fixed frame size.

Bit stuffing used in run-length limited(RLL) coding, in which occurrence of same consecutive bits(on reaching allowed numbers) are limited by stuffing opposite bits in specific interval. RLL is a method used in PC Hard Disk,Floppy,CD,DVD for storing data/information. RLL method helps the hard disk to store data more densely than other method such as MFM (Modified Frequency Modulation) and FM(Frequency Modulation).