in CO and Architecture retagged by
134 views
0 votes
0 votes
Both internal and software caused by executing the program instructions .  So both are same ?
in CO and Architecture retagged by
by
134 views

1 Answer

1 vote
1 vote

Generally, An external or " hardware interrupt" is caused by an external hardware module. Internal interrupts, or "software interrupts," are triggered by a software instruction and operate similarly to a jump or branch instruction. 

Ref. – Interrupts

A Software interrupt is an interrupt generated by any computer's internal system.
Based on the above Wikipedia article, we should not assume that internal and software interrupts are the same.

A software interrupt is a type of interrupt caused either by a special instruction in the instruction set or by an exceptional condition in the processor itself. Typically, internal interrupts resist user changes and happen "naturally" or "automatically" as a processor works through program instructions rather than being caused by external events or network connections.

Now, refer to → Answer  given in response to a question asked in Uttarakhand Asst. Professor Exam and we can notice specific differences between the terms “Internal interrupt” & “Software interrupt” in their application and how they are referred to.

The term “internal interrupt” seems to be used chiefly to refer to what are also known as exceptions: interrupts that occur in response to a processing error, such as referencing an invalid address in memory, division by zero, or similar error condition.

Ref.- Difference between Internal & software interrupt.

Software interrupts- A user program requests operating system services by executing the SWI instruction. This is an exception that causes entry into the Supervisor mode. A parameter field in the instruction specifies the requested service and is accessible from the Supervisor routines. (Hamacher-6th ed- pg 643)

So we can safely say that both internal and software caused by executing the program instructions are not the same.

 

2 Comments

Got it . Here is an another example,  we can say like that  suppose there is any external interrupt and that  process want operating system to do some work .  in that time software interrupt come into the picture and execute that set of instructions which make os to handle that external interrupt .

Is it right ? Can we say like that in a simple way ?
0
0

@its_vv, I have not seen or read as if “some set of instructions executed by s/w interrupt are helping os to handle the external interrupt,” so, at this point, it's hard for me to say “right/wrong.” Here are Some issues w.r.t. your example-

suppose there is any external interrupt and that  process want operating system to do some work .  in that time software interrupt come into the picture in that time software interrupt come into the picture 

1st thing considering both are coming at the same time(as you mentioned the phrase “in that time”), software interrupt will be prioritized over external interrupt.

2nd thing considering external interrupt has arrived first and then after that software interrupts arises so because software interrupt has high priority wrt to the external interrupt then CPU will suspend the current process and transfer the control to high priority interrupt(s/w interrupt in the assumed example).

And as we know, software interrupt is triggered by software(program instructions). Therefore, it is considered one of the ways to communicate with the kernel or to initiate system calls, especially during error or exception handling.

execute that set of instructions which make os to handle that external interrupt 

What can be those sets of instructions executed by a software interrupt significantly to help the OS handle that external interrupt?. I think both interrupts will perform their instructions to address their respective situations.

0
0

Related questions