Not too shy to talk 
Joined: 2020/11/17 12:08 Last Login
: Today 16:42
From Slough
Group:
Registered Users
|
Great thread. I have lots of thoughts on these topics:
POSIX: No reason this can't be done (except for true fork() I suppose), remember POSIX is not Linux and is a subset of what is usually found on Linx. Amiga has had 'POSIX' before in the days before POSIX or SUS was a real thing. Just in those days it was BSD ports, and standard C library for C89. The OS is already pretty closely aligned. GeekGadgets/ixemul is/was basically complete as of about 1992, it's just that after that people gave up and we couldn't keep up. And OS4's toolchain being gcc/binutils based means it is also pretty compatible with the GNU part of the Linux. VBCC's PosixLib and Olaf's clib2 have a pretty good stab at most of the C99 and extended API. We also need pthread, librt, psockets, curses or ncurses, iconv, libdl and all the user-unfriendly commands. the main issue of course is all the stuff commonly found in a linux baseline that is well above and beyond what GNU provides. It's a shame the guy behind AmiWin, MiamiSSL et al is a bit of a jerk and never open sourced his stuff. AmiCygnix however is very much a POSIX environment thats pretty complete for OS4. Shame its not better integrated / part of the OS itself really, although its better than WSL on Windows is.
Browser: AmiBrowser proves there are possibilities here - run the browser engine on a linux slave and render the UI Amiga side. You could actually do this with x11, perhaps AmiCygnix could be made to show firefox running on a slaved rPi or through some kind of rabbithole interface if running inside qemu on a linux host. Endianness is the main issue. I'm surprised no one has tried it before.
SMP: Everyone assumes we need and want SMP to run any thread on any core. But you could equally do what say, PS3 did, which is actually just have different cores running different 'machines' e.g. have one core running the 68k VM, one core running a chipset emulation, one core running say a PPC emulator allowing you to run AmigaOS4 classic or simply warpup for those classic fat binaries. The cores are so fast these days you'd be hard pushed to need more than one for anything other than NLE.
Memory protection: We all know resource tracking and memory protection conflict with the amiga shared memory model. Amiga is a lot like the linux kernel in so far as to avoid context switches affecting performance everything is effectively running in supervisor all the time. The difference is linux manages that by tightly reviewing and testing all kernel code to a very high standard. Whereas any idiot can run what they like on Amiga.
But these features are also a crutch, there for when the software developers missed something, perhaps something obvious, perhaps a rare edge case. But still a crutch. And while modern Windows on ntkrnl is more stable, you still have to reboot windows servers once every 24 hours because of all the memory leaks, so it's not as if it lets you off the hook to write better software.
Personally I think the answer is to build these features into the C runtime. Indeed, the SAS/C libraries include most everything you need to do this. Developers generally didn't use them because either too hard or too much performance impact. The latter we don't have to worry about so much now as I'm sure very serious Amiga user is using at minimum a top end CPU, and more likely an FPGA or software emulation 100x faster than the original and with enormous amounts of RAM. So we can afford to trade a bit of raw speed and probably some memory efficiency for better reliability now.
I can think of ways a future Amiga could implement a memory safe version of its API and retain backwards compatibility though, using 'safe mode' libraries that are actually clients to a server based reimplementation of exec and friends. Something as simple as canary buffers on all system memory allocations for a start.
|