Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

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

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #1 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 itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Will OS4 have SMP after all
« Reply #2 on: July 26, 2013, 08:55:16 PM »
Quote from: Fats;742503
Currently AROS' Semaphore implementation is using Forbid()...

If you AROS developers find it desirable you can change it. Despite what so called eggheads say you can have Forbid() free SignalSemaphore.
« Last Edit: July 26, 2013, 08:58:33 PM by itix »
My Amigas: A500, Mac Mini and PowerBook