12 ms·
Ah the funny things we resad about in 2020. In 1985... yes I said 1985, the Amiga did all I/O through sending and receiving messages. You queued a message to t
by pierrebai 6y ago
Ah the funny things we resad about in 2020.
In 1985... yes I said 1985, the Amiga did all I/O through sending and receiving messages. You queued a message to the port of the device / disk you wanted, when the I/O was complete you received a reply on your port.
The same message port system was used to receive UI messages. And filesystems, on top of drive system, were also using port/messages. So did serial devices. Everything.
Simple, asynchronous by nature.
As a matter of fact, it was even more elegant than this. Devices were just DLL with a message port.
- beagle3 6y agoAnd it worked, well, with 512K memory in 1985. The multitasking was co-operative, and there was no paging or memory protection. That didn't work as well (But worked surprisingly well, especially compared to Win3.1 which came 5-6 years later and needed much more memory to be usable). I suspect if Commodore/Amiga had done a cheaper version and did not suck so badly at planning and management, we would have been much farther along on software and hardware by now. The Amiga had 4 channel 8-bit DMA stereo sound in 1985 (which with some effort could become 13-bit 2 channel DMA stereo sound), a working multitasking system, 12-bit color high resolution graphics, and more. I think the PC had these specs as "standard" only in 1993 or so, and by "standard" I mean "you could assume there was hardware to support them, but your software needed to include specific support for at least two or three different vendors, such as Creative Labs SoundBlaster and Gravis UltraSound for sound).
- pjmlp 6y agoWe have to "thank" Compaq for it as well. Even with all its management flaws, the Amiga might have survived without the mass production of PC clones.
- icedchai 6y agoAmiga multitasking was actually preemptive. It was only cooperative in the sense that all processes / tasks were in the same address space and without memory protection...
- jswny 6y agoBetween the preemptive multitasking and purely message-based communication it sounds a lot like Erlang.
- atombender 6y agoSomething else that's mentioned less than the hardware side is AmigaDOS and AmigaShell, which were considerably more sophisticated than MS-DOS, and closer to Unix in power (e.g. scripting, pipes, etc.). The fate of Amiga is so infuriating. It's mind-boggling to think how Microsoft was able to dominate for so long with clearly inferior technology, while vastly superior tech (NeXT, Amiga, BeOS) lost out. There are many such unhappy stories, and I often think about the millions of hours spent on building tech that should have conquered the world, but didn't. The macOS platform is a rare incidence of something (NeXT) eventually winning out, but the Amiga was a different kind of dead end.
- kstrauser 6y agoMy first Linux box felt pretty comfortable after cutting my teeth on an Amiga's shell, which was largely inspired by Unix and still similar enough in concepts to make the transition easy.
- nwah1 6y agomacOS may have technical advantages, though less and less over time. But it always had a dramatically more restrictive business model from the very beginning. This is what made it unattractive to business and continues to make it unattractive to many. The restrictiveness of Apple is likely an advantage for novice mobile users, and other vendors copied it.
- eecc 6y agoTrue, but as I read from more knowledgeable sources than myself, the problem of the Amiga was that the software was intimately linked to and effectively exposed hardware implementation details. This made upgrading chips nigh impossible without full software rewrites, which ultimately caused stagnation. Indeed, as an A500 kid I used to laugh and was horrified by my first PC...
- gpderetta 6y agoI think the multitasking was actually preemptive. But yes, it had no memory protection: the message passing infrastructure relied on it and it would have been very hard to retrofit even on cpus with an MMU (although I think recent versions might have actually tried).
- flohofwoe 6y agoMinor nitpick: The Amiga had preemptive multitasking (and thus didn't depend on user code to willingly give up their time slice, in that regard it was more like UNIX, and unlike early Windows and MacOS versions).
- vram22 6y agoAnother amazing thing is that Carl Sassenrath, creator of the Amiga OS kernel, also went on to create the REBOL language, which seemed quite innovative too - I've checked it out some - though it is kind of dormant now, and now there is the Red language, based somewhat on REBOL. https://en.m.wikipedia.org/wiki/Carl_Sassenrath https://en.m.wikipedia.org/wiki/Carl_Sassenrath
- bsder 6y agoAll this fuss because Linux wouldn't just implement kQueue ... Sigh.
- cyphar 6y agoSolaris didn't port kqueue either. We're doomed to reinvent the wheel.
- bsder 6y agoAnd Bryan Cantrill has expressed quite a bit of remorse about that.
- pengaru 6y agoPlease explain to me how kqueue facilitates submitting arbitrarily large numbers of syscalls to the kernel as a single syscall, to be performed asynchronously no less. Even potentially submitted using no syscall at all, in polling mode.
- gpderetta 6y agoLinux should have had kqueue instead of epoll. But io_uring is a different thing.
- cycloptic 6y agoAFAIK it's unnecessary at this point, Linux has most of the equivalent functionality and there is a shim library for it: https://github.com/mheily/libkqueue https://github.com/mheily/libkqueue
- gpderetta 6y agoyes, these days you can get a file descriptor for pretty much everything so epoll is sufficient. I think that epoll timeout granularity is still in milliseconds, so if you want to build high res timers on top of it for your event loop you have to either use zero timeout polling or use an explicit timerfd which adds overhead. I guess you can use plain ppoll (which has ns resolution timeouts) on the epoll fd.
- ww520 6y agoI remember NetWare's IPX/SPX network stack used a similar async mechanism. The caller submits a buffer for read and continues to do whatever. When the network card receives the data, it puts them in the caller's buffer. The caller is notified via a callback when the data is ready. All these were fitted in a few K's of memory in a DOS TSR. All the DOS games at the time used IPX for network play for a reason. TCP was too "big" to fit in memory.
- InafuSabi 6y agoA friend of mine was amazed by this capability of the Amiga when I showed him that on one screen I could play mod.DasBoot in NoiseTracker, pull the screen down partly then go on the BBS in the terminal by manually dialing atdt454074 and entering, without my A500 even skipping one beat... All I had was the 512kB expander, he had a 386 with 387 and could only run a single tasking OS
- tinus_hn 6y agoLinux was originally built for the 386.
- icedchai 6y agoHe could've done the same thing with DOS if he bought DesqView. That let you multitask multiple DOS applications on a 386.
- gmueckl 6y agoNot quite. The multiple screen thing allowed several full screen graphical applications with different resolutions on screen at once, divided by a vertical barrier (a title bar similar to those on windows). This was a hardware feature at its core, if memory serves me right.
- icedchai 6y agoYes, I remember the screen feature on my A500. It was neat. To say a 386 is limited to single tasking is wrong though. That was my main point.
- gens 6y agoWhen you want to squeeze every bit of performance out of a system, you want to avoid doing system calls as much as possible. io_uring lets you check if some i/o is done by just checking a piece of memory, instead of using read, pool, or such.
- agumonkey 6y agoOne thing that doesn't change is that every decade people will look at the Amiga and admire it the same no matter how much ~advances have been made since.
- nonesuchluck 6y agoPurely for entertainment, what is the alternate history that might have allowed Amiga to survive and thrive? Here's my stab: - in the late 80s, Commodore ports AmigaOS to 386 - re-engineers Original Chipset as an ISA card - OCS combines VGA output and multimedia (no SoundBlaster needed) - offers AmigaOS to everyone, but it requires their ISA card to run - runs DOS apps in Virtual 8086 mode, in desktop windows or full-screen
- gpderetta 6y agothe reverse was actually possible: there were PC compatible expansion cards for the amiga [1]. The issue is that they were very expensive and 8088 only. [1] for example: https://en.wikipedia.org/wiki/Amiga_Sidecar https://en.wikipedia.org/wiki/Amiga_Sidecar although "card" is stretching it :)
- nonesuchluck 6y agoYes, those PC Card addons for Mac/Amiga/etc are endlessly fascinating to me. But with the benefit of hindsight, the crucial factor wasn't just being able to run DOS applications on your fancy propriety computer, it was riding the PC Compatible rocketship as it blasted off. Creative Labs and 3Com and Tseng and many others showed that there was more value in manufacturing a popular expansion in the massive PC world than in owning your own closed platform bow-to-stern.
- icedchai 6y agoThey did make a 286 and 386SX Bridgeboard: https://bigbookofamigahardware.com/bboah/product.aspx?id=329 https://bigbookofamigahardware.com/bboah/product.aspx?id=329 https://bigbookofamigahardware.com/bboah/product.aspx?id=330 https://bigbookofamigahardware.com/bboah/product.aspx?id=330
- gpderetta 6y agoNice. I did not know those.
- amelius 6y ago> Devices were just DLL with a message port. Reminds me of: https://en.wikipedia.org/wiki/Unikernel https://en.wikipedia.org/wiki/Unikernel
- StreamBright 6y agoJust like Erlang + receive.
- tyingq 6y ago"In 1985... yes I said 1985, the Amiga did all I/O through sending and receiving messages" I do remember that, and it was cool. But, lightweight efficient message passing is pretty easy when all processes share the same unprotected memory space :)
- orclev 6y agoL4 uses a similar model, and the last ~20 years of research around L4 has mostly focused on improving IPC performance and security. The core abstraction is a mechanism to control message passing between apps via routing through light weight kernel invocations (which is indeed practically the only thing the kernel does, it being a microkernel architecture). Memory access is enforced, although not technically via the kernel. Rather at boot time the kernel owns all memory, then during init it slices off all the memory it doesn't need for itself and passes it to a user space memory service, and thereafter all memory requests get routed through that process. L4 uses a security model where permissions (including resource access) and their derivatives can be passed from one process to another. Using that system the memory manager process can slice off chunks of its memory and delegate access to those chunks to other processes.
- Upvoter33 6y agoThis over-romanticizes Amiga (a beautiful system no doubt) because there have been message-passing OSes since the 1960s (see Brinch Hansen's Nucleus for example). The key difference with io_uring is that is an incredibly efficient and general mechanism for async everything. It really is a wonderful piece of technology and an advance over the long line of "message passing" OSes (which always were too slow).