INTERRUPT HANDLING o The operating system preserves the state of the CPU by storing registers and the program counter. o Determines which type of interrupt has occurred: ·polling vectored interrupt system o Separate segments of code determine what action should be taken for each type of interrupt user process user mode user process executing calls system call return from system call (mode bit=1) kernel trap return mode bit =0 mode bit =1 kernel mode execute system call (mode bit =0)
INTERRUPT HANDLING The operating system preserves the state of the CPU by storing registers and the program counter. Determines which type of interrupt has occurred: polling vectored interrupt system Separate segments of code determine what action should be taken for each type of interrupt
OPERATING SYSTEM STRUCTURE o Multiprogramming needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data)so CPU always has one to execute A subset of total jobs in system is kept in memory One job selected and run via job scheduling When it has to wait (for I/O for example),OS switches to another job
OPERATING SYSTEM STRUCTURE Multiprogramming needed for efficiency Single user cannot keep CPU and I/O devices busy at all times Multiprogramming organizes jobs (code and data) so CPU always has one to execute A subset of total jobs in system is kept in memory One job selected and run via job scheduling When it has to wait (for I/O for example), OS switches to another job