A Basic Question

A Basic Question

Post by ujjwal bhoo » Mon, 14 Jul 2003 07:39:29



Hi,
 I have a basic question. While in kernel mode (for example as a
result of system call), before modifying any kernel gloable data
we(kernel) disable all the interrupts that may posibally interfere
with that data.

What does it mean by "disabling the interrupt". Does it means that
interrupt can occure but it does not cause the cpu to jump on its
handler , than there must be some mechenism to "SAVE THOSE IGNORED
INTERRUPTS" and later at some point of time handle them. Otherwise
they will never be handled and that may cause problesm. For example if
some process waiting for I/O completion depends on interrupt handler
to wake it up, but if that I/O interrupt is ignored than this process
will sleep for ever.

Please let me know how "saving the ignored interrupts and later
handling them" is done. Or if it is not done at all than what
mechenism is used to prevent above problematic situation.

Thanks
Ujjwal

 
 
 

A Basic Question

Post by Fritz » Wed, 16 Jul 2003 02:33:46



> While in kernel mode (for example as a
> result of system call), before modifying any kernel gloable data
> we(kernel) disable all the interrupts that may posibally interfere
> with that data.

Are you talking about a modern variant of Unix?  If so, mutex locks
should be used to protect critical regions, not SPLs ("disabling
interrupts").

Quote:> Please let me know how "saving the ignored interrupts and later
> handling them" is done.

Any device that interrupts will continue to assert the interrupt signal
until the interrupt condition has been cleared.  If interrupts are
disabled, the interrupt-causing condition cannot be cleared.  Hence, when
interrupts are enabled again, the interrupt condition is still asserted,
and the appropriate interrupt service routine will be called.

RFM
--
To reply, translate domain from l33+ 2p33|< to alpha.
                4=a  0=o  3=e  +=t

 
 
 

A Basic Question

Post by ?ukasz Devereau » Wed, 16 Jul 2003 04:01:07



>> While in kernel mode (for example as a
>> result of system call), before modifying any kernel gloable data
>> we(kernel) disable all the interrupts that may posibally interfere
>> with that data.

> Are you talking about a modern variant of Unix?  If so, mutex locks
> should be used to protect critical regions, not SPLs ("disabling
> interrupts").

you need to disable interrupts anyway, if the data protected by mutex
can be accessed by interrupt service routine. otherwise, if interrupt
happens while the mutex is locked, isr will be unable to acquire the
lock and the system dies.
 
 
 

1. Basic basic troff question??!

G'day,

I know this is really simple (too simple for an FAQ!) but:

how can I use troff or nroff to print a troff or nroff document (such as
the source of a man page) to either my screen or a plain line printer?

Jeff.
--
--------------------------------------------------------------------------------

G.P.O. Box 619, Sydney, NSW, Australia, 2001.
Ph: +61-18-219955.   [(018)219955]            Fax: +61-2-983-9046  [(02)9839046]

2. SCSI disk error : host 1 channel 0 id 4 - L440GX , Adaptec AIC7xx and RedHat SCSI Errors

3. Basic, Basic SCSI Question

4. Need dumb terminal cabling help

5. very basic basic newbie question

6. Logging boot messages(and crash messages)

7. Newbie basic questions... many questions

8. problems with Adaptec ASW-B6-26

9. Basic and Basic->C converter wanted

10. No ROM BASIC Use Toshiba Basic

11. basic, very basic

12. The most basic of basics..

13. Very basic problem for a basic user....counting pipes and appending to the end of line.