Welcome, Guest. Please login or register.

Author Topic: Comparative between AmigaOS 4.1 and MorphOS 2.3 on Pegasos II  (Read 6150 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline platon42

  • Hero Member
  • *****
  • Join Date: Jul 2002
  • Posts: 573
    • Show all replies
    • http://www.platon42.de/
Quote from: Painkiller;519058
Seriously what else could it be as the hardware is the same. Or not bad but just not as good / optimized which makes it bad compared to MOS ;)

As umisef already pointed out, there are lots of things. MMU setup for example. For all I know AOS4 uses the MMU to invoke the 68k emulator when jumping from PPC into legacy code. This causes a context switch which in turn penalizes performance. MorphOS uses a different approach without causing exceptions. So it's better, while the AOS4 way makes it more "comfortable" in from the OS point of view.

Moreover, while both AOS4 and MorphOS have virtual memory, AOS4 needs to keep far more complex MMU tables for their paging stuff -- also not all TLBs fit into cache at the same time, this causes penalities during memory access. I'm not sure, maybe additional complexity comes from the Supervisor mode MMU tables in this case during context switching.

Finally, and ChrisH won't like this: The Slab allocator is inferior to TLSF. That's a fact. Read the publications, do some research. Slab has higher internal fragmentation (i.e. it wastes memory) and because it wastes memory, CPU and L2 caches are not used optimally because the used memory is more sparse. The external fragmentation on TLSF is also very small, but I don't have a comparing figure to the Slab allocator right now. Also I suspect (consider this not confirmed) that due to the paging that AOS4 allows, external fragmentation might be further increased due to alignment restrictions to MMU page sizes (probably paging is disabled for very small allocations). Allocations and freeing are always O(1) on TLSF with the amount of instructions being not significantly higher than other memory allocators, especially since Slab is very complex and I'm fairly sure that Slab is no O(1) allocator (but probably still sub-linear, so this is certainly an improvement over AmigaOS 3.x).

These are all design decisions that have nothing to do with bad coding style. More with design goals and experience. Live with it. AOS4 allows paging, but this makes the system slower overall. Similar to having memory protection on other operating systems and separate address spaces for every process. You gain something, but you lose other stuff.

I dunno why USB is so slow under AmigaOS4, but having seen that Poseidon under AROS also performs "not optimal" for access to USB sticks due to the non-caching implementation of the FAT file system, I'd rather suspect the CrossDOS file system of is worse than the MorphOS implementation there. One could try "scsispeed" to out-rule the filesystem rather than the USB subsystem.
« Last Edit: August 14, 2009, 01:24:31 PM by platon42 »
--
Regards, Chris Hodges )-> http://www.platon42.de <-(
hackerkey://v4sw7CJS$hw6/7ln6pr7+8AOP$ck0ma8u2LMw1/4Xm5l3i5TJCOTextPad/e7t2BDMNb7GHLen5a34s5IMr1g3/5ACM