1 EN0129 PC and Network Technology - 1 Sajjad Shami Adrian Robson Gerhard Fehringer School of...

21
1 EN0129 PC and Network Technology - 1 Sajjad Shami Adrian Robson Gerhard Fehringer School of Computing, Engineering & Information Sciences Northumbria University Semester One Week 4: Hard Disk Drive HDD [Ref: www.pcguide.com & www.pctechguide.com]

Transcript of 1 EN0129 PC and Network Technology - 1 Sajjad Shami Adrian Robson Gerhard Fehringer School of...

1

EN0129 PC and Network Technology - 1

Sajjad ShamiAdrian Robson

Gerhard Fehringer

School of Computing, Engineering & Information SciencesNorthumbria University

Semester One Week 4:

Hard Disk Drive HDD[Ref: www.pcguide.com & www.pctechguide.com]

2

Hard Drive

Off with the Lid!!!! (Don’t)

3

Detail

Platter

Head

Actuator Arm

Voice Coil Actuator

Spindle

4

More on Platters/Tracks

• Most hard drives have more than one Platter– See OLD ONES in Lab

• Platters are stacked one above the other– The heads fit between the platters– All heads move at the same time– All platters rotate together– At any head position the grouping of the tracks read

by each head is termed a cylinder

5

Cylinders

Spindle

Track on each side

Platter 1

Platter 2

Platter 3

6

Sectors

One TrackSixteen Sectors

( 63 Sectors common)

A sector is the smallest part ofTrack usable.If not enough data to fill a sectorit remains part empty

7

Clusters• A group of sectors

containing data from a common file

8

Partitions and Formats

• A new HD must be prepared before it can hold data

• The HD needs to be– Low level formatted– Partitioned– High level formatted

9

Formatting a HD

• For a HD Low-level formatting is done by the drive manufacturer

• Partitioning and High level formatting is left to the user or person installing the drive

10

Low-level formatting

• Tracks written

• Sector and inter-sector gaps are written

• Sector prefix and suffix information is written.

• Each sectors data area is filled with test pattern data.

11

After Low Level Format

Head 1

Head 2

Head 3

Head 4

Head 5

Head 0

Track 0

Cylinder 0 In this case 6 tracksEach track has 63 sectors

Many Tracks

12

Partitioning

• Partitioning separates a single physical hard drives into a number of different areas (drives C: D:) called ‘partitions’

• Partitions are allocated a number of cylinders

• Each partition can hold a particular file system:– FAT, FAT32, HPFS(OS2), NTFS

13

Head 0

Head 1

Head 2

Head 3

Head 4

Head 5

After Partitioning ( FDISK)

Primary DOS Partition

Extended DOS Partition

Active (can be made bootable)DOS allows only one Primary Partition

Cannot be activeDOS allows only one Extended PartitionMany LOGICAL Drives can be made inside the Extended Partition.

14

Why Partition ?

• Every drive MUST have at least ONE

• Most Drives have more than one

• It is at this stage that the Master Boot Record is created– The MBR is the first thing accessed after the

POST

15

The Master Boot Record MBR

Head 0

Track 0

Sector 1

Sector one, track zero, head zero is where the MBR is stored

The MBR stores info re the Partitions.

Location

Whether active or not

This is used to find the boot sector.

16

Location of First Partiton

• The MBR is located at CHS 001

• The first partition starts at CHS 011

• Only sector 1 on track 0 head 0 is used

• Sectors 2 thro 63 are unused. !!!!!!!!!

Head 0

Head 1

17

MBR Layout

446 Bytes 64 Bytes 2 Bytes

Initial Program Loader (Bootstrap) 4 partition TablesMagic Number

Active Start CHS Starting SectorType End CHS Nr. of Sectors

1 Byte 1 Byte 3 Bytes 4 Bytes 4 Bytes3 Bytes

18

High-level formatting

• The Operating System writes the:– File-system

• For FAT file system – Volume Boot Sector (VBS)– File Allocation Table (FAT)– Root directory

19

FORMAT • The FORMAT command READS the partition

table and gets information about sectors.

•  FORMAT generates the boot sector, writes two File Allocation Tables (FAT) and the root directory.

• Immediately after format the FAT is filled with 00h (00 hexadecimal) which indicates that the disk does not contain data.

20

Format

• Format groups the SECTORS into CLUSTERS

• Files are stored in groups of clusters

• The FAT stores info about which clusters each files occupies and in what sequence

21

FATBoot

Root directoryFAT

40 4241 62 103

40: 41

41: 42

42: 103

43……

other nr’s

62: EOF

103: 62

Example.ext…. 2000 ……40…