AMP
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    Last time I looked for informations about multiprocessing in case of PPC/Morphos and I found the forum conversation
    'https://morph.zone/modules/newbb_plus/viewtopic.php?forum=11&topic_id=6465&viewmode=flat&sortorder=0&start=0'.
    It is quite interesting and I realized we have everything what we need at the moment. Many of us have dual processors PMs,
    unfortunately we don't take advantage of this fact even for simple reasons like 'dnetc' - what's the pity!!
    I talked to a few my colleges, programmers and the solution is relatively easy - AMP (asymmetric multiprocessing). It would
    guarantee quite fast progress and not too much work. More over, they promised to support such a project. Would it be a good
    idea to establish a new bounty? I think our small community could afford to pay for something like this and the project
    is worth reconsideration.
  • »08.10.12 - 20:10
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Quark should be able to handle another box, seperate from Abox.
    Here's the question, what do you want it to do?
    "Never attribute to malice what can more readily explained by incompetence"
  • »08.10.12 - 21:06
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12239 from 2003/5/22
    From: Germany
    > Quark should be able to handle another box, seperate from Abox.

    Implementing AMP wouldn't require any additional box.

    > what do you want it to do?

    He mentioned one example (dnetc) ;-)
  • »08.10.12 - 21:09
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4977 from 2009/1/28
    From: Delaware, USA
    Andreas_Wolf,
    Quote:

    Implementing AMP wouldn't require any additional box.


    Using a seond CPU from within Abox?

    Yeah, that could be done.
    In fact, since both CPU use common memory, with proper memory mapping some fairly interesting things could be done.

    How about offloading encoding and decoding tasks?
    "Never attribute to malice what can more readily explained by incompetence"
  • »08.10.12 - 22:42
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12239 from 2003/5/22
    From: Germany
    > Using a seond CPU from within Abox? Yeah, that could be done.
    > [...] How about offloading encoding and decoding tasks?

    Exactly. And we already had it in the PowerUP/WarpOS days.
  • »08.10.12 - 23:09
    Profile
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    More over it is much easier, because we use exactly the same type of processors
  • »09.10.12 - 08:01
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    maurensen
    Posts: 358 from 2003/10/3
    From: Padova - Italy
    My 2nd processor will be so grateful to wkae up on MOS on tasks like FLAC encoding or video processing via mencoder... Would be great but i think MOS team is focused in other tasks nowadays.
    I'll be more than glad to be contradicted in this :-)
    -------------------
  • »09.10.12 - 08:59
    Profile
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    Yeah, my MP has waiting since I've bought it :)

    [ Edited by zbysiuk 09.10.2012 - 09:19 ]
  • »09.10.12 - 09:03
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    My 2nd processor will be so grateful to wkae up on MOS on tasks like FLAC encoding or video processing via mencoder...

    It can be probably easily done with Reggae. It already creates a subprocess automatically for encoding or decoding. This subprocess is well isolated. In case of running on secondary core/processor it would only need two things: basic interprocess communication (signals, semaphores, messages) and memory allocator.

    It is understandable that giving the second processor access to all the system resources wil create a total mess, as most of MorphOS is not designed to be run on multiple processors. Noone sane will have such a plan, as it basically means total system rewrite and loosing all the current software base. However if we limit such processes to memory and IPC, it can be added relatively easy, without breaking backward compatibility, and it will be still very useful. Don't forget that the second CPU in all supported G4 PowerMacs has also an AltiVec unit :-).

    If the first step is done, some more elements of MorphOS may be made accessible from multiple cores step by step.
  • »09.10.12 - 09:33
    Profile Visit Website
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    More over it is much easier, because we use exactly the same type of processors.

    Also, unlike in PowerUP/WarpOS, on G4 double processor Macs, cache coherency between processors is kept by hardware.
  • »09.10.12 - 09:35
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 736 from 2003/2/24
    From: aGaS & CUAZ Al...
    Quote:

    However if we limit such processes to memory and IPC, it can be added relatively easy, without breaking backward compatibility, and it will be still very useful. Don't forget that the second CPU in all supported G4 PowerMacs has also an AltiVec unit :-).

    If the first step is done, some more elements of MorphOS may be made accessible from multiple cores step by step.


    Could the addition of AMP support (just for memory/IPC processes) be speed up by some kind of bounty?
  • »09.10.12 - 10:03
    Profile Visit Website
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    I do not think it is the job for MOSTeam but for people connected to MTeam working independently. It is obvious that the project would has to be supported by e.g. Quark documentation. That is why, bounty looks for me like only solution.
    The question is, how dear is it and who is ready to do it?
  • »09.10.12 - 10:12
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12239 from 2003/5/22
    From: Germany
    > the project would has to be supported by e.g. Quark documentation.

    If access to the Quark API is really required I have a feeling that not all MorphOS Team members would support such endeavour ;-)
  • »09.10.12 - 10:20
    Profile
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    If access to the Quark API is really required

    In fact something has to set up secondary processor[s] and start user code loop on them. I mean code running on user level of CPU privileges, the whole MorphOS runs on user level. Such a loop would be able to communicate with the main processor and receive tasks to execute. This "something" mentioned before must be Quark. It already does it in some degree, as it detects secondary processors and puts them in some "hibernation" state. So in fact implementing AMP may require some (not big I believe) Quark modifications, rather than access to its API.
  • »09.10.12 - 11:12
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    maurensen
    Posts: 358 from 2003/10/3
    From: Padova - Italy
    Would indeed be very cool, if a bounty will be set up at laest to use the 2nd cpu act as a co-processor I'll put some money on it for sure!
    Thanx Krahsan, it's nice to read your posts with technical explanations also for a noob in programming like me :-) Thanx man!
    -------------------
  • »09.10.12 - 12:14
    Profile
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    No more work would be required if morphos worked with G5 four cores. That is a real benefit. You just turn on your computer and here we go, 4 processors runing :)
  • »09.10.12 - 15:33
    Profile
  • Cocoon
    Cocoon
    zbysiuk
    Posts: 56 from 2006/8/4
    Actually Quark really do something for 2-nd processor: detecting and stopping it, so first step is done :-)
  • »09.10.12 - 16:31
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12239 from 2003/5/22
    From: Germany
    > Actually Quark really do something for 2-nd processor: detecting and stopping it

    And that's even without Quark documentation available ;-)
  • »09.10.12 - 19:56
    Profile