2,010 karma · joined October 20, 2019
Now we have RISC-V reinventing the wheel. Not the worst outcome, but we could have had it so much better...
- Intel 8088
"8/16-bit microprocessor — 8-bit registers with a 16-bit data bus."
(it's the other way round - and why is the 8086 not mentioned here?)
- Motorola 68k "Atari and Commodore use this chip architecture"
Not at the time the Mac was developed
"Prior supplier relationship with Motorola through the Apple I, Apple II"
While the Apple I could also use a Motorola 6800 instead of a 6502, this was quite uncommon
I also think the "totally-not-stolen graphical user interface" comment is not a good idea in the context of this article, especially without further information (the text links to an article about Xerox)."It took 24 years, but in 2023, MacOS Darwin closed the doors on its BSD-licensed origins."
I have no idea what the author is talking about here - source for the open components of macOS is available at https://opensource.apple.com/releases/ (latest release is 14.5) and the last update to the XNU kernel github mirror (https://github.com/apple-oss-distributions/xnu) happened about 5 months ago.
More details at https://www.theregister.com/2024/08/07/riscv_business_thead_...
The Minix book explains details of Minix 3 (file system, memory management etc.) and gives a listing of the Minix kernel, but does not really explain how to write a system from scratch.
Comer's Xinu book is much better suited for this, it uses sort of a literate programming approach mixing code pieces and the related descriptions. However, Comer's books are rather old by now and the most modern architecture covered is MIPS.
If you want to start from the ground up, i.e. setting up a (cross-)compiler toolchain, building a kernel that boots with your bootloader of choice, starting with "Hello world" and then proceeding to syscalls, interrupt handling, cooperative and preemptive multitasking, virtual memory, etc., then Stephen Marz' blog is a better resource.
You could also check out the lecture slides for my operating systems engineering course if you're interested. In this (master level) course, we build a small preemptive multitasking OS with virtual memory for RISC-V from scratch in C: https://multicores.org/ose/
For a hands-on view on building operating systems, I can recommend taking a look at xv6 [1] as the next step. This is a modern reimplementation of a subset of the 6th edition Unix, running on RISC-V in its current version (an older version targeted x86) [2].
The classical textbooks used in OS courses (Tanenbaum's "Modern Operating Systems", Silberschatz' "Operating System Concepts" and Stallings' "Operating Systems") are more on the theoretical side, whereas Tanenbaum's Minix books are more hands-on. A current, somewhat more hands-on, textbook is "Operating Systems: Three Easy Pieces" by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau. Additional bonus - it's free [3].
For more hands-on resources, there's a lot of material available. osdev.org [4] provides lots of OS development knowledge in wiki form, Stephen Marz' "The Adventures of OS: Making a RISC-V Operating System using Rust" [5] is a hands-on course written as a series of blog posts to build your own OS for RISC-V (but it needs to be updated since RISC-V has changed in some details since the articles were published). I learned about OS theory and practice using Doug Comer's Xinu books [17] and I still think these are very useful.
You can then dig into older Unix(-like) systems, e.g. BSD [6,7] and/or check out more modern approaches such as Microkernels (I can especially recommend L4, starting from Jochen Liedtke's papers [8] and checking out work on seL4 [9]), capability-based systems (CHERI [10] and an old, but good overview book on capability architectures [11]), or - for something a bit more exotic - Plan 9 [12].
If you want to gain an insight into commercial operating systems, there are a number of interesting books on Apple's OS X and iOS [13,14], Windows [15] and even VMS [16].
[1] https://github.com/mit-pdos/xv6-riscv/
[2] Russ Cox, Frans Kaashoek, Robert Morris
xv6: a simple, Unix-like teaching operating system
https://pdos.csail.mit.edu/6.S081/2020/xv6/book-riscv-rev1.pdf
[3] https://pages.cs.wisc.edu/~remzi/OSTEP/
[4] https://wiki.osdev.org/Main_Page
[5] https://osblog.stephenmarz.com
[6] Marshall Kirk McKusick , Keith Bostic, Michael J. Karels
The Design and Implementation of the 4.4BSD Operating System
Addison Wesley, ISBN-13: 978-0201549799
[7] Marshall Kirk McKusick, George V. Neville-Neil, Robert N.M. Watson
The Design and Implementation of the FreeBSD Operating System
Addison Wesley, ISBN-13: 978-0321968975
[8] https://en.wikipedia.org/wiki/L4_microkernel_family
[9] https://sel4.systems
[10] https://www.cl.cam.ac.uk/research/security/ctsrd/cheri/
[11] Henry M. Levy
Capability-Based Computer Systems
https://homes.cs.washington.edu/~levy/capabook/
[12] Francisco J Ballesteros
Notes on the Plan 9 3rd edition Kernel Source
http://www.r-5.org/files/books/computers/internals/unix/Francisco_Ballesteros-Notes_on_the_Plan_9_Kernel_Source-EN.pdf
[13] Amit Singh
Mac OS X Internals: A Systems Approach
Pearson 2006, ISBN-13: 978-0-321-46795-9
[14] Jonathan Levin
*OS Internals (Volume I: User Mode, Volume II:Kernel Mode, Volume III: Security & Insecurity)
https://newosxbook.com/home.html
[15] https://learn.microsoft.com/en-us/sysinternals/resources/windows-internals
[16] VAX/VMS Internals and Data Structures
http://www.bitsavers.org/pdf/dec/vax/vms/training/EY-00014-DP_VMS_Internals_and_Data_Structures_1984.pdf
[17] https://xinu.cs.purdue.eduOther Microsoft products of the time, such as Commodore BASIC V2 used in the C64, were not that great, though the compilers for CP/M were quite OK.
Everything developed by Microsoft after the early 80's... let's not talk about that :). My work environment is Microsoft-free since I stopped using my C64 and Apple II for everyday tasks and I'm happy to own some computers for which Microsoft never published any software - NeXT workstations.
“Develop for it? I'll piss on it.” – Bill Gates, in response to InfoWorld asking if Microsoft would develop applications for the NeXT Computer.
I thought that the Atari ST was another platform without Microsoft software, but there was a version of Microsoft Write published in 1987 (https://www.atarimania.com/utility-atari-st-microsoft-write_...).
We continued to hack on the 68000 - the Atari ST series was very popular in Germany (the Amiga and Mac were much more expensive) - and some Motorola 6809 projects instead.
I learned to love the Z80 last year when I built some ZX81 and Spectrum clones with my students. And now the Z80 is sadly discontinued while you can still buy new 6502s…