IT代考 COMP 3430 Operating Systems

COMP 3430 Operating Systems
I/O devices

March 7th, 2022

Copyright By PowCoder代写 加微信 powcoder

By the end of today’s lecture, you should be able to:
▶ Describe how an operating system communicates with hardware devices.
▶ Explain how an operating system provides an abstraction around hardware devices.
The Rocket Book (Public Domain)

I/O devices
What kinds of I/O devices are currently attached to your system? State whether this device is “internal” or “external”.
A very weird I/O device. (© CC BY-SA 4.0)

▶ Operating systems abstract devices.
▶ One way (on Linux): As files. ▶ The /dev file system.
Antikythera mechanism (CC BY 2.5)

Organizing devices
Major categorizations of devices (Linux/UNIX) ▶ Block devices
▶ Character devices
▶ Pseudo devices
Groups of glyphs. (Public Domain)

Block devices
▶ Entries in device tree backed by a real device. ▶ Usually a disk.
▶ Reading and writing by blocks (more later). ▶ Atomic units > 1 byte.
▶ Random access (i.e., you can seek). ▶ Examples: /dev/sda, dev/nvme0n1

Character devices
▶ Entries in device tree backed by a real device. ▶ Reading and writing by characters.
▶ Usually 1 byte at a time.
▶ Sequential streaming access (i.e., you can’t seek). ▶ Examples: /dev/snd/*, /dev/input/mouse0

Pseudo devices
▶ Special character devices. ▶ “Fake” devices.
▶ Entries in the device tree, no real device behind them. ▶ Examples: /dev/zero, /dev/null, /dev/random

Reading and writing
▶ Devices that are read/write. ▶ Devices that are read-only. ▶ Devices that are write-only.

Organizing devices
Group the devices we listed into:
▶ Pseudo, character, block
▶ Read/write, read-only, write-only.
Groups of glyphs. (Public Domain)

▶ Linux has several classes of devices.
▶ Operating systems hide device details from software.
▶ Abstraction over devices.
▶ Device drivers!

Test questions?

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com