Hire Our Expert Programmer & Technical Writer To Do Your Capstone Project
+1 vote
in Compilers & Operating Systems by

1.       Clearly distinguish between interrupt and trap. Give examples to illustrate your answer.

2.       Describe time-sharing systems and give an example to illustrate your answer.

3.       Discuss the 4 categories in which work concerning information security and protection relating to Operating Systems are grouped.

 

<!--[if gte mso 9]> <![endif]--><!--[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE <![endif]--><!--[if gte mso 9]> <![endif]--><!--[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} <![endif]-->

1 Answer

+1 vote
by (user.guest)
selected by (user.guest)
 
Best answer

Differences between interrupt and trap

A trap is a signal raised by a user program instructing the operating system to perform some functionality immediately. In contrast, the interrupt is a signal to the CPU emitted by hardware that indicates an event that requires immediate attention.

A trap also triggers OS functionality. It gives control to the trap handler. In contrast, an interrupt triggers the CPU to perform the interrupt handler routine.

A trap is synchronous and usually occurs after the execution of the instruction. In contrast, an interrupt is asynchronous and may occur at any time.

A trap is generated by a user program instruction. In contrast, the hardware devices generate an interrupt.

A trap is also known as a software interrupt, while, an interrupt is known as a hardware interrupt.

An example of a Trap. 

Take for example you are running a program, that needs to print something on the screen, this program will send a signal or request for data to be displayed on the screen, this is an example of a trap, bearing in mind that is it user program based.


Related questions

+1 vote
1 answer
+2 votes
1 answer
Welcome to CPENTalk.com

Disclaimer: Every user is solely responsible for anything that he/she posts or uploads on CPENTalk.
...