P3L5 - I/O Management Flashcards

1
Q

T/F: The execution of applications doesn’t rely ONLY On CPU and Memory

A

True! It relies on other hardware components as well

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

List some examples of I/O devices

A
Keyboards
Microphones
Displays
Speakers
Mice
NIC Cards (Network Interface)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

T/F: The device space is extremely diverse?

A

True

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

List the types of registers traditionally found within a device

A
  1. Command Registers
  2. Data Registers
  3. Status Registers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of command registers within a device?

A

CPU uses these to control the device

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

What is the purpose of the data registers in a device?

A

These are used by the CPU to transfer data in and out of the device

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

What is the purpose of the status registers in a device?

A

These are used by the CPU to understand what is happening on the device

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

_____ is basically the device’s CPU

A

microcontroller

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

How do devices interface with the rest of a system?

A

Via a controller that is typically integrated as part of the device packaging that is used to connect the device with the rest of the CPU complex via some CPU/device interconnect

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

What does PCI stand for

A

Peripheral Component Interconnect

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

What is the purpose of PCI?

A

To connect all controllers of devices to the rest of the system

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

T/F: The PCI bus is the only possible interconnect that can be present in a system

A

False!

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

Operating systems support devices via ___ ___

A

device drivers

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

Device drivers are ___ ___ software components

A

device specific

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

Who is responsible for making drivers available for all the operating systems where a device will be used?

A

The device manufacturer!

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

List the high level groups of devices

A
  1. Block Devices
  2. Character Devices
  3. Network Devices
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What types of devices are encompassed within block devices?

A

Disks – which operate at the granularity of blocks of data that are delivered to and from the device via the CPU

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

What types of devices are encompassed in character devices?

A

Keyboards – devices which work with a serial sequence of characters and support a get/put character interface

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

What types of devices are encompassed in network devices?

A

Devices which work with more of a stream of data chunks as opposed to blocks over network

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

On Unix-like systems, where do all devices appear as files?

A

/dev directory

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

Device registers appear to the CPU as ____ ____

A

Memory Locations

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

What is responsible for routing accesses to devices

A

The PCI controller

23
Q

What is the portion of physical memory on the system dedicated for device interactions controlled by ?

A

Base Address Registers (BAR)

24
Q

What is it called when a portion of physical memory on the system is dedicated for device interactions?

A

memory-mapped I/O

25
What is it called when CPU can access device via special instructions
I/O Port Model
26
What are the two routes that can be taken on the path from the device to the CPU
1. Devices can generate interrupts to the CPU | 2. CPUs can poll devices by reading their status registers to determine if they have some response/data fro the CPU
27
What is the downside of using interrupts when communicating between device/CPU
Interrupt handlers and the associated overhead
28
What is the pro of using interrupts when communicating between device/CPU
Interrupts can be triggered by the device as soon as the device has information for the CPU
29
What is the downside of using polling when communicating between device/CPU
Delay can be introduced based on when/how frequently the CPU polls
30
With just basic support from an interconnect like PCI, CPU can request operation from an I/O device using ______
programmed I/O (PIO)
31
When using PIO how does the CPU issue instructions to a device?
By writing into the command registers of the device
32
Name an alternative to PIO based communication
Direct Memory Access (DMA)
33
Describe how Direct Memory Access (DMA) works
CPU still writes commands to the command register but the data movement is controlled by configuring the DMA controller to know which data needs to be moved from memory to the device, and vice-versa
34
T/F: Memory access takes more cycles than DMA configuration
False! DMA configuration takes many more cycles
35
List the steps of typical device access from a user process
1. Use process makes a system call specifying appropriate operation 2. kernel may do some preprocessing of the data/form data 3. OS will invoke the appropriate device driver for the device 4. Device will then perform action Result is returned in the reverse order of events
36
T/F: It is not necessary to go through the the kernel to get to a device?
True! Known as Operating System Bypass
37
What part is the OS still involved in with operating system bypass?
Making device registers available to user process on create
38
What do you need to leverage OS bypass?
User-level drivers (a library)
39
Describe the difference between sync and async access
For synchronous operations the calling thread will block | With asynchronous operations the thread is allowed to continue as soon as it issues the request
40
What is the purpose fo the VFS layer?
Allows the OS to hide all details regarding the underlying filesystem(s) from the higher level consumers
41
The _____ abstraction represents the elements on which the VFS operates
File
42
For each file the VFS maintains a persistent data structure called an _____
inode
43
What is the purpose of an inode
To maintain a list of all data blocks corresponding to the file as well as other important information for that file
44
To help with certain operations on directories, linux maintains a data structure called a ____
dentry (directory entry)
45
The _____ abstraction provides information about how a particular filesystem is laid out on some storage device
superblock
46
T/F: The virtual file system data structures are hardware entities
False, they are software
47
What was the default filesystem in Linux until it was replaced?
the ext2 filesystem
48
What is the benefit of using inodes?
Easy to perform both sequential and random accesses to the file
49
What is the downside of using inodes?
There is a limit on the file size for files that can be indexed using inodes
50
What was one way to solve the issue of file size limits in inodes?
Use of indirect pointers!
51
What is the benefit of using indirect pointers
Allows us to use relatively small inodes while being able to address larger and larger files
52
What is the downside of using indirect pointers?
File access is slowed down
53
List some techniques that filesystems employ to minimize the accesses to disk and improve the file access overheads?
1. Buffer Caches 2. I/O scheduling 3. Prefetching 4. Journaling