Operating System Hard Disc (PPT 6) Flashcards

1
Q

What are the properties of a Hard Disc?

A

Hard discs have one or more circular platters which:

  • are stacked one above each other
  • read-write heads move in between platters
  • each platter has two surfaces both carrying data
  • each platter is partitioned into concentric tracks
  • all outer most tracks together form a data cylinder
  • all second tracks together form another cylinder
  • heads are all at the same cylinder at any instant- only one cylinder can be accessed at any one time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the minimum unit of information which can be stored or read?

A

It is a block. Each track is divided up into these

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the two types of file allocation?

A

Pre-allocation and Dynamic Allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Pre-allocation?

A

All space is allocated when a file is created

  • Inflexible and inefficient
  • Estimation of the file size needed which may be wrong
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Dynamic Allocation?

A

Space is allocated as needed

-files can grow and shrink, no estimation needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Portion?

A

A contiguous chunk of free space on disc, composed of one or more consecutive blocks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a File Allocation Table?

A

Keeps track of portions allocated to a file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a Disc Allocation Table?

A

Keeps track of blocks or portions which are free on the disc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does each FAT entry contain for contiguous allocation?

A
  • file name
  • start block
  • no.of blocks in file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What allocation is used for Contiguous allocation?

A

Pre-allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a benefit and disadvantage of Contiguous allocation?

A

Fast random access to blocks within a file but portions of wasted space appear as files are erased and others are inserted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does each FAT entry contain for chained allocation?

A

Exactly the same as for contiguous allocation (file name, start block, no. of blocks in file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What allocation is used for Chained allocation?

A

Dynamic allocation, each block contains a pointer to the next block and the previous

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a benefit and disadvantage of Chained allocation?

A

No portions wasted but random access may be slow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does Indexed Allocation work?

A

Each file contains an index block. This contains pointers to all other portions in a file. The index block indicates start block and length of each portion of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does each FAT entry contain for Indexed Allocation?

A
  • File name

- index block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a benefit and disadvantage of Indexed allocation?

A

Good random access speed and sequential access is easy but since blocks are spread everywhere, there is a head movement penalty

18
Q

What are the three methods to keep track of free space?

A
  • Bit Table
  • Chaining free blocks
  • Indexed free portions
19
Q

What is a Bit table?

A

Disc Allocation Table is a binary number with one bit for each block on disc. If a block is full, its set to 1, if not 0. Disc Allocation Table can be very compact

20
Q

How does Chaining Free Blocks work?

A

Treat free space as a file and use the same chaining method to link all free blocks together. DAT not actually required, only need a pointer to first block in the chain

21
Q

How does Indexed Free Blocks work?

A

Treat free space as a file and use existing allocation method. DAT is simply the index block that we would store under Indexed Allocation. DAT can be very big when there is lots of free space

22
Q

What does NTFS stand for?

A

New Technology File System

23
Q

What is a Sector?

A

It is similar to a block, smallest physical storage unit on the disc, usually 512 bytes but not always

24
Q

What is a Cluster?

A

Similar to a portion, one or more contiguous sectors. Does need to be contiguous in a file. Cluster size is always a power of 2

25
Q

What is a Volume?

A

It is a logical partition on disc, consisting of one or more clusters

26
Q

What does a volume contain?

A
  • file system information
  • a collection of files
  • unallocated space (free space)
27
Q

What can a Volume be?

A
  • 1 disc
  • part of 1 disc
  • spanning several discs
28
Q

What is the fundamental unit of disc space on NTFS?

A

It is a cluster

29
Q

What is the max file size in NTFS?

A

2^32 clusters, equal to 2^48 bytes

30
Q

Name benefits of NTFS

A

It can easily support discs with differing sector sizes. It can also support large discs efficiently and large files by using larger cluster size. Cluster size for a volume is determined at format time

31
Q

What does a NTFS volume contain?

A

-Partition Boot Sector
Contains info about volume layout,file system structures, boot start up info
-Master File Table
Contains info about files and folders on the volume and about unallocated space. Basically an index block and is organised in a relational database structure
-System Files
Includes log file and cluster bit map

32
Q

Do all hard disc platters rotate at the same speed?

A

Yes they do, this is typically 7200 rpm but can vary

33
Q

What is seek time?

A

It is the time to move the disc arm to the required track

34
Q

What is rotational latency?

A

It is the wait time for the correct block to come round under the head.

35
Q

Which file allocation method best takes advantage of locality of reference?

A

Contiguous allocation method best takes advantage. Files are kept together in consecutive blocks so rotational latency and seek time wont be that long. To a lesser extent, the variations of Chained and Indexed allocation when portions are used can also exploit this.

36
Q

What are the six disc scheduling policies?

A
  • LOOK
  • C-LOOK
  • Shortest Service Time First
  • FIFO
  • LIFO
  • Priority
37
Q

What is FIFO?

A

First In First Out
Fairest method of them all, no starvation. Has a reasonable performance if a small number of processes are competing for the hard disk. If a large number are competing however, we will jump all over the disk

38
Q

What is LOOK?

A

This is when the disk arm only moves in one direction. It services all requests until no more are needed in one direction then comes back around and does the rest in the other. It avoids starvation but doesn’t take advantage of locality of reference

39
Q

What is C-LOOK?

A

Modification of LOOK where the direction is only one way. Once finished, the head returns to the start, without servicing requests

40
Q

What is Shortest Service Time First?

A

The request with the shortest seek time is chosen first. This should be quite efficient as it reduces arm movement and takes advantage of locality of reference. However, it can lead to starvation if new requests come in which are closer than older further away requests

41
Q

What is LIFO?

A

Last In First Out
The most recent request is serviced first. Takes advantage of locality of reference as if a process gets several requests in together they will all be serviced. However, starvation is possible

42
Q

What is Priority?

A

Requests made by short interactive jobs may be given a higher priority than others. Not intended for optimised disk I/O efficiency, more for getting short jobs through quickly and give better interactive I/O performance. Long jobs may have to wait and therefore be starved