Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That neat message passing design is also what made memory protection impossible, even on later versions of the OS. Sending a message from one task to another was really just sending a pointer, giving the receiver permission to use some of the sending task's memory temporarily. That's why it was so fast. Nothing was actually being sent. Still, it was cool stuff.


Using an OS with memory protection between processes doesn't make it impossible to use shared memory regions to pass messages between processes efficiently. Around twenty years ago, I worked on a project that built support for various telephony protocols on AIX. Amongst other things, we used System V IPC and shared memory to send signalling information and voice data between processes. We were able to achieve fairly low latencies using this approach; I don't remember the precise numbers but this was the sort of system where a few 10s of ms of latency would give the user a noticeably worse experience. Admittedly, this was on much more powerful hardware than the original Amiga (by this time, we had PowerPC CPUs running at hundreds of MHz) but I don't see why it couldn't have worked on older hardware.


Yes, sorry, I should've clarified that newer AmigaOS versions couldn't add memory protection without breaking compatibility with old apps, due to weaknesses in the APIs.


Got it, sounds like I misunderstood the point you were making there. Makes sense (and tbh that's a problem that afflicts most of the personal computer operating systems from that era).


Pointers and (library) code were shared all over the place, not just in the message passing system. Still, on a modern CPU you could certainly do an implementation that either copies small messages, or just passes an entire page for a longer message. You'd need some kind of special AllocMsg function that takes the size of the message you want to send, let the OS decide if it should be sent by remapping a page or by copying.


Don't modern OS's use page-based COW anyways for large copies?


Probably; it makes a lot of sense for large transfers.


Not really, QNX and Android do it quite easily with memory protection.


I should have clarified. It couldn't be done with out breaking compatibility with existing apps. If I recall, Amiga Exec's "PutMsg" didn't even take a message length, just a pointer (message) and a port name.


Amiga broke compatibility with existing apps across hardware releases anyway, so?


Exec PutMsg / GetMsg is rather foundational. If they changed it, everything would break. With Amiga OS, if you wrote your apps to API spec, compatibility was rarely broken. I remember those big "Rom Kernel Reference Manual" books! I think I still have one collecting dust, at my parents house.

But yeah, if you did weird things like mucking with hardware registers directly or used undocumented fields of a struct, then yeah, you could have a problem.


Changing graphics and sound chips was more fundamental than OS APIs.


Indeed, that did happen with some games, especially with the newer CPUs. I remember my A3000 didn't run a bunch of stuff that worked on the 500. I wasn't sure if that was due to the ECS chips or the 68030.


No, that's not true. Both the hardware and the OS remained compatible, although enough differences crept in that applications could get into trouble anyway.

One common problem was when applications assumed all memory was reachable by the custom chips; the later addition of fast ram (which was ram that wasn't slowed down by custom chips accessing it, thus starving the CPU of memory cycles) could break those. Another example is using the upper 8 bits of pointers, which was safe on 68000 but not on 68020 and up which had a full 32-bit address bus. Making assumptions about OS structures was also a favorite of many hackers, and something that invariably broke on later OS releases. However, if you stuck to the API you were fine, and many applications run without problems on all OS releases from 1.2 to 3.1.


There were three generations of graphics hardware and sound chips, anyone doing any kind of serious use of them had to recode their applications to take advantage of the new capabilities.


Afaik there was ever only one Paula.



rasz was still correct about Paula though. The sound chip didn't change.

Too bad AGA was too little, too late. If it was released a few years sooner, say with the A3000, it might've been different. ECS barely added anything over OCS, other than extra chip RAM. There were a few modes hardly anyone used.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: