Welcome, Guest. Please login or register.

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

Description:

0 Members and 2 Guests are viewing this topic.

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show all replies
Re: Will OS4 have SMP after all
« 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 Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #1 on: July 26, 2013, 07:05:58 PM »
Quote from: bloodline;742289
AROS encourages the use of semaphores to lock resources.


Currently AROS' Semaphore implementation is using Forbid()...
Trust me...                                              I know what I\'m doing
 

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #2 on: July 26, 2013, 07:19:00 PM »
Quote from: Iggy;742370
Does anyone have a guess when it will be finished?


It will never be finished and I think you don't want that MorpOS ever will be declared finished...
Trust me...                                              I know what I\'m doing
 

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #3 on: July 26, 2013, 07:20:26 PM »
Quote from: nicholas;742423
What if a modified exec was running on top of a modified Linux kernel that enabled SMP by distributing Amiga processes across various cores?

A kind of Amithlon on steroids? ;)


This does not solve the problem for the programs relying on the fact that no other program will access memory between Forbid()/Permit().
Trust me...                                              I know what I\'m doing
 

Offline Fats

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 672
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #4 on: July 26, 2013, 07:21:48 PM »
Quote from: bloodline;742433
The advantage of the 68k emulation in AOS4 and MOS is that the 68k and PPC apps live in the same environment and can share libraries etc... It is only possible because the 68K and PPC are big endien...

And by using non-native C struct packing on the PPC side.
Trust me...                                              I know what I\'m doing