W poprzednim dziale rozmawialiśmy o systemie komputerowym i trochę o przerwaniach, now I will write about interrupts related to input and output operations (from English In & Out).
What is going on, when starting such an operation, the processor sets the contents of the registers in the device driver in some way. ( so that the device driver knows what to do).
After the end of the device operation, an interrupt is sent which informs the processor,that the job has ended.
We distinguish between asynchronous and synchronous Input and Output operations.
synchronous to w wielkim skrócie przesyłanie danych następnie zakończenie przesyłu i powrót do procesu użytkownika, this approach certainly excludes the simultaneous operation of several devices.
asynchronous – ten sposób nie czeka na zakończenie operacji wejścia i wyjścia czyli mogą być kontynuowane inne działania systemu jednocześnie.
We have something like a device status table in the operating system, it contains information about individual devices. np. whether the device is free. Now, the important thing is that different processes / programs can request one device at the same time.
Then there is no "way out", you have to wait in line.
let's summarize:
From the point of view of the operating system After generating the interrupt, by the device, you have to check, by which device was generated, when we know it, we retrieve information about the state of the device from the device status table, and update that an interrupt has occurred. If something is waiting for a device that is currently free, the operating system gives it control, otherwise we go back to executing the user program or to the wait loop in case the operating system has nothing to do.