OS topic 13 – Input/output Flashcards

1
Q

What is a device driver?

A device driver is a piece of s_________ that allows your computer’s operating system to communicate and work with hardware devices.

It serves as a t__________ between the __________________ and the specific hardware, helping them understand each other.

A

software
translator
operating system

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

Device Drivers

When you connect a new hardware device to your computer, like a printer or a graphics card, the device driver enables the operating system to s_____ and r_______ data to and from that device.

A

send and receive

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

Device Drivers

True or false
Without device drivers, your computer wouldn’t be able to use or control the connected hardware properly.

A

True

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

Device Drivers - Problem

Device drivers run in k_______ mode with access to c_______ operating system data; if a driver has b______, then it may well crash the entire system.

A

kernel mode
critical OS data
bugs

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

Device Drivers - Problem

Why might a commercial OS may restrict installation to drivers that have been appropriately signed after passing thorough testing.

A

To avoid damage to their reputation.
As mentioned earlier, a buggy driver can crash the entire system!!!

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

Bus interfaces

What is a bus?
A bus is an i___________ to which several devices can be connected at the same time.

A

interface

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

Bus interfaces

What are ‘data transfer protocols’

Data transfer protocols are sets of rules and conventions that define how data is e___________ between devices or systems over a n__________.

A

exchanged
network

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

Bus interfaces

What data transfer protocols are usually used by buses?

There are many, but one example is
PCI (P___________ C__________ I_____________):

PCI is a standard bus protocol used for communication between internal components in a computer, such as graphics cards, network cards, and storage devices. It supports high-speed data transfer.

A

Peripheral Component Interconnect

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

Bus Interfaces

A bus is an interface to which several devices can be connected at the same time; this requires s_______________ data transfer protocols and a way of identifying different devices.

A

standardised

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

Bus Interfaces

The data transfer protocols are implemented through a s_____ of software routines.

A

stack

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

Bus Interfaces

What is meant by ‘a stack of software routines’?

A “stack of software routines” typically refers to a collection or s________ of software routines, where each routine represents a specific set of instructions or operations that perform a particular task.

The term “stack” is often used metaphorically to describe the o__________ or arrangement of these routines in a h___________ manner.

A

sequence
organisational
hierarchical manner

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

Bus Interfaces

Bus-connected devices need to i_____________ themselves so that they are treated appropriately.
USB, for example, allows each peripheral to describe itself to the host computer when first plugged in.

A

identify themselves

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

Bus Interfaces

True or false

An example of how the device describes itself could be: Audio, video, etc.

A

True

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

Bus Interfaces

There is also a configuration phase where for example the host computer and peripheral device negotiate d_____ rates and, if necessary, a specialised driver is located and loaded into the k______.

A

data rates
kernel

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

Bus Interfaces

True or false?
A bus such as USB, as well being used to connect devices, must also be thought of as an I/O device in its own right.

A

True

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

Bus Interfaces - The major and minor numbering system

The major and minor numbering system is a convention used in operating systems (OS) to identify and manage different d_______ or resources, particularly in the context of device drivers.

A

devices

17
Q

Bus Interfaces - The major and minor numbering system

Devices receive a major and a minor device number when the system b________:

A

Devices receive a major and a minor device number when the system boots:

18
Q

Bus Interfaces - The major and minor numbering system

Each different type of device gets a new major number, but two devices of the s______ type share a major number and have different minor numbers.

A

same type

19
Q

One major classification used by most OSs is into character and block devices.

What classification would a keyboard be?
What classification would a disk drive be?

A

Keyboards generate a stream of characters, as do mice, and these can be handled one byte (or character) at a time.

Other devices, for example secondary storage such as disk drives, always transfer data in large fixed-size blocks.

20
Q

The hardware interface

I/O registers provide the lowest-level interface to hardware, and typically have three different roles:

  1. d_______ register:
  2. s__________ register:
  3. c__________ register:
A

data
status
control

21
Q

The hardware interface - I/O registers

The data register
It holds the data that is to be t___________

A

transferred

22
Q

The hardware interface - I/O registers

The status register
Indicate for example whether more data is w___________ to be collected or whether the I/O device is b_______ and cannot yet accept more data.

A

waiting
busy

23
Q

The hardware interface - I/O registers

The controls register

Set o________, for example whether data is to be read from or written to the device.

A

options

24
Q

Data Transfers - Polled I/O

There are _________ techniques used to control the transfer of data between m______ memory and an I/O device

A

three
main memory

25
Q

Data Transfers - Polled I/O

Poll the device: In this context, “polling” means that the processor regularly c_______ or q______ the I/O device to see if there is any new information or if a specific event has occurred.

A

checks or queries

26
Q

Data Transfers - Polled I/O

One technique used to control the transfer of data between main memory and an I/O device is for the processor to p____ the device until an I/O event occurs.

A

poll

27
Q

Data Transfers - Polled I/O

Polling is a useful technique in complex systems.

A

False

Polling is a useful technique in simple embedded systems

28
Q

Data Transfers - Polled I/O

There are problems using it in a personal computer. The main problem is that it uses busy waiting: the processor is t____ up until I/O is complete.

True or false?
In a multitasking system it would be better for a context switch to occur so that another process can be executed while the I/O is in progress.

A further problem is that it is difficult to deal with multiple I/O devices: the polling l____ would have to check every possible device and be executed frequently so that no events are missed.

A

tied up

True
loop

29
Q

Data Transfers - Interrupt-driven I/O

Interrupt-driven I/O is much better suited to the needs of a personal computer than polling, because there is no b_____ w______:
the processor is never tied up in l_____ while waiting for slow I/O devices, so overall p__________ of a system can be much better.

A

busy waiting
loops
performance

30
Q

Data Transfers - Interrupt-driven I/O

True or false?
With interrupt-driven I/O, the OS hardware signals an interrupt whenever an I/O operation is completed;
that is whenever an input arrives, or an output operation finishes and the device is ready for another operation.

A

False

The I/O hardware signals an interrupt.

31
Q

Data Transfers - Interrupt-driven I/O

Interrupt-driven I/O is much better suited to the needs of a personal computer than polling because There is no busy waiting:

A
32
Q

Data Transfers - Interrupt-driven I/O

True or false?

There is an overhead in handling each interrupt.

A

True

33
Q

Data Transfers - Direct memory access I/O

A direct memory access (DMA) controller is a device that can transfer data directly between _______ devices and main memory without involving the p___________.

A

I/O
processor

34
Q

Data Transfers - Direct memory access I/O

The DMA controller itself is a device with its own I/O r_________ that the operating system can use to specify what transfer is to be made.

A

registers

35
Q
A