Re: Knowing which task is current in a CPU [ SMP ]

Hugo Varotto (hvarotto@cs.pitt.edu)
Tue, 06 Jul 1999 17:14:45 -0400


Well, yes, I'm holding the lock for the scheduler, for the runqueue, and
for the tasklist when I'm doing my search/update ( I told you, it wasn't
very efficient ).

I'm trying to implement a resource scheduler for multiprocessors. This
is used for real-time tasks, and a part of it requires me to to do a
task partition ( decide to which processor assign a task, and control
the inherent migration of the goodness() funtion ) based on the
requirements of the task. Sometimes I have the problem that, due to the
characteristics/requirements of a task, I need to move it from the CPU
that is running to another ( that's where my problem comes, 'cause it's
possible that other task besides the idle is running at that CPU, and I
will need to suspend it, migrate the desired task, and force a
reschedule on that CPU ).

What does it mean "the answer is inherently out of date" ? :-)

Hugo

--
Hugo Varotto
Computer Science Dept.
University of Pittsburgh
hvarotto@cs.pitt.edu
http://www.cs.pitt.edu/FORTS

Jan-Simon Pendry wrote: > > i can't imagine what algorithm you're writing but the answer to > the question "what is running on cpu X" is inherently out of date > unless you hold the run-queue lock. > > what are you trying to implement? > > jan-simon. >

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/