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

past year papers

,

study material

,

Exceptions - Processor And Control Unit

,

Previous Year Questions with Solutions

,

Exceptions - Processor And Control Unit

,

shortcuts and tricks

,

Important questions

,

Exam

,

Objective type Questions

,

practice quizzes

,

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

,

video lectures

,

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

,

Sample Paper

,

Summary

,

MCQs

,

Free

,

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

,

pdf

,

Exceptions - Processor And Control Unit

,

Extra Questions

,

Semester Notes

,

mock tests for examination

,

ppt

,

Viva Questions

;