Commit f045e03

mo khan <mo@mokhan.ca>
2021-05-23 01:45:59
start notes on I/O
1 parent 444d7c4
Changed files (1)
doc/13.md
@@ -0,0 +1,69 @@
+# I/O Systems
+
+computer jobs:
+
+* I/O
+* processing
+
+
+I/O devices vary widely in their function and speed (e.g. mouse, hard disk).
+
+I/O subsystem of the kernel, separates the rest of the kernel from the complexities of managing I/O devices.
+
+Device drivers present a uniform device-access interface to the I/O subsystem, much as system calls provide a standard
+interface between the application and the operating system.
+
+
+## I/O Hardware
+
+Devices:
+
+* disks, tapes
+* network connections, bluetooth
+* screen, keyboard, mouse, audio in and out.
+
+A device communicates with a computer system by sending signals over a cable or even through the air.
+
+The device communicates with the machine via a connection point, or port.
+If devices share a common set of wires the connection is called a bus.
+A daisy chain is when device A has a cable that plugs into device B and B connects to device C and device C plugs into a port on the computer.
+
+
+PCI bus (the common PC system bus) connects the processor-memory subsystem to fast devices.
+An expansion bus connects slow devices like a keyboard and serial and USB ports.
+Disks can connect to a Small Computer System Interface (SCSI) bus that plugs into a SCSI controller.
+PCI Express (PCIe) bus has a throughput of up to 16 GB per second.
+HyperTransport has a throughput of 25 GB per second.
+
+A controller is a collection of electronics that can operate a port, a bus, or a device.
+
+```plaintext
+                                                        SCSI Bus
+                                                             ||---(disk)
+                                                             ||
+                                                             ||---(disk)
+  -----------      ------------                              ||
+  | monitor |      | processor |                             ||---(disk)
+  -----------      ------------       ---------              ||
+       |                |-------------| cache |              ||---(disk)
+  --------------   -----------------  ---------              ||
+  | graphics   |   | bridge/memory |  ----------  -------------------
+  | controller |   | controller    |--| memory |  | SCSI controller |
+  -------------    -----------------  ----------  -------------------
+       |                |                                     |
+ --------------------------------------------------------------------
+()                      PCI bus                                      )
+ --------------------------------------------------------------------
+                |                          |
+     -----------------------         -----------------    ------------
+     | IDE disk controller |         | expansion bus |    | keyboard |
+     -----------------------         |   interface   |    ------------
+        |           |                -----------------        |
+      (disk)      (disk)                   |                  |
+        |           |                ()===========================)
+      (disk)      (disk)                      |           |
+                                       ------------   ----------
+                                       | parallel |   | serial |
+                                       | port     |   | port   |
+                                       ------------   ----------
+```