Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Exceptions - Processor And Control Unit, Computer Science and IT Engineering

Exceptions - Processor And Control Unit, Computer Science and IT Engineering - Computer Science Engineering (CSE) PDF Download

Exceptions in Processor and Control Unit

Control is the most challenging aspect of processor design: it is both the hardest part to get right and the hardest part to make fast.

EXCEPTIONS

Control is the most challenging aspect of processor design: it is both the hardest part to  get right and the hardest part to make fast. One of the hardest parts of control is implementing exceptions and interrupts—events other than branches or jumps that change the normal flow of instruction execution. An exception is an unexpected event from within the processor; arithmetic overflow is an example of an exception. An interrupt is an event that also causes an unexpected change in control flow but comes from outside of the processor. Interrupts are used by I/O devices to communicate with the processor.

Many architectures and authors do not distinguish between interrupts and exceptions, often using the older name interrupt to refer to both types of events. MIPS convention uses the term exception to refer to any unexpected change in control flow without distinguishing whether the cause is internal or external; we use the term interrupt only when the event is externally caused.

The Intel IA-32 architecture uses the word interrupt for all these events. Interrupts were initially created to handle unexpected events like arithmetic overflow and to signal requests for service from I/O devices. The same basic mechanism was extended to handle internally generated exceptions as well. Here are some examples showing whether the situation is generated internally by the processor or externally generated:

Type of event

  • I/O device request - External

  • Invoke the operating system from user program - Internal

  • Arithmetic overflow - Internal

  • Using an undefined instruction - Internal

  • Hardware malfunctions - Either

The operating system knows the reason for the exception by the address at which it is initiated. The addresses are separated by 32 bytes or 8 instructions, and the operating system must record the reason for the exception and may perform some limited processing in this sequence. When the exception is not vectored, a single entry point for all exceptions can be used, and the operating system decodes the status register to find the cause.

For the operating system to handle the exception, it must know the reason for the exception, in addition to the instruction that caused it. There are two main methods used to communicate the reason for an exception. The method used in the MIPS architecture is to include a status register (called the Cause register), which holds a field that indicates the reason for the exception. A second method is to use vectored interrupts. In a vectored interrupt, the address to which control is transferred is determined by the cause of the exception.

The document Exceptions - Processor And Control Unit, Computer Science and IT Engineering - Computer Science Engineering (CSE) is a part of Computer Science Engineering (CSE) category.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)

Top Courses for Computer Science Engineering (CSE)

Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

pdf

,

Computer Science and IT Engineering - Computer Science Engineering (CSE)

,

Computer Science and IT Engineering - Computer Science Engineering (CSE)

,

MCQs

,

practice quizzes

,

Previous Year Questions with Solutions

,

Sample Paper

,

video lectures

,

Exceptions - Processor And Control Unit

,

past year papers

,

Exam

,

Important questions

,

Computer Science and IT Engineering - Computer Science Engineering (CSE)

,

Exceptions - Processor And Control Unit

,

shortcuts and tricks

,

Extra Questions

,

ppt

,

mock tests for examination

,

Exceptions - Processor And Control Unit

,

Semester Notes

,

study material

,

Viva Questions

,

Free

,

Summary

,

Objective type Questions

;