On Apr 22, 2009, at 6:12 AM, [email protected] wrote:

> All tasks have to be pre-emptable in the case of a task that  
> requires CPU
> time now.


A logical flow of the code is

845-847: Mark all tasks as pre-empted

850 make a list of pre- emptable tasks (why? We already indicated that  
all tasks running are pre-empted)

852-859 calculate available RAM

861-870 Schedule all NCI tasks are running

872 find available swap space

880 start looping through tasks

888-901 test for memory exceeds

905-939 recheck tasks already marked CPU_SCHED_PREEMPTED to see if we  
should make any others CPU_SCHED_PREEMPTED
  (which is my problem ... if the tasks are already marked for  
preemption, why bother checking again)

Which contradicts this statement:

> In other words, it only preempts a job if its time slice is up,
> or if there's a job in deadline trouble.

It does not only preempt if the time slice is up.  All tasks are  
preempted each and every time this CPU scheduler code is executed.

The second part of that "OR" clause is also problematical in that  
deadline trouble is badly defined for multi-core systems.
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to