[Barrelfish-users] Global CPU scheduling

Simon Peter speter at inf.ethz.ch
Wed Oct 31 01:49:58 CET 2012

Hi Zeus,

There is rudimentary support for global CPU scheduling via dispatcher 
manifests and phase changes. See usr/monitor/resource_ctrl.c and 

Thread migration is not yet implemented in barrelfish and it's 
difficult. The reason are core-local state, like capabilities, and 
communication channels, which are explicitly setup to a particular 
dispatcher running on a core. In order to migrate a thread, capabilities 
need to be migrated and channels re-established on the new dispatcher/core.

There currently is a hack that allows you to migrate a thread from one 
CPU to another, without migrating any channels or capabilities. This 
works as long as the thread has not setup any of this state on a core 
and was useful in porting POSIX applications that typically create a 
thread first and then pin it to a particular core immediately after 
creation. This is invoked via domain_thread_move_to(), defined in 

Barrelfish's model is not to share any OS state among cores, so even if 
you have a spanned shared-memory domain, its capabilities are replicated 
(but currently not kept consistent) among all involved cores.

Hope this helps,

On 12-10-30 09:43 AM, Zeus Gómez Marmolejo wrote:
> Hi all,
> We were discussing some interesting work that could be tested on the 
> ARM big.LITTLE architecture. As this is an heterogeneous system, it is 
> very interesting for Barrelfish. But I had some questions regarding 
> the task scheduling. As far as I know, Barrelfish doesn't support 
> system wide CPU scheduling.
> It can happen that an application running on a specific core, because 
> of the asymmetric cpu load or its own profile may need to be 
> 'migrated' to a faster core (or a different type of the current one). 
> Would it be difficult to do this?
> I guess in a shared memory system, the dispatcher capabilities can be 
> transferred from one core to the other. Is this possible? But it would 
> be necessary to have a "cpu server" or something like that, keeping 
> track of the use of each CPU.
> Then in this case, it would be desirable to switch off a CPU 
> completely, when all tasks running there have been migrated out of the 
> core. How this could be achieved in Barrelfish?
> Cheers,
> -- 
> Zeus Gómez Marmolejo
> Barcelona Supercomputing Center
> PhD student
> http://www.bsc.es
> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20121030/f187de19/attachment.html 

More information about the Barrelfish-users mailing list