Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > help: psos question
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 28th December 21:32
cbfk23
External User
 
Posts: 1
Default help: psos question


Can anyone confirm me if the following is true or not?

"Two tasks running at the same priority guarantee mutual exclusion to
a data area provided they do not make a blocking function call during
modification of the data area. Assuming no round-robin or time-slice
is involved"


Thank you very much,

Neil
  Reply With Quote


  sponsored links


2 28th December 21:32
iwo mergler
External User
 
Posts: 1
Default help: psos question


I think the answer is 'no'.

Lets assume the following scenario (3 tasks):

p(A)=p(B)<p(C)

In principle, you're right, if time slicing is disabled,
task A won't get preempted by task B or vice versa.

Now imagine that A gets preempted by C. After C finishes,
the scheduler will now select A or B next. Since I have
no access to the scheduler source, I can't predict which
one will be selected. I guess, it's probably the task which
was started first, but other orders are possible.

Unless the scheduler actually remembers which task got
preempted last, there will always be a situation which
would cause a indirect preemption of A over B or B over A.

I highly doubt that the scheduler does that, it would mean
a performance penalty.

Kind regards,

Iwo
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666