From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Slobodov To: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] nested interrupts Date: Thu, 18 Jan 2001 08:26:00 -0000 Message-id: <3A671913.9090209@caracal-tech.com> References: <003b01c0811f$196395e0$6f2314ac@realtek.com.tw> X-SW-Source: 2001-01/msg00313.html > > Xavier> Besides, by looking into the source code, it seems that if > Xavier> there is any pending DSRs, no thread will be run. So can a > Xavier> high priority thread be blocked by a low priority interrupt > Xavier> (DSR)? > > Yes. > > Xavier> Will it introduce some problems for a real-time application? > > Interrupts are always higher priority than tasks (threads), and DSRs > are all at the same priority, higher than any thread and lower than > any interrupt. When designing a real-time system, it is a good idea to > include the total time of all possible interrupts (and their DSRs) > when calculating thread response time > > As I was explained here, a main purpose of a DSR is to avoid > scheduler's ready list manipulation from an interrupt. DSR mechanism > serializes access to the scheduler (to suspend or resume a thread, or > to send a message), thus completely avoiding disabling interrupts when > posting. Quite neat. There is a price to pay, however, since DSR > mechanism nearly doubles the time between posting interrupt and thread > resumption. Bearing this in mind, the only thing DSR absolutely has to > do is to notify the scheduler. All the rest ought to be done either in > an ISR or in a thread. > Regards, Sergei Slobodov