Co_Routines Support for Oberon

http://www.zinnamturm.eu/downloadsAC.htm#Co_ http://sourceforge.net/projects/ta1/files/co2.0
Dmitry Dagaev
Posts: 68
Joined: Wed Mar 29, 2017 3:58 pm

Re: Co_Routines Support for Oberon

Post by Dmitry Dagaev »

If RETURN is for termination only, it can be accepted. If for intermediate transfer to parent - not.
Co_ package will remain the same, as new kernel version is not applicable for me. In any case, I'll finish my own Kernel with MarkRegion support.
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Co_Routines Support for Oberon

Post by Ivan Denisov »

Dmitry Dagaev wrote:If RETURN is for termination only, it can be accepted. If for intermediate transfer to parent - not.
Co_ package will remain the same, as new kernel version is not applicable for me. In any case, I'll finish my own Kernel with MarkRegion support.
Dmitry, you have said that initial Josef's version of Kernel is ok for your aims. Did you change your opinion?
http://blackboxframework.org/unstable/i ... a1.816.zip
Dmitry Dagaev
Posts: 68
Joined: Wed Mar 29, 2017 3:58 pm

Re: Co_Routines Support for Oberon

Post by Dmitry Dagaev »

No, he has changed his version
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Co_Routines Support for Oberon

Post by Ivan Denisov »

Dmitry Dagaev wrote:No, he has changed his version
We still in the discussion how to make this. So we are hearing all the arguments for and against various versions. I am also think that initial version of the Kernel was better. However also we should move WinApi from basic interface modules of the System folder to Host subsystem.
Dmitry Dagaev
Posts: 68
Joined: Wed Mar 29, 2017 3:58 pm

Re: Co_Routines Support for Oberon

Post by Dmitry Dagaev »

Josef,
Performance benefits can be reached for background tasks. Co_ObxActions in background gains 400000 times per BlackBox ObxActions example in execution time. Why? Scheduler uses Services.Action time effectively. See ObxActions above.
User avatar
Robert
Posts: 177
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: Co_Routines Support for Oberon

Post by Robert »

I am not in a position to add anything of technical significance to this discussion, but just wanted to say I have been reading it with great interest.

I particularly liked the hungry philosophers example; so much so I described it to the (non computer) people I was staying with as a guest last weekend. Their reaction was that the philosophers were not doing any thinking, or they would have thought to buy more forks, or eat with their fingers. I have been teased about forks and thinking every mealtime since.
Dmitry Dagaev
Posts: 68
Joined: Wed Mar 29, 2017 3:58 pm

Re: Co_Routines Support for Oberon

Post by Dmitry Dagaev »

The alternative way of problem solving means that starvation encourages people to use their brains effectively. At least to scale on more resources.
luowy
Posts: 87
Joined: Thu Dec 17, 2015 1:32 pm

Re: Co_Routines Support for Oberon

Post by luowy »

Dmitry
Do you have updated your Co_ package?
the module Co_Api is WinApi interface, the calling convention should be stdcall,
your [ccall] flag confusing me.
Dmitry Dagaev
Posts: 68
Joined: Wed Mar 29, 2017 3:58 pm

Re: Co_Routines Support for Oberon

Post by Dmitry Dagaev »

Dmitry Dagaev wrote:The only reason to use ConvertThreadToFiberEx is to use FIBER_FLAG_FLOAT_SWITCH... So I met the portability problem and decided to use default behaviour.
The latest version uses ConvertThreadToFiber
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Co_Routines Support for Oberon

Post by Josef Templ »

Dmitry Dagaev wrote:Josef,
Performance benefits can be reached for background tasks. Co_ObxActions in background gains 400000 times per BlackBox ObxActions example in execution time. Why? Scheduler uses Services.Action time effectively. See ObxActions above.
If it is considered important it should be possible to optimize special Task use cases
by executing several rounds at once, I think.
I havn't looked into this yet because i tried to keep the base module simple.
But it may be a good idea indeed. Don't know yet how complicated it would be.

- Josef
Post Reply