Operating System Concept

999 WordsMay 21, 20124 Pages
Operating System | Assignment #1 | | Information System | 2012-03-29 | | 1. What is the purpose of interrupts? What are the differences between a trap and an interrupt? Can traps be generated intentionally by a user program? If so, for what purpose? (Chapter 1) Interrupt is that causes a computer processor to temporarily stop executing its current program and execute another program instead, finally returning control to the original program. So it prevent that more important task goes back because of less important task. The main difference between a trap and an interrupt is where they are generated. An interrupt is a hardware-generated. And it can be used to signal the completion of an I/O to obviate the need for device…show more content…
(Ex, Memory, Processor, disk space, etc.) Last one is the level of human resources needed to support the OS. 6. What are the benefits and detriments of each of the following? Consider both the systems and the programmers’ levels. (Chapter 3) a) Synchronous and asynchronous communication b) Automatic and explicit buffering a) Synchronous vs asynchronous can be called to blocking vs non-blocking communication. The benefit of synchronous communication is the simplicity and accuracy. However blocking may not be necessary and waste time. Asynchronous communication allows messages to be delivered without waiting. However this communication has less reliability than blocking one. b) Automatic buffering provides a queue with in definite length; thus ensuring the sender will never have to block while waiting to copy a message. There are no specifications how automatic buffering will be provided; one scheme may reserve sufficiently large memory where much of the memory is wasted. Explicit buffering specifies how large the buffer is. In this situation, the sender may be blocked while waiting for available space in the queue. However, it is less likely memory will be wasted with explicit buffering. 7. Describe the differences among short-term, medium-term, and long- term scheduling. (Chapter 3) 1) Short-term scheduling: It selects from jobs in memory, those jobs which are ready to execute, and allocates the CPU to one of them. CPU selects
Open Document