Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- From: "Eric P." <eric_pattison@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Jun 2007 11:53:55 -0400
ran.levy1@xxxxxxxxx wrote:
Background:
==========
The company I work for develop Carrier Ethernet Switch (both HW and
SW). I am facing a major decision I have to take about using RMS (or
anothe in house scheduler algorithm) or using the OS scheduling.
Requirements (the most relevant functional and non-functional
requirements):
=========================================================
1. Support various networking protocols (IGMP, STP, PBB-TE, ....)
2. High availability - achieved also by redundant HW.
3. Predictability - I would like to have performance predictability
prior to actual development.
4. Performance - achieving high performance and low system resources
usage.
5. Usability - allowing distributed development around the world.
6. Integration with 3rd party - allowing "buy" and easy integration
with them.
7. Portability - loose coupling with OS/HW.
Solution Alternatives:
================
The layered based with asynchronous messages between them. The
"dynamic control" layer is responsible for handling protocols' control
packets.
Alternative 1 - Rate Monotonic Scheduler (or other in-house
scheduler):
In the RMS concept there is a single task that schedules all
protocols. Each protocol must not exceed limited time quota and must
not perform any CPU blocking operation. Blocking operations should be
performed by services tasks that serve all protocols.
Hmmmm.... except that is not what Rate Monotonic Scheduling is.
RMS is a design technique that assigns static priorities to
known amounts of work and shows you whether all tasks meet their
deadlines. It requires you to you know the task frequency and
duration and deadlines in advance. If a deadline is missed,
the system has, by definition, failed.
If the tasks you are describing are not deadline based,
then it is not really a real time scheduling issue.
Alternative 2 - OS Scheduling
In this approach every protocol has task (or more than one - for
example to support Pipes & Filtering). The scheduling between the
protocols is done by the OS (with or without time slicing).
I would be happy to have comments/observations or some other
alternatives.
Thanks,
Ran
Ok, I can mutter some thoughts out loud if you like...
You seem to be mixing a number of issues together.
One is software architecture: a single task processing a work queue
into which to-do items are posted .vs. multiple tasks
(or a combination of these two).
The other is the manner in which multiple tasks are scheduled
and the priorities you assign to each task.
How are you going to ensure that you know the amount of work
in advance? It seems to me there are two alternatives:
1) Assume that each network packet takes a worst case path
through the protocol stack. The total amount of load
is proportional to the packet arrival rate and therefore
the total bandwidth of the network connections.
If you are over budget, install slower network cards.
Of course this only applies after packets have been received.
The system cannot make any assurance that a packet will arrive.
If the network connection is shared (ethernet) this delay
is probabilistic (well... more probabilistic).
2) Accept that there is no guaranteed upper time limit.
Pre-allocate a fixed amount of time for each of the various
protocol tasks.
And do what when the time budget is exhausted?
Assuming packets arrive at the highest rate possible for
the bandwidth, and assuming the bandwidth is high enough,
then your work queues are going to get longer and longer.
How are you going to deal with this?
You could shed load at critical points in the protocol stack,
equivalent to simply truncating the input queue.
In doing so you create a predicable worst case work load for
the remainder of the stack, and ideally a single control point
that throttles the externally generated load.
In effect this ensures you meet the task deadlines by tossing away
work. I'm not sure that qualifies as a strict real time design.
Eric
.
- Follow-Ups:
- Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- From: ran . levy1
- Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- From: Anne & Lynn Wheeler
- Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- References:
- Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- From: ran . levy1
- Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- Prev by Date: Re: Software Optimization Guide for AMD Family 10h Processors
- Next by Date: Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- Previous by thread: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- Next by thread: Re: Rate Monotonic Scheduling (RMS) vs. OS Scheduling
- Index(es):
Relevant Pages
|