Welcome, Guest. Please login or register.

Author Topic: Why is SMT (multicore) support hard for Amiga OS?  (Read 20537 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« on: June 26, 2010, 06:44:14 PM »
@Bif

As Fats (or Staf as we know him on the AROS list), has pointed out, AmigaOS shares resources... Ok, the Forbid() problem is a big one, but now think about HOW the amiga shares resources. It's all pointer passing, you basically have no idea which task/process is using what memory... if you need atomic access to a resouce you NEED to stop all tasks/processes that are currently running on the system...

This is just another case of one simple design decision, to share memory pointers for a bit of extra speed, coming back to bite us 25 years later :(

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #1 on: June 26, 2010, 10:02:40 PM »
Quote from: Karlos;567426
Strictly speaking, Forbid()/Permit() are not needed for the majority of AmigaOS thread exclusive access to (non-hardware) resources. For the most part, SignalSemaphores do a decent job of mediating access to items and lists in the system.
True, but Forbid() was quicker and easier... Let I also not forget that pointer passing also removed Data locality... Two threads on different CPU's could be sharing the same data... and that data could quite easily be located in two different caches unless marked non-cacheable... but no provision was ever made for that!

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #2 on: June 26, 2010, 10:21:12 PM »
Quote from: Karlos;567439
This assumes that two CPUs are running entirely independently and that no mechanism for enforcing cache coherency exists. This is a very old problem that has been mitigated by hardware advancements quite some time ago. Are you familiar with the MOESI cache coherency model?

Most multicore processors use this or a similar strategy, where the assumption is that pushing data between cores to keep their caches coherent is not a bottleneck, but that talking to memory is.
I'm not aware of that model (until now, will read in a bit), but I am aware of the x86's power cache coherency hardware... What I'm not sure about is how well that can work in a non memory protected environment. I'm not convinced the AmigaOS data model allows for the hardware to detect what apps in AmigaOS are trying to do... please though, do do do prove me wrong :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #3 on: June 26, 2010, 11:15:08 PM »
Well, I hardly want to point to the mess of PUP and WOS as examples of multiprocessor systems ;)

But I refer back to Staf, who pointed out that SMP is possible on AmigaOS, the problem is that is might actually hurt performance rather than increase it. Anyway we can argue this as much as we like, I know that Michal (I'm pretty sure it was Michal... he did almost all the other CPU resource stuff) wants to set up SMP support on AROS... so lets see a real example when it comes :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #4 on: June 27, 2010, 12:08:39 AM »
Again, I would never point to the impossibility of SMP in Amiga systems, I only suggest that it serves no purpose. What use is two cores when they will run slower than one?

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #5 on: June 27, 2010, 02:17:28 PM »
Quote from: Karlos;567533
Yeah, I'm not suggesting that exec as it stands is suitable for "real" SMP, as you say, it would need a redesign from the ground up.



Ergo, we no longer would be using AmigaOS! :)

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Why is SMT (multicore) support hard for Amiga OS?
« Reply #6 on: June 29, 2010, 04:19:38 PM »
@hardlink

That would be the CBM Gemini card, with two 68030s... IIRC Dave Haynie said that the software side of it was never completed. You are right that the team knew all too well the consequences of their design decisions... Jay Minor listed a few in his last interview :)