1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Direct Memory Access (DMA)
1) CPU programs the DMA Controller to:
transfer data OUT of memory
transfer data INTO memory
2) UNFINISHED
Device-Dependent Software
Device Drivers
Device-Independent Software
You can use the exact same system call regardless of what type of device you’re reading from (shared across devices). Often user-level.
ex) read system call, write system call
Types of Devices
Disk
Terminal
Clock
Network
etc.
Device Driver Components of a Simple Serial Line-Based Terminal Device
At the bottom tier of an OS:
1) Upper Half
2) Shared Buffer
3) Lower-half
Upper Half of a Device
Code that gets called when a request for the device is made
Lower Half of a Device
Code that gets called whenever you get an interrupt from a device (interrupt handler)
Shared Buffer of a Device
Data shared between the upper and lower half of a device. Data shared depends on the device and whether you need read/write access
Simple Terminal I/O Putcher() and Getcher() Problem
Two device drivers producing and receiving code (producer/consumer problem).
wait() in upper half - ok!!
wait() in lower half - bad!! cannot have an interrupt handler in lower half. Solution: if() - won’t block (good), else() ignore new data if full
File Systems
Abstract entity provided by the OS
Named collection of permanent data
File Naming
old: ms dos - 8.3 (8 characters, 3 char extension)
new: much more relaxed, sometimes extension aren’t even necessary
Directories (Folders)
file whose content is a list of files and their respective inodes
Aliases
Allows you to have multiple file names for the same file contents (two pointers to same object sorta)
Contents not removed until all aliases are removed.
ex) dot = current directory alias in linux, dotdot parent directory alias in linux
Soft Link/Symbolic Link/Indirect File/Shortcut
similar to aliases, difference is if one is deleted the contents are now inaccessible
File System Organization
What to store (Original Unix File System):
1) file attributes - stored in inode
2) file contents - stored in disk blocks
3) file name - stored in directory of file
FAT - old but still common
NTFS - windows modern
What is Stored in an inode?
File attributes such as:
file ownership
file type (ex. regular, directory, special(devices))
file access
previous access/modification time
number of links (aliases)
size of file in bytes
pointers to data blocks
Unix+Linux retains 15 data block pointers…
First 12 point directly at disk blocks
Last 3 are single, double, triple indirection