Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
13 crawler(s) on-line.
 113 guest(s) on-line.
 1 member(s) on-line.


 Gunnar

You are an anonymous user.
Register Now!
 Gunnar:  21 secs ago
 vox:  18 mins ago
 zipper:  21 mins ago
 kolla:  28 mins ago
 OneTimer1:  42 mins ago
 BigD:  1 hr 25 mins ago
 OlafS25:  1 hr 27 mins ago
 amigakit:  1 hr 55 mins ago
 NutsAboutAmiga:  1 hr 58 mins ago
 Frank:  2 hrs 43 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  Support for multiple cores in AmigaOS?
Register To Post

Goto page ( 1 | 2 | 3 | 4 | 5 | 6 | 7 Next Page )
PosterThread
pavlor 
Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 12:09:13
#1 ]
Elite Member
Joined: 10-Jul-2005
Posts: 9578
From: Unknown

Here what I found on Risc OS Open (!) forums:

If you just want to make calculation on the other cores, for example the decoding part of mplayer or an x86 emulation, the OS just needs to fire up the other cores with their own memory space, then to send code to them and get the result. That’s the way Amiga OS manage multicore systems (in fact, it goes even further by making light copies of the OS running on each secondary core).

Yep, Simtec did use the strategy I suggest (and that the Amiga community uses today) : a light bootstrap/os on other cores, just to run specific tasks (mainly calculation, with no direct access to 100% of the main OS).


Link August 2013

Author of these replies is David Feugey, Journaliste Silicon.fr. He covers in his articles Risc OS and Amiga communities.

Real or fake? Still interesting.

 Status: Offline
Profile     Report this post  
itix 
Re: Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 12:47:33
#2 ]
Elite Member
Joined: 22-Dec-2004
Posts: 3398
From: Freedom world

@pavlor

I think he refers to PowerUp and WarpUp kernels where you can execute PPC code but have no direct access of the main OS.

Technically PowerUp systems are dual CPU systems (68k CPU and PPC CPU). (In theory it is possible design dual core CPU with 68k core and PPC core to save space...)

_________________
Amiga Developer
Amiga 500, Efika, Mac Mini and PowerBook

 Status: Offline
Profile     Report this post  
pavlor 
Re: Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 12:56:51
#3 ]
Elite Member
Joined: 10-Jul-2005
Posts: 9578
From: Unknown

@itix

That is possible explanation. I wonder if Hyperion uses similar approach for its X-kernel.

 Status: Offline
Profile     Report this post  
eliyahu 
Re: Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 12:58:48
#4 ]
Super Member
Joined: 3-Mar-2010
Posts: 1957
From: Waterbury, Connecticut (USA)

@pavlor

Quote:
That is possible explanation. I wonder if Hyperion uses similar approach for its X-kernel.

i seriously doubt it.

-- eliyahu

_________________
"Physical reality is consistent with universal laws. When the laws do not operate, there is no reality. All of this is unreal."

 Status: Offline
Profile     Report this post  
Hypex 
Re: Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 14:36:01
#5 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@pavlor

Depends. What do they mean by Amiga OS?

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Support for multiple cores in AmigaOS?
Posted on 3-Aug-2014 18:52:39
#6 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@pavlor

Mplayer is multithreaded, once AmigaOS4.2 is out with SMP, the 2en core can help decode the video.

The GPU can also help decode video if we ever get UVD support.

Last edited by NutsAboutAmiga on 03-Aug-2014 at 06:55 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
agami 
Re: Support for multiple cores in AmigaOS?
Posted on 4-Aug-2014 6:53:26
#7 ]
Super Member
Joined: 30-Jun-2008
Posts: 1637
From: Melbourne, Australia

@pavlor

Quote:
I wonder if Hyperion uses similar approach for its X-kernel.


Extremely doubtful. This kind of poor-man's multi-cpu execution is relatively simple to implement, and even with Hyperion's limited resources they could have done this by now.

But like with all things, if it's simple to implement it is hard to work with long term. There's no free lunch.

I don't know which way Hyperion are going with the multi-cpu implementation, but I would guess that it's some type of AMP with sandboxing, not a true hypervisor but better and more transparent than WarpUP. Many options are possible, but only 1-2 are probable given the small team, and compatibility requirements.

One could argue that Exec already has AMP support built in.

_________________
All the way, with 68k

 Status: Offline
Profile     Report this post  
KimmoK 
Re: Support for multiple cores in AmigaOS?
Posted on 4-Aug-2014 7:34:39
#8 ]
Elite Member
Joined: 14-Mar-2003
Posts: 5211
From: Ylikiiminki, Finland

@pavlor

Interesting find.

"OS just needs to fire up the other cores with their own memory space, then to send code to them and get the result. That’s the way Amiga OS manage multicore systems (in fact, it goes even further by making light copies of the OS running on each secondary core)."

Does not match with PowerUP/WarpUP, unless PowerUP had some support aimed to used multiple PPC cores (but never used).

"Amiga community uses today) : a light bootstrap/os on other cores, just to run specific tasks (mainly calculation, with no direct access to 100% of the main OS). "

If that is about AOS4... then it might be some early development phase of multicore use. Definitely that sounds limited. When further developed, such system might give more access to main OS as virtualization is developed further and in the end...?
(AOS4.2 might have several modes of operation, like single core, hybrid, full SMP with different levels of legacy compatibility)

@agami

"some type of AMP with sandboxing" I think HyperionMP hinted that solution might work even without sandboxing.

The again, perhaps we see new meanings for SMP and sandoxing etc. with AOS4.2.

Last edited by KimmoK on 04-Aug-2014 at 07:37 AM.

_________________
- KimmoK
// For freedom, for honor, for AMIGA
//
// Thing that I should find more time for: CC64 - 64bit Community Computer?

 Status: Offline
Profile     Report this post  
Hypex 
Re: Support for multiple cores in AmigaOS?
Posted on 4-Aug-2014 14:52:31
#9 ]
Elite Member
Joined: 6-May-2007
Posts: 11180
From: Greensborough, Australia

@NutsAboutAmiga

Quote:
Mplayer is multithreaded, once AmigaOS4.2 is out with SMP


The only problem with this is that AmigaOS is not even ready to be hardware multi-threading because the OS doesn't yet support software threading in tasks/proceses. This should be added first.

A task doesn't equal to a thread. AmigaOS is multi-tasking to a point but it is not multi-threading.

I've considered writing a support library that would allow tasks to multi-thread on their own context by changing the switching in/out task functions so they jump to the next thread code if the quantum slice is still available. But it would be a slight hack.

It wouldn't involve the MMU or do copy on write semantics. But it would allow code to be properly threaded with different code able to execute under the banner of one task. The task and variables would be the same, code and stack would differ. I suppose you could call it a multi-task.

 Status: Offline
Profile     Report this post  
KimmoK 
Re: Support for multiple cores in AmigaOS?
Posted on 4-Aug-2014 19:54:34
#10 ]
Elite Member
Joined: 14-Mar-2003
Posts: 5211
From: Ylikiiminki, Finland

@Hypex

Have you ever studied work arounds for porting threaded apps to Amiga?

one AOS4 example:
http://aminet.net/package/dev/lib/libsps

_________________
- KimmoK
// For freedom, for honor, for AMIGA
//
// Thing that I should find more time for: CC64 - 64bit Community Computer?

 Status: Offline
Profile     Report this post  
salass00 
Re: Support for multiple cores in AmigaOS?
Posted on 4-Aug-2014 21:03:56
#11 ]
Elite Member
Joined: 31-Oct-2003
Posts: 2707
From: Finland

@Hypex

Quote:

The only problem with this is that AmigaOS is not even ready to be hardware multi-threading because the OS doesn't yet support software threading in tasks/proceses. This should be added first.


You've got it the wrong way around. AmigaOS already supports threads, they are just called tasks and processes in the API.

What AmigaOS doesn't support (and likely won't any time soon) is proper processes with own memory spaces (needed for full memory protection and shared objects that are shared in memory as well as on disk among other things).

Last edited by salass00 on 04-Aug-2014 at 09:07 PM.

 Status: Offline
Profile     Report this post  
Belxjander 
Re: Support for multiple cores in AmigaOS?
Posted on 5-Aug-2014 0:33:58
#12 ]
Cult Member
Joined: 4-Jan-2005
Posts: 557
From: Chiba prefecture Japan

@Hypex

Aren't ALL Amiga tasks equivalent to your threads and AmigaDOS expanded processes equivalent to a full application in this context?

I would just uses tasks for threads and processes for Application level differences.

@Thread...

Adding SMP or AMP would need a launcher for the additional cores and multicore aware interrupt controller.

certain subsections of exec would need exclusion locking (ports/semaphores/task lists) but once protected the OS would work very responsively on ALL the cores.
anything with an exclusive hardware resource also needs multi-thread/task/process/application access exclusion.
as long as the resources are in memory there is little or no bottlenecking for the most part.

it would even be possible to round-robin the timeslicing on the cores to force only one core is changing a task at a time.
this would allow an expanded quantum that is also without significant lagtime.

Core 0 at time q+0 switches tasks,
Core 1 at time q+1 switches tasks,
Core 0 at time q+2 switches tasks,
Core 1 at time q+3 switches tasks,
...

the question then becomes use of bus time without bottlenecking non-CPU bus access.
Have any of the MOS devs experimented with a dual core ppc mac g4 or g5?

hence that "task"s on AmigaOS are not potentially hostile hijackers attached to a proper process.

 Status: Offline
Profile     Report this post  
agami 
Re: Support for multiple cores in AmigaOS?
Posted on 5-Aug-2014 2:32:48
#13 ]
Super Member
Joined: 30-Jun-2008
Posts: 1637
From: Melbourne, Australia

@Hypex

One step at a time, young grasshopper.

First thing is to have both CPUs available for the tasks to use and allow for relatively decent balancing of tasks across CPUs, i.e. video file playback on CPU0 and web browser on CPU1.

Then afterwards, if there is a substantial benefit, is to have a single task divided across 2 or more CPUs.

In everyday computer use not every application operates on data in a way that would benefit from threading. Mostly heavy numeric computational stuff like transcoding, rendering, etc.

I'd prefer an OpenCL implementation over multi-threading.

Last edited by agami on 05-Aug-2014 at 02:33 AM.

_________________
All the way, with 68k

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Support for multiple cores in AmigaOS?
Posted on 5-Aug-2014 23:38:21
#14 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@Hypex

Quote:
A task doesn't equal to a thread. AmigaOS is multi-tasking to a point but it is not multi-threading.


A child process can be started by the main process, this is what I call this treading, this is how pthreads works on AmigaOS, it builds on processes.

A task is not a thread, because it too simple, it can't do file io operations for example, you need a process if you like to do file IO operations and so on.

Quote:
The only problem with this is that AmigaOS is not even ready to be hardware multi-threading because the OS doesn't yet support software threading


Nope, and I'm sorry I can't answer you, I don't know the technical challenges, and how hard it is do schedule processes on 2en core, it be just guessing on my part. So this time I try not to.

Anyway if you want to get some understanding about some issues you might want to look up Mutex / Semaphore and Spinlocks. This functions deals with asynchronous memory access, and how to prevent chaos.

Quote:
I've considered writing a support library that would allow tasks to multi-thread on their own context by changing the switching in/out task functions so they jump to the next thread code if the quantum slice is still available. But it would be a slight hack.


If you have threading on the same process, then you will prevent threads to be scheduled on different cores by Exec.

Quote:
It wouldn't involve the MMU or do copy on write semantics.


Tried that on Basilisk II, to try convert endiens but it was not fast, I dropped it when I found out how to do it correct.

Quote:
task and variables would be the same, code and stack would differ.


That's whats called a “fork” many operating systems do not support that, its a Linux thing, you don't need support for “fork” to support threading, please look up pthreads.

Last edited by NutsAboutAmiga on 09-Aug-2014 at 04:52 AM.
Last edited by NutsAboutAmiga on 05-Aug-2014 at 11:42 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Vistaus 
Re: Support for multiple cores in AmigaOS?
Posted on 6-Aug-2014 9:53:28
#15 ]
Regular Member
Joined: 29-Jul-2013
Posts: 332
From: Unknown

Hypex is right though and for a very simple reason: you can run more than one task at a time on AmigaOS (4) so it's a multi-tasking OS.

As for multiple cores: why not just have AOS4 run on one core to prevent 68k apps from not working (also, just system-wise AOS4 is very fast on a single core already) and then provide an API to call upon the second core so that devs can implement support for use of the second core themselves?

Last edited by Vistaus on 06-Aug-2014 at 09:54 AM.

_________________
Proud user of AmigaOS 4.1 on an AmigaONE 500. This is the first Amiga I've ever had so I don't know all the ins and outs of AmigaOS yet, so I'm sorry if I'm asking noob questions and stuff.

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Support for multiple cores in AmigaOS?
Posted on 6-Aug-2014 10:44:57
#16 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@Vistaus

Quote:
Hypex is right though and for a very simple reason: you can run more than one task at a time on AmigaOS (4) so it's a multi-tasking OS.


Well you can't really run two process at once with out having multi core support, but is not a single tasking OS, because it runs on one core.

Quote:
As for multiple cores: why not just have AOS4 run on one core to prevent 68k apps from not working (also, just system-wise AOS4 is very fast on a single core already) and then provide an API to call upon the second core so that devs can implement support for use of the second core themselves?


If you do it that way, then no program ported to AmigaOS will have treading support with out first being rewritten. It make first core extremely active, and the second core not active at all, because many programs are not be mutitraded at all.

Last edited by NutsAboutAmiga on 09-Aug-2014 at 05:28 AM.
Last edited by NutsAboutAmiga on 06-Aug-2014 at 10:50 AM.
Last edited by NutsAboutAmiga on 06-Aug-2014 at 10:50 AM.
Last edited by NutsAboutAmiga on 06-Aug-2014 at 10:45 AM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
KimmoK 
Re: Support for multiple cores in AmigaOS?
Posted on 6-Aug-2014 11:40:46
#17 ]
Elite Member
Joined: 14-Mar-2003
Posts: 5211
From: Ylikiiminki, Finland

@thought/opinion

If it appears that legacy SW uses only core 0 and new apps with "child threads/tasks" can be running on any core, it is not SMP, but anyway much better than not using other cores at all.

Gallium3D on AOS4.2 is designed to "Support multi-threading and multiple CPU’s", I wonder if that gives any clues of multicore implementation. Multithreading sounds little bit towards SMP kind of multiprocessing support. (IMO)

"Finally, multi-threading and multi-CPU support is an important factor. If you are aiming at making a system an integral part of the OS, then support for multithreaded operation is as much a requirement as support of multiple CPU’s."
(galliu3D/OpenGL working on AOS4 in SW rendering mode, in 2011)

One clear AMP usecase with 3D is to use the cores 1...n for SW renderer on systems that have multiple cores but no separate 3D chip (like FSL T1022 in low end config).

Last edited by KimmoK on 06-Aug-2014 at 11:45 AM.
Last edited by KimmoK on 06-Aug-2014 at 11:45 AM.
Last edited by KimmoK on 06-Aug-2014 at 11:43 AM.

_________________
- KimmoK
// For freedom, for honor, for AMIGA
//
// Thing that I should find more time for: CC64 - 64bit Community Computer?

 Status: Offline
Profile     Report this post  
Jupp3 
Re: Support for multiple cores in AmigaOS?
Posted on 6-Aug-2014 20:08:24
#18 ]
Super Member
Joined: 22-Feb-2007
Posts: 1225
From: Unknown

@KimmoK

Quote:
If that is about AOS4...

I doubt the people behind those comments would have any access to (afaik) mostly secret information on how the multithreading will work in practice on yet unreleased version of AmigaOS4...

 Status: Offline
Profile     Report this post  
PR 
Re: Support for multiple cores in AmigaOS?
Posted on 7-Aug-2014 12:34:10
#19 ]
Super Member
Joined: 1-Sep-2004
Posts: 1961
From: Suomi-Finland

I thought Amiga is multitasking OS.. 1 processor for the light os and the rest to the different (many) programs. Not a coder but is it possible? 290€ for a 4-core pc today, 500M HD, 4 Gigs etc and we don't have a better Browser than IBrowse..

 Status: Offline
Profile     Report this post  
NutsAboutAmiga 
Re: Support for multiple cores in AmigaOS?
Posted on 7-Aug-2014 13:34:55
#20 ]
Elite Member
Joined: 9-Jun-2004
Posts: 12795
From: Norway

@PR

Quote:
I thought Amiga is multitasking OS.. 1 processor for the light os and the rest to the different (many) programs. Not a coder but is it possible? 290€ for a 4-core pc today, 500M HD, 4 Gigs etc and we don't have a better Browser than IBrowse.. 


Some how I get your taking about AmigaOS 3.5 / 3.9, because your taking about Ibrowse, it won't be possible do anything as complicated as SMP, AmigaOS 3.x is not under development, and you need to rewrite the task scheduler. sure there was hack called Executive a long time ago, but then there is the problem no dual core 680x0 CPU to buy. And in case you where thing about dual core support for PowerUP or WarpUP then that's also a dead end, not under development.

If you where taking about AmigaOS4.1 there are better browsers then IBrowse, you have Odyssey its really good, then there is Netsurf its also many times better then IBrowse.

In the case AmigaOS3.x, the operating system did not really support the 2en core or the PowerPC, basically support for powerpc was done by running a different OS on that core.

This what they call AMP.
http://en.wikipedia.org/wiki/Asymmetric_multiprocessing

this created a few problems.

1. the 680x0 CPU not knowing about the 2en CPU, created a problem dealing with shared memory, the data cache was flushed often to make sure the data in cache was written to ram, so the data was in sync in ram between 680x0 CPU and PowerPC CPU.

http://www.amiga.org/forums/archive/index.php/t-7637.html

2. 680x0 program did not speed up, they where just as slow unless they started a PowerPC plugin (program to do stuff for it), some programs supported powerpc plugins but not many.

3. There was few PowerPC programs for WarpUP and PowerUP, but they suffered as well, because AmigaOS was not PowePC, every time they did file operation the 680x0 cpu was doing it, and every time they play a sound in AHI and so on.

The TCP stack was one of this thing that was really slow on 680x0, if you ever booted up Linux APUS on Amiga4000, you notice how slow Maimi was on Amiga compared to the Linux TCP/IP stack running on PowerPC.

This is all history well some are using PowerUP and WarpUP Today, but majority stayed with 680x0 CPU's.

AmigaOS4.0/4.1 today is PowerPC native and so WarpUP/PowerUP is just hacks that we can forget about, and most likely not some thing your going do again, because of all its disadvantages AMP has over SMP support.

Last edited by NutsAboutAmiga on 09-Aug-2014 at 05:33 AM.
Last edited by NutsAboutAmiga on 09-Aug-2014 at 04:51 AM.
Last edited by NutsAboutAmiga on 07-Aug-2014 at 02:43 PM.
Last edited by NutsAboutAmiga on 07-Aug-2014 at 01:50 PM.
Last edited by NutsAboutAmiga on 07-Aug-2014 at 01:38 PM.

_________________
http://lifeofliveforit.blogspot.no/
Facebook::LiveForIt Software for AmigaOS

 Status: Offline
Profile     Report this post  
Goto page ( 1 | 2 | 3 | 4 | 5 | 6 | 7 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle