Amiga.org
The "Not Quite Amiga but still computer related category" => Alternative Operating Systems => Topic started by: larsef on September 22, 2006, 07:08:08 PM
-
My dream would be to see a new, open source, operating system for the classic 68k Amiga, which would be backward compatible with at least AmigaOS 3.1 applications, but which goes beyond 3.1. This dream OS would have memory protection (and thus demand an MMU). It should also be easy to port this OS to other systems such as x86 or ppc. With a 68k emulation layer, it would then be possible to run Amiga 68k applications on intel in the same way as you can run ppc applications on an intel Mac.
Look at the Atari ST: First, they had TOS which was really bad. It did not even have true multitasking. Then, someone released a free TOS compatible OS kernel (called MiNT) with true multitasking. Atari later made MultiTOS, which was based on MiNT and had both multitasking and memory protection. I don't know if memory protection was already built into MiNT or if Atari added it to MultiTOS. MultiTOS was used for the Falcon computer. Today, the Atari community has FreeMiNT, the natural successor to MultiTOS, and XaAES as its graphical user interface. Both FreeMiNT and XaAES are open source.
As far as I know, not even OS4 has memory protection today. FreeMiNT has! It seems like the open source Atari ST community is larger than the Amiga community and they have better software. Isn't that strange, given how many Amigas that were sold and given the number of users we are today?
I wonder if FreeMiNT, being a 68k operating system, could be ported to the Amiga? Not that it would make me happy, I want to run Amiga applications, but it seems like FreeMiNT is actually just a Unix kernel. TOS compatibility must be added on somehow to FreeMiNT. In that case, would it be possible to add an AmigaOS layer to FreeMiNT?
Another, even better solution, might be to add AmigaOS compatibility to NetBSD?
-
You can't have memory protection in AmigaOS. If you add the protection by isolating the applications, you will also isolate the applications from each other, making the whole thing kind of pointless.
Anyway, this has been discussed million times before.
FreeMiNT should have no problem running on Amiga, except that it doesn't naturally run any Amiga apps.
-
Although I have read it before, I don't understand why it's impossible to add memory protection. What is the problem with isolating the applications from each other?
-
I don't understand why it's impossible to add memory protection.
AmigaOS message passing is passing pointers. To work, both applications must live in the same address space. Also, various resources are allocated by task a, and freed by b or even c. It's common practice to alter variables "owned" by another task. This makes AmigaOS very light and snappy, but means it's practically impossible to impose any kind of memory protection restrictions on it, without breaking most of the apps.
What is the problem with isolating the applications from each other?
The fact that the tasks would be isolated and the OS/apps would not work at all.
-
larsef wrote:
Although I have read it before, I don't understand why it's impossible to add memory protection. What is the problem with isolating the applications from each other?
The whole amiga system is build up around message passing between tasks. It was assumed that data generated in one task is accessible by other tasks. Taking this feature away makes the whole system fall apart.
Although I still have a plan in the back of my mind about a single address space but with different access rights for different tasks.
greets,
Staf.
-
AROS. Nuff said. We're all in favour of memory protection, and some of us even to the point of burning all bridges to classic amiga. Why? Because we believe in the AmigaOS, not focusing on the OS API and old times. We like the elegance in simplicity, without mentioning what's under the hood (even though, AROS, is very much alike AmigaOS underneath the hood...)
What you are looking for is called AROS. Just help us out! We need your help. We're Open Source, and we're AmigaOS 3.1 remade.
-
@Fats, Piru: but if aos4 works in a diferend way (afaik) how come and the 68k progs working on it? progs code affects only the cpu enviropment or depends from the os too? sounds greek(!) to me all these but i realy would like to know what's all about.
-
This morning I downloaded AROS build 0.4.8 and created a self booting native CD from the ISO. I dropped the CD in the tray and rebooted my Sony widescreen laptop. AROS came right up and there I was staring at what looked like AOS 3.1. In wide screen! All I can say is WOW! The desktop is beautiful! It even had a browser...(Mosaic) although it did not recognize my ethernet port (I didn't fiddle with it much though). There was a config screen at bootup but I must not have pressed a button or something as it was displayed for only about 10 seconds. I'm going to take this home a play with it on an older piece of hardware and read the docs. This is awesome! Does anyone know if the browser works if I manage to get TCP/IP working? Networking? All the old games will work on it too! And, it comes with a ton of software and games! And yes, this morning is the first time I messed with it... This will peak my interest for awhile. I'll comment again after I play with it more. :-D
Edit: BTW, the entire OS ran right from the CD! No install required! Although, HD install would be prefered.
-
AOS 4 works in the SAME way. It has partial memory protection (as does MorphOS) to protect UNALLOCATED memory and some SYSTEM memory areas ONLY.
Switching to an isolated address space for each app would absolutely KILL performance since not only would we need a new message-passing system like QNX uses, but we wouldn't be able to use shared libraries. IIRC UN*X, and its clones load a separate copy of the .SO file into each address space so it wastes a TON of memory. Windows and MacOSX are no better when it comes to memory management.
In short: Amiga is fast and performs well BECAUSE it doesn't use full memory protection. That's the hand off. Do you want security or do you want speed?
-
SamuraiCrow wrote:
Amiga is fast and performs well BECAUSE it doesn't use full memory protection. That's the hand off. Do you want security or do you want speed?
clear enough, thanks. this could mean too that a more carefull and ''by the book'' programming can give better os/progs stability in a way that memory protection is useless?
-
@amije
this could mean too that a more carefull and ''by the book'' programming can give better os/progs stability in a way that memory protection is useless?
It is true that coding for non-protected environment tends to produce programmers that are more careful about error checking and freeing resources.
Yet, some sort of protection is desirable while coding. It reduces the frustration by preventing endless reboot cycles, and it gives nice early trapping of misbehaving program.
For end user the memory protection mostly means some nasty cryptic "segfault" or "This program has performed an illegal operation and will be shut down" message. The memory protection doesn't really benefit the end user much, except that it prevents data corruption between processes (the app can still corrupt its own data as much as it likes!).
-
SamuraiCrow wrote:
IIRC UN*X, and its clones load a separate copy of the .SO file into each address space so it wastes a TON of memory.
This is not true. The .so will only be in the physical memory once but mapped to different virtual addresses in different memory spaces.
greets,
Staf.
-
Surely AROS is the de facto OS3.1 compatible Open Source OS?
Whilst it might not be binary compatible, it is source level compatible isn't it?
-
You can't have memory protection in AmigaOS. If you add the protection by isolating the applications, you will also isolate the applications from each other, making the whole thing kind of pointless.
I am not a programmer, but i think what you mean is that you cannot have full memory protection while at the same time having full compitability with old applications? If this is the case, then i think we should have a option to turn on memory protection when you dont need backwards compitability with older apps.
I dont see how new apps should suffer from this problem? Once you have a decent amount of native software this should not really be much of an issue.
-
@Tomas
No you really can't have any effective memory protection if you intend to use AmigaOS. It's not just applications, it's the OS itself. You'd need to totally rewrite the OS and the apps. Then it wouldn't be AmigaOS anymore, though.
-
Piru wrote:
@Tomas
No you really can't have any effective memory protection if you intend to use AmigaOS. It's not just applications, it's the OS itself.
I don't fully agree with this statement. Sure you can't have UNIX style MP where every process lives in it's own adress space. But I think it should be possible to have one adress space but make some of your memory read-only to other tasks. At least this should make it possible to make the core OS uncrashable. Of course programs not using this feature to protect their own memory can still be crashed by other programs that have a wild pointer.
I agree though this will be a major undertaking especially to get it right and performant.
-
@Fats
But I think it should be possible to have one adress space but make some of your memory read-only to other tasks.
This is possible. This is not the problem.
At least this should make it possible to make the core OS uncrashable.
No it doesn't. The core OS depends on being able to poke things freely.
Also, all apps pass their memory to the OS, and the OS assumes it can poke it. Apps pass memory to each other and assume they can access it freely. It just doesn't work, sorry.
The best semi-protection can be achieved from mmu.library (http://www.aminet.net/package.php?package=util/libs/MMULib.lha) MuLink, but even that only protects the given code segments against alteration. MuProctectModules can protect RAM loaded modules, but again, this is only protecting the code from alteration.