Presentation2

Presentation2 - Operating Systems Structure and Design...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Operating Systems Structure and Design Computer system structures computer system operation I/O memory hardware protection networking
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
virtually all modern computers utilize the von Neumann architecture 1. CPU (Central Processing Unit): perform calculations, fetch & execute instructions 2. Memory: store data and program instructions 3. I/O devices: allow for communication with users and other computers Computer system operation to allow for concurrent execution with the CPU, each I/O device has its own controller each device controller has a local buffer I/O is from the device to local buffer of controller device controller informs CPU that it is done by causing an interrupt CPU moves data between memory and the local More on Main Memory and CPU ?
Background image of page 2
Two ways for I/O devices to communicate with the CP Polling : the I/O devices behaves passively- The alternate to a system with interrupts is to use Polling. A system where we must look at each device periodically to see if our services are required. Interrupt :- the I/O devices behaves actively- Peripherals in a computer system can request the attention of the processor. The event that makes a microprocessor stop executing one routing to perform some other routing to service a request is called an Interrupt.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
operating systems are interrupt-driven 1. an interrupt is a request for service from the CPU 2. can be generated by hardware via the system bus (e.g., segmentation fault) 3. can be generated by software (e.g., system call for I/O, trap for division by zero) For example when you press a keyboard button, a hardware interrupt is generated, which the operating system handles as a key press (and translates keyboard codes into ASCII codes, etc.) The resulting key press is then sent to some user program as input. Interrupts, depending on the context, are sometimes referred to as system calls , and if they're generated by an error event (divide by zero, etc.) Interrupts
Background image of page 4
Interrupt Implementation most operating systems have an interrupt table (or interrupt vector as some call it), where entries in the table represent addresses of interrupt routines. Now a days, it is the job of the operating system to manage this table How Interrupts Work they interrupt a currently executing process , handle whatever they're supposed to handle, and return control back to the previously executing process
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
When an interrupt is received, the CPU must 1. The most common approach: whenever the CPU gets an interrupt, 2. it stores the address of the currently executing code onto the stack, and jumps to the interrupt code. 3. After the interrupt is finished, the operating system pops the stack (where the address of the interrupted code was stored), and jumps back to there. 4. The code doesn't know it was interrupted.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 32

Presentation2 - Operating Systems Structure and Design...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online