Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Disabling interrupts to protect data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
KIRAN  
View profile  
 More options Oct 26, 1:15 pm
Newsgroups: comp.realtime
Followup-To: comp.realtime
From: KIRAN <kira...@gmail.com>
Date: Mon, 26 Oct 2009 10:15:01 -0700 (PDT)
Local: Mon, Oct 26 2009 1:15 pm
Subject: Disabling interrupts to protect data
Hi Guys,

I am working on some RTOS, in which I see lot of interrupts "enabling"
and "disabling" code in most of the RTOS API's to protect kernel data.
For example, Semaphore API's, Message Queue APIs, Runtime memory
management API's. Is enabling / disabling interrupts only way to
protect
the kernel data? Why  I am asking this is whenever interrupts are
disabled, I am scared of losing timer interrupts. Any input is
appreciated?

Regards,
Kiran


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Watt  
View profile  
 More options Oct 26, 5:48 pm
Newsgroups: comp.realtime
From: Steve Watt <steve.removet...@Watt.COM>
Date: Mon, 26 Oct 2009 21:48:25 +0000 (UTC)
Local: Mon, Oct 26 2009 5:48 pm
Subject: Re: Disabling interrupts to protect data
In article <fe038650-0ee4-45e7-aef7-8dd05c960...@m3g2000pri.googlegroups.com>,

KIRAN  <kira...@gmail.com> wrote:
>Hi Guys,

>I am working on some RTOS, in which I see lot of interrupts "enabling"
>and "disabling" code in most of the RTOS API's to protect kernel data.
>For example, Semaphore API's, Message Queue APIs, Runtime memory
>management API's. Is enabling / disabling interrupts only way to
>protect
>the kernel data? Why  I am asking this is whenever interrupts are
>disabled, I am scared of losing timer interrupts. Any input is
>appreciated?

In any reasonable RTOS, the amount of time that all interrupts are
disabled will be minimal.  Interrupts that come in while disabled are
not "lost", they are simply held pending until the interrupts are
enabled.

On the other hand, if the RTOS can leave interrupts disabled for an
entire clock tick, then you are at risk of losing an interrupt.  You
also have a buggy OS (it no longer counts as an RTOS) if it can leave
interrupts disabled that long.

Note that interrupt disabling only works in a uniprocessor environment,
so any OS that depends on that for implementing its primitives is
going to get in trouble on modern systems.
--
Steve Watt KD6GGD  PP-ASEL-IA          ICBM: 121W 56' 57.5" / 37N 20' 15.3"
 Internet: steve @ Watt.COM                      Whois: SW32-ARIN
   Free time?  There's no such thing.  It just comes in varying prices...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dick Wesseling  
View profile  
 More options Oct 27, 9:44 pm
Newsgroups: comp.realtime
From: f...@securityaudit.val.newsbank.net (Dick Wesseling)
Date: 28 Oct 2009 01:44:01 GMT
Local: Tues, Oct 27 2009 9:44 pm
Subject: Re: Disabling interrupts to protect data
In article <hc55f9$29m...@wattres.watt.com>,
        Steve Watt <steve.removet...@Watt.COM> writes:

> Note that interrupt disabling only works in a uniprocessor environment,
> so any OS that depends on that for implementing its primitives is
> going to get in trouble on modern systems.

Not quite.
A multiprocessor kernel obviously needs to lock out other cpus, e.g.
with an atomic compare and exchange, but that still leaves the problem
of other processes or interrupt handlers on the current cpu interfering
with the primitive.

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google