Live data from Hacker News

Learning operating system development using Linux kernel and Raspberry Pi

s-matyukevich.github.io

31–40 of 40 posts

Re: Learning operating system development using Linux kernel and Raspberry Pi

#31
post #13

In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.

An OS course taught in Python is really just a data structures and algorithms course. When you ignore the hardware aspect, topics like scheduling and virtual memory management are about selecting an algorithm with the appropriate trade-offs.

My OS course was hacking on x86 Linux in C. The C wasn't really the difficult part. Honestly, neither was the assembly, as most of was boilerplate: here's how you configure to registers for a system call, here's how you trigger the interrupt for the system call, here's how you get the return codes, etc.

I don't think the class would have been nearly as valuable if C were replaced with Python. At that point, so many of the interesting details would be hand-waved away that it wouldn't really be all that different from the other programming classes I took.

Re: Learning operating system development using Linux kernel and Raspberry Pi

#32

If you are looking to learn operating system concepts using RPi there is a new textbook by Prof. Vanderbauwhede, under ARM textbook initiative [1]. I think for educational purposes it will be very interesting and useful if someone develop from scratch a simple System V UNIX for RPi based on Bach's description in his seminal book on "The Design of the UNIX Operating System" [2]. The book also covers multi processors t…

I'm interested in that book but I can't tell if I can follow along using a RPi Zero or I need a specific version. Can't find a preview of the book.

Re: Learning operating system development using Linux kernel and Raspberry Pi

#34
post #23
post #22

Earlier quoted context omitted.

Is the ebook of the textbook a regular PDF/epub/mobi or is it only viewable in their viewer apps? The page doesn't say, and I don't want to spend money on it and then realize it's not a real download.

I was curious about that as well. The official ARM site doesn't list one but another distributor lists the related ISBN as epub. https://www.vitalsource.com/products/operating-systems-found...

The "book" you download from this website is not an epub. You must use their apps to read it.

Re: Learning operating system development using Linux kernel and Raspberry Pi

#35
post #32

If you are looking to learn operating system concepts using RPi there is a new textbook by Prof. Vanderbauwhede, under ARM textbook initiative [1]. I think for educational purposes it will be very interesting and useful if someone develop from scratch a simple System V UNIX for RPi based on Bach's description in his seminal book on "The Design of the UNIX Operating System" [2]. The book also covers multi processors t…

I'm interested in that book but I can't tell if I can follow along using a RPi Zero or I need a specific version. Can't find a preview of the book.

They focus on rpi 3b

Re: Learning operating system development using Linux kernel and Raspberry Pi

#36

Might be a bit controversial but I found writing drivers for Linux on my raspberry pi helped me understand kernels, virtual memory etc. I used Linux Device Drivers (ldd3) which is free online. The book was written for the 2.6 kernel but someone on GitHub updated the code for the latest kernels.

This doesn’t seem controversial. It’s how the operating systems class[1] was structured at University of Illinois, though the target was a VM instead of physical hardware. It was easier to reset things when your new scheduler module instantly crashes the OS.

[1]https://courses.engr.illinois.edu/cs423/sp2016/

Re: Learning operating system development using Linux kernel and Raspberry Pi

#37
post #19
post #13

In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.

Actually using C or C++ is the most straightforward painless way to learn kernel dev. C is not complex at all. What you need to learn first is something like what nand2tetris offers, at least the first part. Usually you will have to do some variation of nand2tetris in the first or second year of undergrad.

Correct. Try these two:

https://github.com/DoctorWkt/acwj

https://github.com/cfenollosa/os-tutorial

Re: Learning operating system development using Linux kernel and Raspberry Pi

#38
post #13

In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.

An OS course taught in Python is really just a data structures and algorithms course. When you ignore the hardware aspect, topics like scheduling and virtual memory management are about selecting an algorithm with the appropriate trade-offs. My OS course was hacking on x86 Linux in C. The C wasn't really the difficult part. Honestly, neither was the assembly, as most of was boilerplate: here's how you configure to re…

If the language is boilerplate and the algorithms/data-structures derive from the physical constraints, was the OS course you completed mostly about hardware ?

As to the inciting question, there is a Stonybrook OS course [0] designed around a java simulator that students implement modules for. Springer published M Kifer's book [1] about this OSP2 system. (The binaries are accessible via the link 'Students: Software Download'.) I'm of the impression that the course involves examining the trade-offs of each module. So the thread section spawns a bunch of request events per process for a module to deal with, whether with round robin or priority queues or whatever.

[0] https://www3.cs.stonybrook.edu/~kifer/Courses/cse306/

[1] https://www.springer.com/gp/book/9781846288425

Post reply on HN