Device Drivers Flashcards

1
Q

What is the key purpose of device drivers

A

To provide uniform access to physical devices for all devices of a given class. I.e. all keyboards can be interfaced the same

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

As well as read write requests, what is the role of device drivers

A

Device drivers must:
- Initialize the device
- Manage the power supply of the device
- Protect the device from harmful commands
- Deal with availability - i.e. is the device hot-pluggable

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

Where do device drivers run

A

In the kernel space, as they need to access I/O registers and need privileged access to do this

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

Who, most often, makes device drivers

A

The device manufacturer

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

Device drives provide an abstraction of physical devices to simplify programming and allow reuse of code, what can be a drawback of this

A

This abstraction can get in the way of optimization as physical devices may differ from the abstract model assumed by the OS

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

What would be the first step to writing a driver

A

Look at the datasheet of the device and learn what commands are available, reading the sample code at the same time

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