vault backup: 2025-05-05 20:41:16
This commit is contained in:
@ -86,3 +86,40 @@ An alternative mode is to have the device controller send the word to DMA contro
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
### Handling interrupts
|
||||
- Microprogram or hardware checked to see if there was an interrupt pending.
|
||||
- Instruction cycle:
|
||||
- Fethc
|
||||
- Decode
|
||||
- Read operands
|
||||
- Execute
|
||||
- Store
|
||||
- Check for interrupts
|
||||
|
||||
This can be pipelined
|
||||
|
||||
### Precise interrupts
|
||||
1. PC is saved in a known place
|
||||
2. All instructions before the one pointed to by the PC have completed
|
||||
3. No instruction beyond the current one has vfinished
|
||||
4. Execution state is known
|
||||
|
||||
An interrupt that doesn't meet the above requirements is called **imprecise**
|
||||
|
||||

|
||||
|
||||
## Clocks
|
||||

|
||||
|
||||
> [!IMPORTANT]
|
||||
> Watchdog timers **ARE clocks**
|
||||
|
||||
|
||||
|
||||
## Mass Storage
|
||||
Secondary storage for modern computers and shit.
|
||||
|
||||
|
38
Operating Systems/Mass Storage.md
Normal file
38
Operating Systems/Mass Storage.md
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
## Hard disks (HDDs)
|
||||
Spin platters of magnetically-coated material under moving RW heads
|
||||
- Rotate at 60 to 250 times/s
|
||||
- Transfer rate is rate at which data flows between drive and pc
|
||||
- Positioning time (Random access time) to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency)
|
||||
|
||||

|
||||
|
||||
|
||||
### Controller
|
||||
Receives data/ command from the OS, controls I/O operation and sends back results to OS
|
||||

|
||||
|
||||
|
||||
### I/O steps
|
||||
- Move head to track -> Seek Time (S)
|
||||
- Find sector -> Rotational Latency Time (r)
|
||||
- Transfer data to/from controller -> Block Transfer Time (btt)
|
||||
- Error checking and report to OS
|
||||
|
||||
|
||||
### Disk Formatting
|
||||
Each platter must receive a low-level format done by software, i.e. marking the cylinders and tracks, each containing a few sectors, with short gaps in between
|
||||
|
||||
Each sector includes:
|
||||
- Preamble: starts with start of the sector bit pattern, the cylinder and sector numbers
|
||||
- Data: size of the data portion is determined by the formatting program -> 512 bytes usually
|
||||
- ECC: error correction, typically 16 bytes
|
||||
|
||||
|
||||
Numbering the sectors
|
||||
- Position of sector 0 on each track is offset from the previous track when the low-level format is laid down (cylinder skew)
|
||||
|
||||
|
||||

|
||||
|
||||

|
BIN
Operating Systems/assets/Pasted image 20250505195901.png
Normal file
BIN
Operating Systems/assets/Pasted image 20250505195901.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
Operating Systems/assets/Pasted image 20250505200028.png
Normal file
BIN
Operating Systems/assets/Pasted image 20250505200028.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 123 KiB |
BIN
Operating Systems/assets/Pasted image 20250505200548.png
Normal file
BIN
Operating Systems/assets/Pasted image 20250505200548.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
BIN
Operating Systems/assets/Pasted image 20250505201102.png
Normal file
BIN
Operating Systems/assets/Pasted image 20250505201102.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user