Green task stacks

Stefan Kalkowski stefan.kalkowski at ...1...
Wed Jan 27 08:34:28 CET 2016

Hello Igor,

On 01/21/2016 09:55 AM, Igor wrote:
> Hello!
> Genode Thread class already have infrastructure for implementing the green tasks: alloc_secondary_stack() which used i.e. in dde_linux to emulate the Linux kernel behavior.

Yes, that is correct.

> These secondary stacks have fixed maximal size and live one below another, so they can overlap each other.

That is a false assumption. You can define the stack size (second
argument of 'alloc_secondary_stack'), and there is always room in
between the different stacks so that a stack overflow should lead to a
page-fault. Where does your assumption come from?

> It is possible to create different Dataspace lists for each green stack and then switch them. Right now Genode hasn't the method for switching several DSs at once, so each DS in that list should be switched individually which would be too expensive. 

I do not know what you mean with dataspace switching. With regard to
thread stacks, it is the stack pointer (a designated register), which is
changed, nothing is changed with regard to the address space layout. In
general, all threads within one component share the same view with
regard to the memory layout. Therefore, I'm not sure what you mean with
"dataspace switching"?

Best regards

> The question is: even having that method, can we still consider our tasks "green"? Or such complexity is no better than the ordinal thread complexity?
> Thanks!
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> _______________________________________________
> genode-main mailing list
> genode-main at

Stefan Kalkowski
Genode Labs ยท

More information about the users mailing list