Virtual Memory, Disk Devices

1  Virtual Memory

1.1  Why Use Virtual Memory?

1.2  Paging

1.3  Paging - How It Works

1.4  Hardware Requirements

1.5  Optimal Page Replacement

1.6  Not Recently Used Algorithm

1.7  FIFO Algorithm - First In, First Out

1.8  Second Chance

1.9  Least Recently Used (LRU)

1.10  VM Problems

Figs/thrash.gif

1.11  Initial Process Memory Allocation

2  Device Drivers and Interrupt Handlers

Function Device Type Description
d_open Block and character Initialise device when first used
d_close Block and character Used when device is released. May
shutdown device or take it off-line.
d_strategy Block Read/write interface, allows event re-ordering.
d_read Character Reads data from device.
d_write Character Writes data to device.
d_ioctl Block and character Generic control operations on device.

3  The Disk Device

3.1  Disk Hardware

Figs/disk_hw.gif

3.2  Arm Scheduling - FCFS

Figs/fcfs.gif
(from Tanenbaum)

3.3  Shortest Seek Time First

Figs/5-27.gif
(from Tanenbaum)

3.4  SCAN Algorithm

Figs/5-28.gif
(from Tanenbaum)

3.5  C-SCAN Algorithm

Figs/clook.gif
(from Tanenbaum)

4  Direct Memory Access

Location Meaning of Register
10,000 Disk address: cylinder, head, sector
10,004 Operation to perform: read or write
10,008 Start of DMA buffer in main memory



File translated from TEX by TTH, version 3.85.
On 8 Dec 2010, 08:43.