(Usage hints for this presentation)
IT Systems, Summer Term 2024
Dr. Jens Lechtenbörger (License Information)
von Neumann Architecture
Figure by Kapooht under CC BY-SA 3.0; converted from Wikimedia Commons
|
Hack |
Modern Computer (e.g., PC, smartphone) |
---|---|---|
Memory |
• RAM for data, ROM for instructions • Physical RAM addresses • No secondary memory |
• RAM for data and instructions • Physical and virtual addresses • Memory hierarchy (disks) |
CPU |
• Single core • Single mode of execution • Neither cache nor MMU |
• Multi-core • Multiple protection domains • Caches and MMU |
I/O |
• No interrupts • Polling for I/O (recall keyboard) |
• Interrupts, DMA • Different options for I/O |
OS |
• Language library • Single thread, no multitasking • No virtual memory |
• Real OSs with system calls • Multitasking, scheduling • Virtual memory |
Additionally
Overhead for context switches, cache pollution
Special instructions and modes
Interrupts: Later slides
I/O devices are components that interact with the OS
Alternative types of I/O
I/O happens synchronously while OS polls for result
Interrupt: Signal to CPU
If I/O devices generate interrupts, CPU does not need to wait for I/O completion
Notice: Latency (delay) between system call and processing of its return value
In contrast to polling, with interrupts something useful can happen on the CPU during this period
Between key press (interrupt) and return of key’s value into thread
Software interrupt
Afterwards, state is restored, previous execution continued.
int 0x80
(generic), SYSCALL
(AMD), SYSENTER
(Intel)int 0x80
int 0x80
leads into kernel mode0x80
points to handler function
system_call
, since 2015 entry_INT80_32
arch/x86/kernel/traps.c
)This task is available for self-study in Learnweb.
Source files are available on GitLab (check out embedded submodules) under free licenses. Icons of custom controls are by @fontawesome, released under CC BY 4.0.
Except where otherwise noted, the work “Interrupts and I/O I”, © 2017-2024 Jens Lechtenbörger, is published under the Creative Commons license CC BY-SA 4.0.