Welcome, Guest. Please login or register.

Author Topic: Will OS4 have SMP after all  (Read 31797 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline takemehomegrandma

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2990
    • Show only replies by takemehomegrandma
Re: Will OS4 have SMP after all
« Reply #44 on: July 25, 2013, 11:08:46 AM »
Quote from: minator;742058
Quote from: spirantho;741778
So, don't ask about SMP - ask about multi-processing, as SMP is just one type of multi-processing.

No, do.  It's quite important.


Indeed, the difference is fundamental!

It's like apples and oranges, both may be fruit but they're not at all the same, not even similar.

The point is that when you have been selling $3.000+ HW/OS combos that has a pronounced SMP specification as one of the selling points (and also plans on selling others in the future), playing with words like this won't cut it.

An "Airborne stone falling towards the ground" is very far from "Hovering", both may be "stone-in-air", but while a "hovering stone" can be really useful and give a general overall performance improvement to the system, an "airborne stone falling towards the ground" will very much less so...

This DOES matter, the difference IS important! So, don't ask about multi-processing - ask about SMP!

;)
MorphOS is Amiga done right! :)
 

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show only replies by Fats
Re: Will OS4 have SMP after all
« Reply #45 on: July 25, 2013, 10:29:43 PM »
Quote from: minator;742058
Simply put the existing Amiga OS design is incompatible with the whole idea of SMP.

The Amiga uses a single address space for everything including the OS.  There is also no real memory protection for apps or the OS.  Apps have direct access to the OS internals.

If you have more than one app running simultaneously on different processors both can write to the internals of the OS at the same time.  When this happens the OS will very rapidly crash due to data corruption.


This is exaggerating the problem. AmigaOS is a preemptive multitasking OS. This means that writing to shared (OS) data already has to be protected with Forbid()/Permit() or another locking mechanism or otherwise you would get data corruption also on a single CPU.
Problem is that on a multi-core system you have to stop all CPUs when Forbid() is called on one of them. As Forbid() is heavily used in AmigaOS likely SMP enabled OS will not see any speed improvement or may even run slower. So, biggest task of getting a performant SMP AmigaOS is replacing most of Forbid() calls in OS with other locking mechanisms. Likely a big task but not undoable.

Another problem is things like SysBase->ThisTask that have to give different values on the different cores but SysBase has to have the same pointer value. Also something I don't see as unsolvable by some clever MMU programming.
Trust me...                                              I know what I\'m doing
 

Offline wawrzon

Re: Will OS4 have SMP after all
« Reply #46 on: July 25, 2013, 10:49:35 PM »
@fats
interesting, how is the situation on aros? is there also as heavy usage of forbid/permit or has it been replaced with something else at least partly, im curious?
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Will OS4 have SMP after all
« Reply #47 on: July 25, 2013, 11:58:02 PM »
Quote from: wawrzon;742279
@fats
interesting, how is the situation on aros? is there also as heavy usage of forbid/permit or has it been replaced with something else at least partly, im curious?
AROS encourages the use of semaphores to lock resources.

Offline haywirepc

  • Hero Member
  • *****
  • Join Date: Sep 2009
  • Posts: 1331
    • Show only replies by haywirepc
Re: Will OS4 have SMP after all
« Reply #48 on: July 25, 2013, 11:59:54 PM »
Just a thought but couldn't forbid calls be replaced with forbidx calls??

For example forbidx would only affect the processor the task was running on.

Or forbid1 forbid2 forbid3 forbid4 (1 for each core)

People once said dos programs could never multitask. Of course they could, just needed the right way to have a master program timeslice and handle them.

Just saying, there has to be a way to fix the amiga smp problem, even if programs need to be slightly fixed and recompiled.

When I look at all the ways amiga programmers pushed the limits with demos, I wonder why people are so quick to say ANYTHING can't be done by amiga programmers...
« Last Edit: July 26, 2013, 12:02:05 AM by haywirepc »
 

Offline wawrzon

Re: Will OS4 have SMP after all
« Reply #49 on: July 26, 2013, 12:15:08 AM »
i just looked and cant find any occurrences of forbid() in aros source itself..;)
so it could likely only be found in particular legacy 68k code, which doesnt matter till someone will develop 68k smp accelerators for amiga, and even then it will only be a handicap of particular application that halts the whole system while executing own code, which is anyway (meant as) hacking away the multitasking..

so good news,apparently.. aros is smp ready..
« Last Edit: July 26, 2013, 12:19:12 AM by wawrzon »
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: Will OS4 have SMP after all
« Reply #50 on: July 26, 2013, 12:16:25 AM »
Quote from: haywirepc;742290
Just a thought but couldn't forbid calls be replaced with forbidx calls??

For example forbidx would only affect the processor the task was running on.

Or forbid1 forbid2 forbid3 forbid4 (1 for each core)

People once said dos programs could never multitask. Of course they could, just needed the right way to have a master program timeslice and handle them.

Just saying, there has to be a way to fix the amiga smp problem, even if programs need to be slightly fixed and recompiled.

When I look at all the ways amiga programmers pushed the limits with demos, I wonder why people are so quick to say ANYTHING can't be done by amiga programmers...
Once a task has called forbid(), it expects to have the entire machine to itself... If any other task were still running (on another CPU), they could both be using the same data structure (AmigaOS has a shared memory model)!

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: Will OS4 have SMP after all
« Reply #51 on: July 26, 2013, 12:18:32 AM »
Quote from: Fats;742273
Problem is that on a multi-core system you have to stop all CPUs when Forbid() is called on one of them. As Forbid() is heavily used in AmigaOS likely SMP enabled OS will not see any speed improvement or may even run slower. So, biggest task of getting a performant SMP AmigaOS is replacing most of Forbid() calls in OS with other locking mechanisms. Likely a big task but not undoable.


You cant remove Forbid() in the OS code easily because for example AllocMem() is guaranteed to not break Forbid(). Replacing Forbid() to semaphores can result in unexpected side effects.

But then this is just a performance optimization and is not directly related to multiprocessing.

Quote

Another problem is things like SysBase->ThisTask that have to give different values on the different cores but SysBase has to have the same pointer value. Also something I don't see as unsolvable by some clever MMU programming.


It is actually easy with MMU.
My Amigas: A500, Mac Mini and PowerBook
 

Offline wawrzon

Re: Will OS4 have SMP after all
« Reply #52 on: July 26, 2013, 12:26:30 AM »
Quote from: itix;742300

It is actually easy with MMU.

again, the only architecture not guaranteeing mmu will probably be 68k, which isnt multicore by definition at least for the expectable future. aros could solve it by some ifdefs.
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: Will OS4 have SMP after all
« Reply #53 on: July 26, 2013, 12:37:18 AM »
Quote from: wawrzon;742302
again, the only architecture not guaranteeing mmu will probably be 68k, which isnt multicore by definition at least for the expectable future. aros could solve it by some ifdefs.


However you have to figure out an alternative way to resolve SysBase-ThisTask. You know, FindTask(NULL) implementation is exactly like that. It only has "return SysBase->ThisTask" there. So when you are trying to fix a bump on your unpaved road to SMP you are going to find another bumps.
My Amigas: A500, Mac Mini and PowerBook
 

Offline Methuselas

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2205
    • Show only replies by Methuselas
Re: Will OS4 have SMP after all
« Reply #54 on: July 26, 2013, 02:58:35 AM »
Quote from: nicholas;741783
Will OS4 get SMP?

Maybe, but not before A*** does.



Troll! :razz:



Everyone knows OS4 is the holy grail of modern computing, you Commie Terrorist! ;)
\'Using no way as way. Having no limitation as limitation.\' - Bruce Lee

\'No, sorry. I don\'t get my tits out. They\'re not actually real, you know? Just two halves of a grapefruit...\' - Miki Berenyi

\'Evil will always triumph because good is dumb.\' - Dark Helmet :roflmao:

\'And for future reference, it might be polite to ask someone if you can  quote them in your signature, rather than just citing them to make a  sales pitch.\' - Karlos. :rtf
 

Offline ElPolloDiabl

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Re: Will OS4 have SMP after all
« Reply #55 on: July 26, 2013, 06:00:42 AM »
Is it possible to have one version single core, and then slowly migrate the software to multi-core? You could dual boot either version.

Otherwise there is sandbox mode like a Java Virtual Machine.
Go Go Gadget Signature!
 

Offline LoadWB

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show only replies by LoadWB
Re: Will OS4 have SMP after all
« Reply #56 on: July 26, 2013, 07:00:32 AM »
Quote from: ElPolloDiabl;742332
Is it possible to have one version single core, and then slowly migrate the software to multi-core? You could dual boot either version.

Otherwise there is sandbox mode like a Java Virtual Machine.


Would it be possible to invoke each 68k/PPC AmigaOS program in its own environment, a sort-of emulated AmigaOS instance in the vein of a VM?  Instead of each instance being isolated to its own virtual environment, having the virtual AmigaOS instead be "patched" with wrappers which would allow the AmigaOS VM to communicate with the host OS and other AOS VMs?

In this manner, the host OS could be designed as SMP with memory protection, while still offering backward compatibility to existing AOS software.  At least in my mind.  I'm curious to know how Apple had OSX run MacOS 9 software natively.
 

Offline haywirepc

  • Hero Member
  • *****
  • Join Date: Sep 2009
  • Posts: 1331
    • Show only replies by haywirepc
Re: Will OS4 have SMP after all
« Reply #57 on: July 26, 2013, 07:13:56 AM »
All of this is bull****. If current amiga ng os systems can't do smp then say goodbye and reboot to ng/2

Include something to run 68k apps, and ng apps in some kinda sandbox and move on...

amd bulldozer is getting very common = 8 cores. 16 cores will soon be common or even more.

Adapt or die.

someone just posted a very attractive hardware solution for amiga ng/2.

Hey I just invented amiga ng/2.

Like silly billy, I should live off that for 15 years shouldn't I?
 

Offline wawrzon

Re: Will OS4 have SMP after all
« Reply #58 on: July 26, 2013, 07:53:17 AM »
Quote
If current amiga ng os systems can't do smp then say goodbye and reboot to ng/2
or maybe ar** v1?;)

Quote
Include something to run 68k apps, and ng apps in some kinda sandbox and move on...
uae is a sandbox, isnt it?
« Last Edit: July 26, 2013, 07:55:39 AM by wawrzon »
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: Will OS4 have SMP after all
« Reply #59 from previous page: July 26, 2013, 08:22:37 AM »
Quote from: wawrzon;742342
uae is a sandbox, isnt it?

It would be nice not to have to resort to UAE.
The biggest problem you're going to have is the need to halt the other cores  when the one running AOS wants to execute a Forbid().
Its the simplest way to prevent a crash.

MorphOS will face a similar problem, but the developers are seriously considering dropping legacy compatibility.
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"