New to learning operating systems and needed some guidance.

387 views
Skip to first unread message

joseph turco

unread,
Oct 25, 2021, 4:22:03 PM10/25/21
to minix3

Hello all,

I have always wanted to learn the guys of an OS, and when i first started using linux over 10 years ago, i thought id be able to that. Boy was i wrong, i was well over my head and had no clue where to start. I dropped the idea for many years, and been hopping around from programming languages to have a satisfaction of being in control of my machine, and telling it do what i want, but i just get bored and give up half way, as i don't have that passion that drives one to learn a language in full and take advantage of it. Then, a few days ago, i found MINIX. I had only heard of it being used in intel processors (if its not the same thing excuse my ignorance) and was interested in not only being smaller in kernel size, but that a book was made to learn in full. I want to learn MINIX inside and out, and play around and do things with it, mabye get it to work on my old computer and write USB drivers so i can use my keyboard with it. Here is my question:

What prerequisites are required to learn MINIX? from a brief read it seems i should know C as well as hexadecimal and octal,  i know hexadecimal (well binary as well) but not octal. im sure theres more i need to know as well.

Am i over my head? Is this something more for university students to pursue? I can work my way around a linux command line but im not well versed in unix commands/linux commands, so i do know more than average about computer hardware, on how CPUs have registers and how the other parts of a computer interact with the CPU to perform tasks, but at an operating system level, im not 100% well versed.

Any suggestions or help would be much appreciated. Many thanks.

Regards,

Joseph Turco

Jonathan

unread,
Oct 25, 2021, 5:30:39 PM10/25/21
to minix3
Hello. I sadly cannot help since I don't really know the details myself, but I just wanted to say that I'm in pretty much the same boat as you are. (I took an operating system course at my college and loved it, but no implementation details were really covered. I wanted to see what it's like under the hood, but I really don't understand much of the code I've seen so far.) That being said, if anyone with some experience has a good answer for where to get started and how much prerequisite knowledge needs to be known and where to find it (especially the more esoteric details), I'd love to be informed.

stux...@gmail.com

unread,
Oct 25, 2021, 6:22:32 PM10/25/21
to minix3
Hi Joseph and Jonathan,

Welcome to the Minix Google group!  As someone who is interested in reviving the Minix project I'm somewhat in the same boat where I want to learn more about OS development in order to contribute to the project.  Hopefully the information I've gleaned over the years can serve as a guidepost pointing people in the right direction.

To start, here's a gist I share on IRC with those interested in contributing to the Minix project.  It contains links to the Minix OS book, the Minix wiki and the OS Dev wiki which I find helpful:
With regards to what kind of background information is required to contribute to development of the Operating System itself, I'd suggest the following:
  • Thorough understanding of the C programming language is a must.  Most of the code is written in C.  The rest is some assembly and shell scripts.
  • If you were taking a college course, a Computer Architecture course would be most helpful.  Knowledge of how the hardware is organized is important when designing the most critical parts of the OS (from Minix's viewpoint this would be the kernel, services and drivers).  Although hardware changes very quickly, how the different pieces communicate with each other hasn't changed all that much (*probably).
  • An Operating Systems course can help too. I didn't have the opportunity to take one but such a course would teach how the different parts of the operating system work with each other in concert. In Minix, this would translate to how the different services communicate with each other (message passing IPC), but also system call dependencies (when writing to a file, all the services work in concern to move the data from RAM to the device via VFS, the device driver and anything in between), memory management, process management and scheduling, privilege rings (user space code vs kernel space), I/O (tty, networking, IO buses, device drivers) and user interfaces.  Most likely this course would use the Minix book in the link above for its course material.
  • Knowledge of compilers (perhaps via a compilers course) is also very important!  An OS is heavily dependent on the compiler used to build it.  Obviously the OS's code is written in a language that the compiler must understand (in our case, C), but all of the code will use and be linked to the provided library (Minix's libc), the compiler must write the code to a specific executable format (ELF , which all Minix executables must be compiled to), and even some security components depend on compiler features (ASLR in Minix is heavily dependent on LLVM facilities). 
  • To support these, solid understanding of Data Structures is an important foundation when working with the above elements as well.
  • Finally, I think the icing on the cake would be experience: they say the devil is in the details and there's a *lot* of details when it comes to OS development (the above is just an overview).  There is a lot to learn, but experience doesn't come out of nowhere: you gotta do things one at a time in order to build up one's repertoire.  Fortunately, from what I've heard the microkernel design makes it easier to jump into things, since for example bugs in drivers wouldn't bring the entire system down (unless it was a critical driver) and tests can be performed without having to reboot. 

I hope this outline gives a picture of what is needed to contribute to OS development.  If it seems daunting I can only recommend learning and/or tackling one small piece at a time.  There are also other projects out there aimed at providing simpler or more restricted OS models also aimed at learning OS design.  If interested I can try to gather up some of those links at a later point in time.  Feel free to ask any questions regarding the above items as well.


Cheers,

-stux

joseph turco

unread,
Oct 25, 2021, 6:46:13 PM10/25/21
to min...@googlegroups.com
Thanks for the response stux,


I think learning C is what I'll do first. I'm actually going to do it in the MINIX VM I have running on my raspberry pi, but I eventually want to get it running on the old computer I have (if ps2 works with MINIX that is for the keyboard). You are right to say that experience is going to be needed, and I plan on getting to that point. I know time will be required as well. I hope to get to the point that I can understand the book and get on with learning the OS, and do things the gurus did/do lol. I'll check out your gist as well. 

Regards,

Joseph Turco

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/minix3/818fd732-2281-4941-bdd3-5088e2f07fc6n%40googlegroups.com.

stux...@gmail.com

unread,
Oct 25, 2021, 7:13:03 PM10/25/21
to minix3
You're welcome.

Although not an endorsement, this book has been recommended as a decent (and free) online book:
Highly recommended by many is the K&R book:

And unfortunately Minix does not support USB, so PS2 mouse and keyboard are required when running on physical hardware!

BTW, I'm curious how you got Minix to run on an rPI? Is it an x86 emulator or a BBB emulator using KVM ?

-stux

joseph turco

unread,
Oct 25, 2021, 7:58:50 PM10/25/21
to min...@googlegroups.com
Thanks for the links. Funny you mention the K&R C book. I have my fathers ANSI C K&R from the 90s that I have never bothered to read. I was going to read C primer, but this might be an excuse to crack it open and read it. I plan to use a PS2 keyboard. And yes, im using an x86 emulator called qemu. there is a guide on MINIX3's site explaining how to setup a VM with qmeu, just ignore the parts about KVM, as its not available for raspbian (might be arm in general).

regards,

Joseph Turco

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.

Jonathan Katz

unread,
Oct 26, 2021, 9:38:04 AM10/26/21
to min...@googlegroups.com
Thanks stux. I've taken a bunch of those courses as an undergrad, though we covered interpreters instead of compilers and we only did parts of a typical operating system instead of the whole thing. I also bought the Minix book, though that's from 2006 so it's pretty old. How would you say Minix 3 compares to other educational operating systems like xv6 and xinu? 

--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.

Peter Shkenev

unread,
Oct 26, 2021, 9:56:29 AM10/26/21
to minix3
Hello everyone!

I'm learning OSDev too. I use guidelines provided here: https://wiki.osdev.org/Introduction, https://wiki.osdev.org/Required_Knowledge, https://wiki.osdev.org/Beginner_Mistakes, and, in general, the rest of wiki.osdev.org. They also provide a list of books: https://wiki.osdev.org/Books, however, there are newer editions of listed books available.

On xv6 vs Minix 3: xv6 is much, much easier than Minix 3, since the former is designed for educational purposes, while the latter aims to be full-fledged, modern microkernel OS (unlike Minix 1 and Minix 2, which are also educational systems and they are simpler than Minix 3). Anyway, due microkernel architecture, Minix 3 is still simpler than, let's say, Linux and still suitable for education purposes.

Best regards,
Peter

вторник, 26 октября 2021 г. в 16:38:04 UTC+3, Jonathan:

Jonathan Katz

unread,
Oct 26, 2021, 10:17:04 AM10/26/21
to min...@googlegroups.com
Thanks for your reply. One more question: I've never really programmed on the bare metal before and so I don't really know the more system-centric CPU things (like interrupt descriptors, virtual memory layouts, multi-tasking related CPU structures, etc.). Is there a book you'd recommend to learn that stuff beforehand, or is that all covered in the Minix book?

Peter Shkenev

unread,
Oct 26, 2021, 10:22:18 AM10/26/21
to minix3
Hello Jonathan,

I'm reading "Modern Operating Systems" by Andrew S. Tanenbaum. It is more theoretical, but it covers all principles, so then it's easy to understand how to interact with specific hardware. "Operating Systems: Design and Implementation" aka Minix book also covers these topics, but it is more Minix-centric (less general theory, more discussion of Minix internals).

Best regards,
Peter

вторник, 26 октября 2021 г. в 17:17:04 UTC+3, Jonathan:

joseph turco

unread,
Oct 27, 2021, 2:50:10 AM10/27/21
to minix3

Thanks for the links Peter, for now ill learn C then move onto the minix3 book. Im actually programming inside minix3 to get the "full experience".

Ssessaazi Phrunsys

unread,
Oct 27, 2021, 4:32:45 AM10/27/21
to min...@googlegroups.com
I also loved minix. But I now strictly emphasize that learning from a newer version of minix is BS. Rather I have rewritten the minix book version backend in GAS. So you can compile the sources using any version of GCC. Inbox me if you are interested in the sources.


--
You received this message because you are subscribed to the Google Groups "minix3" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minix3+un...@googlegroups.com.

joseph turco

unread,
Oct 27, 2021, 4:02:48 PM10/27/21
to min...@googlegroups.com
Thanks for sharing your opinion. 

Peter Shkenev

unread,
Oct 29, 2021, 1:25:09 PM10/29/21
to minix3
Hello Phrunsys,

Can you elaborate on your workings?

Best regards,
Peter

среда, 27 октября 2021 г. в 23:02:48 UTC+3, italian...@gmail.com:

Ssessaazi Phrunsys

unread,
Dec 31, 2021, 7:24:11 AM12/31/21
to min...@googlegroups.com
The main reason why minix seems not a commercial success is the tool it was written in. The book version of minix is sufficient enough to beat the Linux kernel 4.+ But the problem is the ideas expressed in the book source tend to blemish by the fact that it is written in an inferior and infamous tool (ACK). I personally I've been trying to build Ack from scratch keeping the portability of all code conventions and adding more gcc-like features but in vain. So I'm building a New language _sCpel++_ as a gcc/++ fork. And I managed to pass some time by rewriting minix 3 book source in gcc 5+, compiled and ran on debian 8 Jessie xfce qemu. But the iso can also be booted From a USB stick. I've in short layed a new foundation for Minix.

Peter Shkenev

unread,
Dec 31, 2021, 11:52:18 AM12/31/21
to minix3
Hello,

> The book version of minix is sufficient enough to beat the Linux kernel 4.+
What do you mean by 'sufficient to beat'?

> ideas expressed in the book source tend to blemish by the fact it is written in an inferior and infamous tool (ACK)
Minix is written in C, not ACK. ACK is C compiler. Currently Minix is compiled with gcc or clang. And how ideas are interconnected with compiler?

Can you share your sources?

Best regards,
Peter

пятница, 31 декабря 2021 г. в 15:24:11 UTC+3, ssessa...@gmail.com:

Ssessaazi Phrunsys

unread,
Dec 31, 2021, 3:27:33 PM12/31/21
to min...@googlegroups.com
It takes a month of serious development to develop minix + a gui. The portability side only takes an isolation of specific platform drivers annd a controller chip. If only the system task could be isolated as the core part of different type microchip. ±256702651600 WhatsApp and join the development

Peter Shkenev

unread,
Jan 1, 2022, 12:52:21 PM1/1/22
to minix3
Hello,

Can you share your source? I'm interested in open source development only.

Best regards,
Peter

пятница, 31 декабря 2021 г. в 23:27:33 UTC+3, ssessa...@gmail.com:
Reply all
Reply to author
Forward
Message has been deleted
0 new messages