From 58d82b6d6a98e4364589f018f92bb24468cf38e3 Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Thu, 22 Sep 2022 12:09:01 +1200 Subject: [PATCH] vault backup: 2022-09-22 12:09:01 --- content/notes/15-file-systems.md | 3 ++ content/notes/16-device-drivers.md | 47 ++++++++++++++++++++++++++++++ content/notes/comp-210.md | 3 +- content/notes/cosc-203.md | 1 + content/notes/cosc-204.md | 3 +- 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 content/notes/16-device-drivers.md diff --git a/content/notes/15-file-systems.md b/content/notes/15-file-systems.md index a131577f5..c968441fe 100644 --- a/content/notes/15-file-systems.md +++ b/content/notes/15-file-systems.md @@ -4,6 +4,9 @@ aliases: tags: - cosc204 - lecture +sr-due: 2022-09-25 +sr-interval: 3 +sr-ease: 250 --- # what is a file (LINUX) diff --git a/content/notes/16-device-drivers.md b/content/notes/16-device-drivers.md new file mode 100644 index 000000000..3282ed8e1 --- /dev/null +++ b/content/notes/16-device-drivers.md @@ -0,0 +1,47 @@ +--- +title: "16-device-drivers" +aliases: +tags: +- lecture +- cosc204 +--- + +# Device controller and driver +driver Defn: a special kernel module that contrls the operations of a device with the device specific information +controller Defn: a hardware unit on a device that can know and control a devices status or behaviour, which communicates with the CPU via a driver + +![device drivers and controllers diagram|300](https://i.imgur.com/m0nxDqa.png) + +# Types of IO devices +- character stream vs block +- swqeuential vs random access +- synchronous vs async +- sharable or dedicated + +OS provides a consistent interface for them in the `/dev` folder (unix systems). e.g., ramdisk device is name `/dev/memdrv`. each device has a file under `/dev` that can be handled with file operations read()/write() + +## block devices +commands (sent from device driver to device controller) +- read block +- write block +- seek block (for random access block devices) + +the sequence of read/write requests can (should) be optimized + +## character devices +- commands + - get char + - put char + +also support buffering (accepting keyboard input line by line) and editing of buffers (e.g., spcial treatement of backspace character) + +# IO models + +IO system calls use different IO models +- blocking - when a proccess needs IO input it waits to recieve it before c +- non blocking +- async + +# IO scheduling and buffering + +# UI for IO devices diff --git a/content/notes/comp-210.md b/content/notes/comp-210.md index 247d1d785..83bbc58c5 100644 --- a/content/notes/comp-210.md +++ b/content/notes/comp-210.md @@ -36,4 +36,5 @@ No final exam - [12-pen-testing](notes/12-pen-testing.md) - [13-pen-testing-2](notes/13-pen-testing-2.md) - [15-policies-standards-practices](notes/15-policies-standards-practices.md) -- [16-cloud-security](notes/16-cloud-security.md) \ No newline at end of file +- [16-cloud-security](notes/16-cloud-security.md) +- [17-ML-in-IA-1](notes/17-ML-in-IA-1.md) \ No newline at end of file diff --git a/content/notes/cosc-203.md b/content/notes/cosc-203.md index c38577ee6..5ed380b72 100644 --- a/content/notes/cosc-203.md +++ b/content/notes/cosc-203.md @@ -36,6 +36,7 @@ tags: - [10-routes-controllers](notes/10-routes-controllers.md) - [11-view-templates](notes/11-view-templates.md) - [12-ethics-and-computing](notes/12-ethics-and-computing.md) +- [13-databases-1](notes/13-databases-1.md) # Archive diff --git a/content/notes/cosc-204.md b/content/notes/cosc-204.md index 09a79543a..b37fd2447 100644 --- a/content/notes/cosc-204.md +++ b/content/notes/cosc-204.md @@ -43,7 +43,8 @@ tags: - [12-pointers-to-routines](notes/12-pointers-to-routines.md) - [13-OS-intro](notes/13-OS-intro.md) - [14-processes-and-system-calls](notes/14-processes-and-system-calls.md) - +- [15-file-systems](notes/15-file-systems.md) +- [16-device-drivers](notes/16-device-drivers.md) # Archive # Info