CS 350 Topics 5-8

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/195

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:06 AM on 4/7/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

196 Terms

1
New cards

Device

How a computer receives input from, and produces output for, the outside world. Also known as peripheral.

2
New cards

Bus

A communication pathway between various components of a computer.

3
New cards

Internal Bus

Also known as memory bus, it’s for communication between the processor and main memory. It is fast and close to the processor(s).

4
New cards

Peripheral Bus

Also known as expansion bus, it allows devices in the computer to communicate.

5
New cards

Port-Mapped I/O, Memory-Mapped I/O

A processor communicate with a device via two ways:

  1. ____ (PMIO)

  2. ____ (MMIO)

6
New cards

Port-Mapped I/O

A processor communicates with a device using special I/O instructions (in, out) and a separate port-based address space.

7
New cards

assembly, I/O, port, memory

With a Port-Mapped I/O (PMIO), the processor uses special ____ language ____ instructions. Device registers are assigned ____ numbers, which correspond to regions of ____ in separate, smaller address space.

8
New cards

Memory-Mapped I/O

A processor communicates with a device using normal load/store instructions and memory-mapped addresses.

9
New cards

physical, processors, main

With Memory-Mapped I/O (MMIO), each device register has a ____ memory address. ____ can read from, or write to, these device registers using normal load and store instructions, as though accessing ____ memory.

10
New cards

Device Registers

Memory-mapped I/O for devices is carried out through these.

11
New cards

status, command, data

There are three primary types of device registers:

  1. ____

  2. ____

  3. ____

12
New cards

status

Primary device register that tells you something about the current state of the device. Typically, this register is read.

13
New cards

command

Primary device register used to control the device by writing specific values.

14
New cards

data

Primary device register used to transfer data between the processor and the device.

15
New cards

Status and Command

A combined register that is read to discover the the current state of the device and written to issue the device a command.

16
New cards

Data Buffer

A combined register that is sometimes separated into data_in and data_out buffers.

17
New cards

Undefined Behaviour

When the system’s outcome is unpredictable and not specified (for example, writing to a device while a write is already in progress).

18
New cards

IRQ

Short for interrupt request.

19
New cards

Device Driver

A part of the kernel that interacts with a device, for example write a character to a serial output device.

20
New cards

Communication

____ happens by reading from, or writing to, the command, status and data registers.

21
New cards

Polling, Interrupts

Two methods for interacting with devices are:

  1. ____

  2. ____

22
New cards

Polling

A method for interacting with devices where the kernel driver repeatedly checks the device’s status, which uses processor time.

23
New cards

Interrupts

A method for interacting with devices where the kernel does not wait for the device to complete the command. Instead, request completion is taken care of by the interrupt handler.

24
New cards

status, signals

In polling, the CPU busy waits by repeatedly reading the ______ register, whereas in interrupts, the CPU does not wait and the device ______ completion.

25
New cards

Program-Controlled I/O, Direct Memory Access

There are two strategies for transferring data to or from devices:

  1. ____ (PIO)

  2. ____ (DMA)

26
New cards

Program-Controlled I/O

Strategy for transferring data to/from devices where the device driver moves the data between main memory and a buffer on the device.

27
New cards

Direct Memory Access

Strategy for transferring data to/from devices where the device itself is responsible for moving data to and from memory.

28
New cards

processor, PMIO, MMIO, small

In Program-Controlled I/O or Programmed I/O (PIO), the device driver uses the ____ to transfer the data with either ____ or ____. PIO is suitable for transferring a ____ amount of data.

29
New cards

processor, block, large

In Direct Memory Access (DMA), the ____ is not used to transfer the data and is free to do something else. DMA is used for ____ data transfers between devices (e.g., between a disk controller and main memory). DMA is suitable for transferring ____ amounts of data.

30
New cards

data, DMA, starting, RAM, amount

Large Data Transfer to/from Devices Step 1:

The processor initiates the ____ transfer (i.e. issues a ____ request to the disk controller), giving it the ____ address of the destination in ____ and the ____ of data to transfer.

<p>Large Data Transfer to/from Devices Step 1:</p><p>The processor initiates the ____ transfer (i.e. issues a ____ request to the disk controller), giving it the ____ address of the destination in ____ and the ____ of data to transfer.</p>
31
New cards

controller, main

Large Data Transfer to/from Devices Step 2:

The ____ (not the processor) writes to ____ memory.

<p>Large Data Transfer to/from Devices Step 2:</p><p>The ____ (not the processor) writes to ____ memory.</p>
32
New cards

transfer, controller, interrupt

Large Data Transfer to/from Devices Step 3:

When the ____ is complete, the ____ generates an ____ to let the kernel know it is complete.

<p>Large Data Transfer to/from Devices Step 3:</p><p>When the ____ is complete, the ____ generates an ____ to let the kernel know it is complete.</p>
33
New cards

platters, actuator arm

A hard drive (a.k.a. hard disk drive) consists of two major parts. A stack of ____ (a.k.a. disks) that spin around and the ____ ____ (a.k.a. disk arm assembly).

34
New cards

Platter

A rotating disk coated with magnetic material used to store data. Part of a hard drive.

<p>A rotating disk coated with magnetic material used to store data. Part of a hard drive.</p>
35
New cards

Actuator Arm

A mechanical arm that positions the read/write head over different tracks. Part of a hard drive.

<p>A mechanical arm that positions the read/write head over different tracks. Part of a hard drive.</p>
36
New cards

Spindle

A central motor that spins the platters in a hard drive at a constant speed.

<p>A central motor that spins the platters in a hard drive at a constant speed.</p>
37
New cards

surfaces, spindle, 5400, 7200, 100, 200

Regarding the stack of platters, each platter has two ____, which can be used to store data. The platters rotate together on a central ____ at a fixed speed, typically either ____ or ____ rotations per minute (rpm). The drive speed drifts slowly over time, so the exact rotational position cannot be predicted after ____ – ____ revolutions.

38
New cards

pivot, together, shocks, read, write, surfaces

Regarding the actuator arm, it rotates around a ____. All parts of the arms move ____. The pivot offers some resistance to linear ____. The arm contains ____/____ heads — one for each recording surface. The heads read data from, and write data to, the disk ____.

39
New cards

tracks, cylinders

Surfaces are broken up into a series concentric circles called ____ and ____.

40
New cards

Track

A single concentric circle on a single surface.

<p>A single concentric circle on a single surface.</p>
41
New cards

Cylinder

The collection of all the tracks (one for each surface) that are in the same relative location. The actuator arm moves all read/write heads to the same of this.

<p>The collection of all the tracks (one for each surface) that are in the same relative location. The actuator arm moves all read/write heads to the same of this.</p>
42
New cards

Read/Write Heads

These sense and record data along one cylinder at a time.

<p>These sense and record data along one cylinder at a time.</p>
43
New cards

CHS

Addressing scheme for locating data on a disk which specifies a block’s location using the track, surface and sector.

44
New cards

cylinder, head, sector

CHS stands for ____ (track), ____ (surface), and ____.

45
New cards

cylinders, sectors, controller

In CHS, even though the outer ____ have a larger circumference, they have the same number of ____ and store the same amount of data. It was done this way because it is easy for the ____ to find the location based on those three parameters.

<p>In CHS, even though the outer ____ have a larger circumference, they have the same number of ____ and store the same amount of data. It was done this way because it is easy for the ____ to find the location based on those three parameters.</p>
46
New cards

Logical Block Addressing

An addressing scheme that assigns sequential numbers to disk blocks, abstracting away their physical location.

47
New cards

disk positioning system

The ____ ____ ____ moves the arm to a specific cylinder and keeps it there. It resists physical shocks, imperfect tracks, etc.

48
New cards

Seek Time

The time it takes to move the arm to the correct cylinder.

49
New cards

speedup, coast, slowdown, settle

A seek consists of up to four phases:

  1. ____ – accelerate the arm to the maximum speed or until the half way point

  2. ____ – at max speed (for long seeks)

  3. ____ – stops arm near destination

  4. ____ – adjusts head to actual desired track

50
New cards

head, seek

____ switch times comparable to short ____ times.

51
New cards

catch error, overwrite

Writes require longer settle time than reads because:

  • reads can ____ ____ and retry

  • writes may ____ other tracks

52
New cards

1/3

Average seek time ≈ ____ of max seek time

53
New cards

Thermal Recalibration

Periodic adjustment of the disk’s actuator control parameters to compensate for temperature-induced changes and maintain accurate head positioning.

54
New cards

interface, blocks

The disk ____ typically presents the disk as a linear array of ____ called logical block addressing (LBA) rather than the older cylinder, head, sector (CHS) method

55
New cards

zoning, track skewing, sparing

The disk controller maps logical locations to physical locations.

  • ____ – puts about 2.7x more blocks on larger (i.e. outside) cylinders.

  • ____ ____ – sector 0 position varies by cylinder to improve sequential access times.

  • ____ – flawed blocks (not properly storing data) are remapped to new locations

56
New cards

logical-to-physical, seek, non-linear, rotational, table

The kernel does not know the ____ mapping. Larger logical number differences generally imply larger ____ times, but the relationship is highly ____ and depends on the cylinder. The kernel also lacks ____ position information, but can empirically build a ____ to estimate access times.

57
New cards

seek, rotational latency, transfer

The time it takes to move data to or from a disk involves:

  1. ____ time

  2. ____ ____

  3. ____ time

58
New cards

Seek Time

The time to move the disk arm to the target cylinder. It depends on the distance (in cylinders) between requests and ranges from 0 up to the maximum seek time.

59
New cards

Rotational Latency

The time for the desired block to rotate under the read/write head. It depends on disk speed and ranges from 0 to one full rotation time.

60
New cards

Transfer Time

The time for the desired block(s) to pass under the read/write head and be transferred. It depends on disk rotational speed and the number of blocks transferred.

61
New cards

Request Service Time

Seek Time + Rotational Latency + Transfer Time

62
New cards

disk controller

The ____ ____ controls the hardware and mediates access.

63
New cards

command queuing, read-ahead, write caching

Possible disk/interface features:

  • ____ ____: allows multiple requests; enables scheduling based on head position and rotation.

  • ____ (disk cache): prefetches sequential blocks to avoid full-rotation delays.

  • ____ ____: delays writes for efficiency, but data may be lost on crash.

64
New cards

placement, ordering, faster, slower, crash

____ and ____ of I/O requests are critical: sequential access is much ____ than random, and long seeks are much ____ than short ones. Ordering must also consider ____ safety (e.g., soft updates).

65
New cards

seek, pending

Order requests to minimize ____ time: this requires multiple ____ requests (I/O concurrency), which the kernel uses to reorder, and is maximized by high-performance applications.

66
New cards

First Come First Served

A disk scheduling algorithm which processes the disk requests in the order they are received.

67
New cards

simple, fair, locality, latency, throughput

First Come First Served (FCFS) advantages: ____ to implement and ____ (requests served in arrival order). Disadvantages: cannot exploit ____ to minimize seek time, leading to higher average ____ and lower ____ compared to other methods.

68
New cards

Shortest Positioning Time First

A disk scheduling algorithm that selects the request requiring the least positioning time (seek time + rotational latency), minimizing access delay.

69
New cards

locality, starvation, mispredict, effective

Shortest Positioning Time First (SPTF) advantages: exploits ____ (nearby requests) to reduce seek time and increase throughput. Disadvantages: can cause ____ of distant requests and may ____ fastest request due to disk speed drift. Improvement (Aged SPTF): increases priority of older requests using ____ seek time (Teff = Tpos - w * Twait).

70
New cards

Elevator Scheduling

A disk scheduling algorithm which sweeps across the disk, servicing requests in order along one direction. Similar to SPTF but only selects requests in the current direction, reversing only when no further requests remain.

71
New cards

locality, bounded waiting, middle, SPTF

Elevator Scheduling (SCAN) advantages: exploits ____ of nearby requests and provides ____ ____ (avoids starvation). Disadvantages: ____ tracks receive better service (served in both directions) and may miss locality that ____ could exploit.

72
New cards

C-SCAN

A disk scheduling algorithm which sweeps in one direction only, then returns to the beginning (circular). Avoids favouring middle tracks, but the return sweep moves across the full disk without servicing requests.

73
New cards

Flash Drives

Storage devices that use electronic circuits (flash memory) instead of spinning disks, with no mechanical parts.

74
New cards

Flash Memory

A type of non-volatile storage that uses electronic circuits to store data, retaining information without power and requiring no mechanical parts.

75
New cards

blocks, pages

Flash memory is divided into ____, which are in turn subdivided into ____.

76
New cards

32KB, 4MB, 2, 4, 8

Flash memory organization: divided into blocks (____–____), each containing pages (____/____/____KB). Pages are the unit of read/write; blocks are the unit of erase.

77
New cards

page, 1, 1, 0, block, 0, 1, voltage

For flash memory, reads and writes occur at the smaller ____ level. Pages are initially set to all ____, and writing changes bits from ____ → ____ at the page level. However, overwriting or deleting requires operations at the larger ____ level. Changing bits from ____ → ____ requires high ____, which can only be applied to an entire block.

78
New cards

reads, erases, RAM, invalid, write, table, garbage

Writing/deleting in flash memory: naive approach ____ the whole block, ____ it (reset to 1s), updates in ____, and writes it back (slow). Instead, SSD controllers mark pages as ____, ____ to a new unused page, and update a translation ____; this requires ____ collection to reclaim invalid pages.

79
New cards

write, wear leveling

SSD limitations: each block supports a limited number of ____ cycles before becoming read-only (≈1,000 for consumer SSDs, ≈1,000,000 for enterprise). SSD controllers use ____ ____ to distribute writes evenly across blocks, balancing wear.

80
New cards

Wear Leveling

A technique used by SSD controllers to distribute writes evenly across memory blocks, ensuring they wear out at a similar rate.

81
New cards

single, multi, triple, quad

Currently there are four types of flash memory that are in use:

  1. ____-level cells have 2 levels, which store 1 bit

  2. ____-level cells have 4 levels, which store 2 bits

  3. ____-level cells have 8 levels, which store 3 bits (typical in consumer products)

  4. ____-level cells have 16 levels, which store 4 bits

As more levels are used, the cost per GB is cheaper, but it is slower to access data, and it wears out sooner.

82
New cards

Files

Persistent, named data objects.

83
New cards

persistent

When you edit a file, the change is not ____ until you save it.

84
New cards

Persistent Storage

Storage where data remains saved over time (e.g., after saving a file) and persists until explicitly deleted, even across system restarts.

85
New cards

Secondary Storage

The first state info we’ve seen that does not disappear at shutdown. It is persistent storage. Therefore, it is where all important state ultimately resides

86
New cards

named data objects, intermediate result

In the expression “c = (a+b)*2”

- a, b and c are ____ ____ ____ but

- (a+b) is not a named object. It is an ____ ____.

87
New cards

bytes

The data in a file consists of a sequence of numbered ____.

88
New cards

capacity, access

An upside to secondary storage is that it has a larger ____ (100 – 1,000x) than main memory. Downside, it’s slower to ____ (microseconds) compared to main memory (nanoseconds).

89
New cards

File Systems

The data structures and algorithms used to store, retrieve, and access files.

90
New cards

logical, virtual, physical

A file system can be separated out into three different layers (although sometimes the first two are combined into one layer):

  1. ____ file system

  2. ____ file system

  3. ____ file system

91
New cards

Logical File System

Layer of file system that is the high-level API which a programmer sees (e.g. fopen, fscanf, fprintf, fclose). It manages file system information, e.g. which files are open for reading and writing, which are read-only.

92
New cards

Virtual File System

Layer of file system which is an abstraction of lower level file systems, presents multiple different underlying file systems (HDD, SDD, DVD, network drive) to the user as one, e.g. the user interface for macOS and Windows.

93
New cards

Physical File System

Layer of file system which represents how files are actually stored on physical media (e.g. track, sector, magnetic orientation).

94
New cards

File Descriptor

An integer handle used by a process to refer to an open file or I/O resource.

95
New cards

open

File system call which returns a file descriptor (or identifier or handle). Other file operations (e.g., read, write, lseek, close) for that process require this file descriptor as a parameter in order to identify this file from all the others.

96
New cards

close

File system call which invalidates a valid file descriptor for a process. The kernel tracks which file descriptors are currently valid for each process.

97
New cards

read

File system call which copies data from a file into a virtual address space.

98
New cards

write

File system call which copies data from a virtual address space into a file.

99
New cards

lseek

File system call which enables non-sequential reading and writing.

100
New cards

fstat

File system call which retrieves (gets) file metadata.

Explore top flashcards

flashcards
Chemistry Polyatomic ion charges
20
Updated 1235d ago
0.0(0)
flashcards
latin verbs
30
Updated 417d ago
0.0(0)
flashcards
Rec Management Mid term
33
Updated 420d ago
0.0(0)
flashcards
Unité 3 : Très chic !
68
Updated 46d ago
0.0(0)
flashcards
(science) DNA unit
72
Updated 1105d ago
0.0(0)
flashcards
Poetry Vocab
20
Updated 1138d ago
0.0(0)
flashcards
Chemistry Polyatomic ion charges
20
Updated 1235d ago
0.0(0)
flashcards
latin verbs
30
Updated 417d ago
0.0(0)
flashcards
Rec Management Mid term
33
Updated 420d ago
0.0(0)
flashcards
Unité 3 : Très chic !
68
Updated 46d ago
0.0(0)
flashcards
(science) DNA unit
72
Updated 1105d ago
0.0(0)
flashcards
Poetry Vocab
20
Updated 1138d ago
0.0(0)