Operating Systems.2 Flashcards

1
Q

magnetic disks rotation rate

A

60-250 times/second

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

transfer rate

A

rate of data flow between drive and computer

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

positioning time/ random-access time

A

seek time + rotational latency

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

seek time

A

time taken to move head to desired cylinder (usually 3-12ms)

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

rotational latency

A

time for desired sector to rotate under disk head. based on spindle speed (60/RPM)

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

head crash

A

when disk head comes in contact with disk surface

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

connection between drive and computer

A

drive attached to computer using I/O bus- busses vary.

host controller in computer uses bus to talk to disk controller built into drive or storage array

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

storage range for hard disks

A

30GB - 3TB

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

access latency/average access time

A

average seek time + average latency

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

average I/O time

A

average access time + (amount to transfer/transfer rate) + controller overhead

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

SSDs advantages

A
  • non volatile (used like a hard drive)
  • more reliable than HDDs
  • faster
  • no moving parts so no seek time/rotational latency
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SSDs disadvantages

A
  • lower capacity
  • expensive per MB
  • last less longer
  • busses too slow: can connect directly to PCI for example
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how are disk drives addressed

A

large 1-dimensional arrays of logical blocks- logical block = smallest unit of data transfer

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

low level formatting

A

creates logical blocks on physical media. divides disk into sectors so disk controller can read and write

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

mapping of array onto disks

A

1D array of logical blocks mapped into sectors of the disk sequentially. first sector 0, then rest of sectors on the track, then rest of tracks in the cylinder then rest of cylinders from outermost to innermost

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

sector 0

A

first sector of first track on outermost cylinder

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

logical to physical address is easy unless

A

bad sectors. (non constant num. of sectors per track)

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

how are disks attached to system

A

an array of disks are attached and have controllers

19
Q

disk scheduling

A

OS responsible for using hardware efficiently: fast access time + disk bandwidth

20
Q

disk bandwidth

A

total bytes transferred/total time between first request and completion of last transfer

21
Q

OS disks scheduling

A

maintains queue of requests per disk or device. disk is busy- request is added to queue as drive controller has a buffer. optimisation algorithms used when a queue exists. Several algorithms to service I/O operations in queue.

22
Q

first come first serve (FCFS)

A

requests serviced in the order they arrive

23
Q

(SSTF) shortest seek time first

A

request with minimum seek time from current head position is serviced next. form of SJF scheduling: can cause starvation of requests

24
Q

SCAN aka elevator algorithm

A

start from head and go all the way to the other end and reverse till all requests are serviced.

25
Q

C-SCAN

A

more uniform wait time than SCAN. Head goes all the way to the other end of the disk then returns straight to beginning of disk without servicing any requests on return trip- cylinders treated as a circular queue: wraps from last cylinder to first cylinder.

26
Q

LOOK/C-LOOK

A

LOOK is to SCAN as C-LOOK is to C-SCAN. Difference is, instead of going to the very end of the disk, stop at last request in one direction before reversing/returning to beginning

27
Q

what are the best algorithms for systems that place a heavy load on disk

A

SCAN, C-SCAN: less starvation

28
Q

performance is dependent on

A

number and type of requests

29
Q

reasonable choice for default algorithm

A

SSTF and LOOK

30
Q

each sector holds what information

A

header info, data and ECC (usually 512 bytes but can be selectable)

31
Q

to use a disk to hold files

A

OS needs to record its own data structures on disk- partition disks into cylinders- each treated as a logical disk. logical formatting: creating a file system

32
Q

boot block

A

initialises system: loads bootstrap loader program stored in boot blocks of boot partition

33
Q

swap space

A

Virtual memory uses (raw i.e. no file system) disk space as an extension to main memory

34
Q

file

A

abstract data type: sequence of words/bytes: meaning is decided by programs/OS

35
Q

file attributes

A

name: only information in human readable form
identifier: unique tag identifies file in system
type: needed for systems that supports different file types
size: current file size
location: pointer to where file is stored in system
protection: controls who can read/write/execute
time/date/user id: data for protection/security/usage monitoring
(info kept in directory structure)

36
Q

file operations

A

create, delete, write/read (at pointer locations), seek, truncate (delete contents but keep attributes), open(Fi)/close(Fi)- search directory structure on disk for file entry Fi and move the content of entry to memory (+v.v.)
-must open to carry out any operation

37
Q

how to manage open files

A

open file table: tracks open files
file pointer: points to last read/write location per process that has the file open
file count: counter of number of times a file is open- to allow removal of data when file is closed by the last process

38
Q

file locking

A

at critical section: makes sure noone else has access to the file

  • shared lock: reading file, many people can have access to file
  • exclusive lock: writing a file
  • mandatory: OS denies access depending on locks held and requested
  • advisory: process can find status of locks and decide what to do
39
Q

sequential-access file

A

when reading/writing: read/write one logical block at a time until output indicates end of file
to go backwards: must rewind all the way to the start
(read next/write next/ reset)

40
Q

direct access

A

file is fixed length logical records. can read/write directly to relative block numbers (n)
read n/write n/position to n/read next/write next/rewrite n

41
Q

how to implement sequential file access as direct access

A
(reset) cp = 0
read cp 
cp = cp + 1
write cp 
cp = cp + 1
42
Q

file access methods: indexing

A

have an index of a file in memory for fast determination of location of the data to be operated on.
if too large: index in memory of the index on disk

43
Q

directory structure

A

a collection of nodes containing information about all files- directory structure+files are both stored on disk