Software Engineering Talk
Software Engineering Talk
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RTOSes

 
Post new topic   Reply to topic    Software Engineering Talk Forum Index -> Software Engineering Talk
View previous topic :: View next topic  
Author Message
Maxim S. Shatskih
Guest





PostPosted: Thu Jul 17, 2008 9:05 pm    Post subject: RTOSes Reply with quote

My notions about the possible OS design with respect to latency and about
RTOSes.

I see 3 possible OS designs:

1) ISRs and threads, nothing else. Threads can be awaken from ISR.
Drawback: you cannot limit the execution time of ISR except by a crash, so,
you cannot guarantee any ISR latency. Since ISRs interrupt the threads, you
cannot guarantee the thread scheduling latency too.

2) Windows or old Linux design: ISRs, DPCs and threads, with the
requirement of keeping the ISR as fast as possible and do most of the work in
DPC.
Advantage: DPC can be interrupted by other ISRs and thus decreases their
latency. The overall interrupt latency in the OS is better.
Drawback: still no guarantees. Also, DPCs are scheduled using very
primitive policy, and they preempt any thread. So, very bad DPC latencies and
very bad thread scheduling latencies.

3) Only ISRs and threads, but the ISRs are very simple and their only job
is to signal the "ISR thread". Drivers cannot add code to ISRs, they are
required to use ISR threads instead.

With this, the ISR latency is best and predictable, and so is the thread
scheduling latency.

Now note that the thread scheduler must be able of applying the policies of
"guaranteed thread wake latency" (time from KeSetEvent or analog till the
thread actually starts to run), and "guaranteed hard timeslice" (thread cannot
be preempted for this time after wake unless it will voluntarily wait once
more).

These policies are based on preallocation, and, if the times were
allocated, they are guaranteed. They override the usual notion of thread
priorities.

Now note that the ISR threads are also subject to the same policies, so,
the real ISR latency (from hardware to driver's code) is the ISR thread's wake
latency + the constant short ISR execution time.

Also, thread scheduling of the ISR threads replaces the usual interrupt
priorities.

Looks like design #3 is a perfect RTOS design.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
Back to top
  Ads
Advertising
Sponsor


Display posts from previous:   
Post new topic   Reply to topic    Software Engineering Talk Forum Index -> Software Engineering Talk All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Australian Debt Consolidation Experts
medical insurance
Wedding
Recensioni dei principali siti Escort/Accompagnatrici (BestAnnunci, Piccoletrasgressioni, Incontriitalia ...)
Expatriate Swingers
Network Marketing
cheap mortgages
Make Your Own Website
Free calls to Pakistan
Cleaning Service
Mold
UK Swingers Genuine Contacts Site
Janitorial Supplies
Sanitaire Vacuum Parts


Board Security

125 Attacks blocked

Powered by phpBB © 2001, 2005 phpBB Group