Live data from Hacker News

Learning operating system development using Linux kernel and Raspberry Pi

s-matyukevich.github.io

21–30 of 40 posts

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

#21
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.

You could write a Java based virtual kernel designed to run within the JVM and manage child processes I suppose, but what is the real world utility of such a thing?

Almost everything to do with kernels is about directly writing to memory addresses and ports and these things can't be done with a managed language, at least not without a significant runtime doing all the grunt work, at which point you'll need to understand much of the runtime's internals and at that point, you may as well have started out with a small C/C++/Rust kernel, plenty of which exist.

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

#22

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…

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.

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

#23
post #22

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…

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...

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

#24

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.

Hello, could you share the link for the updated version of LDD3?

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

#25
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.

I don't know of any specifically made for teaching, but there is biscuit made in Go[0] and Lilith made in Crystal[1].

[0] https://pdos.csail.mit.edu/projects/biscuit.html [1] https://github.com/ffwff/lilith

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

#26
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.

Depending on what, exactly, you want to hack on, building components on top of seL4 could be a way to go. There's a large collection of libraries built on top of it, that you can replace as you feel like - https://docs.sel4.systems/projects/available-user-components... - and there's a few different options for communication between them (seL4's IPC, shared memory, etc).

You could easily get a stripped-down interpreter or something running in that environment.

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

#27

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…

> develop from scratch a simple System V UNIX for RPi

A few people seem to have ported xv6 to arm.

https://github.com/david50407/xv6-rpi

https://github.com/houcheng/xv6-armv7/

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

#28

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.

Hello, could you share the link for the updated version of LDD3?

I was able to find this, which appears to have been updated for 4.x kernels, https://github.com/jgraha8/ldd3-examples-modern

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

#29

Earlier quoted context omitted.

Hello, could you share the link for the updated version of LDD3?

I was able to find this, which appears to have been updated for 4.x kernels, https://github.com/jgraha8/ldd3-examples-modern

Alternatively there's this: https://github.com/martinezjavier/ldd3
Post reply on HN