What does the CPU do?
receives interrupt from periphery.
finishes current cycle.
processes interrupt service routine (ISR)
What does the OS do?
fetches new data via ISR (see driver).
wraps data in new message.
puts message in queue.
What does the GUI do?
dispatches message (usually via callback).
identifies receiver(s).
signals event to receivers
-> executes user-provided callback.
What is the Definition of a Callback Function?
A function (object) passed to and registered at a different code section to be executed during this code sections’s flow of control.
Which pattern do callback functions follow?
Callback functions follow the inversion of control design pattern.
What is the Definition for interrupt?
A signal caused by internal/external events that triggers a change in the flow of the execution.
Name three interrupt sources
Devices: Internal controllers (disk, gfx ,…), external peripherals (keyboard, mouse,…)
CPU: Exceptions and traps signaling critical conditions.
Software: Interrupt instructions in code.
What are Interrupt Service Routine (ISR) and what do they do?
Functions that are called when an interrupt is detected (aka interrupt handler).
Handles immediate needs (of the device).
Rather short sections of code.
Returns control to operating system or user program.
For (I/O) devices is part of the driver.
Name two CPU architectures
Process multiple instructions in different stages in parallel.
Number of independent stages varies, usually more than three.
Process multiple instruction in parallel.
Place intermediate results in buffer.
Multiple (out-of-order) execution units (e.g, logic, float, integer)
Wie lautet die Formel, um die CPU Auslastung zu messen?
When should interrupts be ignored?
Processor is performing a critical operation.
e.g. handling another interrupt
Further interrupts are deferred and considered pending interrupts
-> Ausnahme sind hochpriorisierte interrupts wie Hardwareschäden
What difficulties occur when multiple I/O devices are present in an interrupt system?
Assigning priority levels to each device so that highest level priorities will be serviced before lower levels.
Nenne drei Fakten zu Interrupts
Interrupts provide basic low-latency I/O and can occur at any time.
Interrupt handling needs to be supported by software and hardware (chooses appropriate time for interrupting program and transfers control to handler).
Current state of the interrupted program must be saved. Handlers must save and restore register values used by the interrupted program
Nenne ein paar Elemente eines GUI
W indows
I cons
M enus
P ointer
Buttons
Text input fields
Drop-down lists
Nenne die zwei Designprinzipien
Minimize Coupling
Maximize Cohesion
Name the layer interoperability
Lower layers expose functionality via API.
Higher layers explicitly call functions or define callbacks to execute on events.
What is the Model View Controller and what does it do?
A software design pattern to decouple program logic of UIs into three elements to foster code reuse and software quality.
Controller receives and handles input and changes internal model (application state).
Model is updated and informs view of changes.
View updates representation of model.
Traditionally used for desktop GUIs
also popular for web applications.
Name the Layer Responsibilities
App: Functionality & GUI connection
GUI: Elements & coupling logic
OS: Hardware connection & resource management
Last changeda year ago