Podcast
Questions and Answers
What is the primary function of a bootstrap program in an operating system?
What is the primary function of a bootstrap program in an operating system?
To initialize all aspects of the system and load the operating system kernel
Where is the bootstrap program typically stored?
Where is the bootstrap program typically stored?
ROM or EPROM, also known as firmware
What is the role of the bus in the system structure?
What is the role of the bus in the system structure?
To connect CPUs, device controllers, and memory
What is the purpose of a device controller in a computer system?
What is the purpose of a device controller in a computer system?
Signup and view all the answers
What is the function of a local buffer in a device controller?
What is the function of a local buffer in a device controller?
Signup and view all the answers
How does the CPU interact with device controllers?
How does the CPU interact with device controllers?
Signup and view all the answers
What is the primary responsibility of the OS kernel in the system structure?
What is the primary responsibility of the OS kernel in the system structure?
Signup and view all the answers
What is the significance of concurrent execution in I/O devices and the CPU?
What is the significance of concurrent execution in I/O devices and the CPU?
Signup and view all the answers
What is the role of interrupts in the system structure?
What is the role of interrupts in the system structure?
Signup and view all the answers
What is the relationship between the BIOS and the bootstrap program?
What is the relationship between the BIOS and the bootstrap program?
Signup and view all the answers
Study Notes
Interrupt Handling
- Interrupts can be implemented through an interrupt vector, which is a reserved part of memory that tracks which interrupts need to be handled
- For each interrupt, the OS executes the appropriate ‘Interrupt Service Routine’ to handle the interrupt
- The address of the interrupted instruction is saved so original processing can be resumed after completion of the interrupt
- Software programs can generate interrupts through system calls, which is called a trap
Interrupt Handling in Device Drivers
- Normal cycle of interrupt handling for devices:
- Device sends interrupt
- CPU selects appropriate interrupt handler
- Interrupt handler processes interrupt
- Two important tasks to be done:
- Data to be transferred to/from device
- Waking up processes which wait for data transfer to be finished
- Interrupt handler clears interrupt bit of device
- Interrupt processing time must be as short as possible
- Data transfer is fast, rest of processing is slow
- Separate interrupt processing in two halves:
- Top Half: called directly by interrupt handler, transfers data between device and kernel buffer, and schedules software interrupt
- Bottom Half: still runs in interrupt context, does rest of processing (e.g. working through protocol stack, and waking up processes)
Bootstrapping of the OS
- Small bootstrap program is loaded at power-up or reboot
- Typically stored in ROM or EPROM, known as firmware (e.g. BIOS)
- Initializes all aspects of the system (e.g. detects connected devices, checks memory for errors, etc.)
- Loads operating system kernel and starts its execution
Sharing among Resources
- Device controllers are hardware within laptop/computer needed to connect to external resources
- Bus (the ‘wire’) connects CPUs, device controller, and memory
- OS Kernel runs within the CPU and manages devices through device controllers
- Each device controller (e.g. controller chip) is in charge of a particular device type
- Each device controller has a local buffer (i.e. memory store for general data and/or control registers)
- CPU moves data from/to main memory to/from controller buffers
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge of interrupts in operating systems, including implementation, interrupt vectors and system structure. Learn about the role of interrupts in CPU-device communication and more.