lowlevelprogramming-university README

The project's README from github.com/gurugio/lowlevelprogramming-university. As one markdown file: README.md.

I'm getting so much spam that I've changed this repo to read-only for a while.

NOTICE1: Please do not copy the contents of this page to your blog. You can share this page but please share with the original link. That is how we compliment the authors of good documents and open source projects.

NOTICE2: Please notice that low-level programming is out of trend and currently there are not many companies hiring low-level developer. It is getting harder for me to find a job. If you haven't started a professional career yet, I would like to recommend you consider other fields either carefully.

NOTICE3: If you want a quick start, go to "How to start?".

Low-Level Programming University

What is it?

I'm inspired by google-interview-university. I'd like to share my experience and show a roadmap to becoming a low-level programmer because I have found that these skills are not as common as they once were. In addition, many students and beginners ask me how they could become low-level programmers and Linux kernel engineers.

This page cannot include every link/book/course. For example, this page introduces Arduino but there is not detailed information about Arduino and embedded systems. You should go further yourself. You have the keyword "Arduino" with which you can start. So your next step is probably googling Arduino, buying a kit, and doing something for yourself, not collecting links or free books. Please remember this page is just a roadmap for beginners.

Low-level programming is a part of computer science. Absolutely it would be much better to get education in computer science first.

What is the Low-Level?

I classify low-level programming as programming that is very close to the machine, using a lower level programming language like C or assembly. This is in contrast to higher-level programming, typical of user-space applications, using high level languages (e.g. Python, Java).

Yes, systems programming is a very close concept to low-level programming. This page includes the hardware design and firmware development that is not included in systems programming.

Finally, this page includes topics ranging from hardware components to the Linux kernel. That is a huge range of layers. A one page document can never cover the details of all the layers, so the aim of this document is to serve as a starting point for low-level programming.

Theory

There are two background theories to low-level programming:

I think the best way to learn theory is by taking a course. Reading books is not bad but takes too much time and effort. You can find many good classes on online universities, for instance, Coursera.org and edx.org. Theory is theory. I don't think you need to get an A+ in the class, just understand the big picture. You'll get better and better with experience.

Let me introduce several books that I've read. They are commonly used as textbooks in universities. If there is no class with these books in your university, it's worth spending some time reading them.

There is an infinite list of good books. I don't want to say that you should read many books. Just read one book carefully. Whenever you learn a theory, implement simulation code of it. Implementing one thing is better than knowing one hundred theories.

Languages

Assembly

Choose one between x86 or ARM. No need to know both. It doesn't matter to know assembly language. The essential thing is understanding the internals of a CPU and computer. So you don't need to practice the assembly of the latest CPU. Select 8086 or Cortex-M.

C language

There is no shortcut. Just read the entire book and solve all the exercises.

If you want to be expert of C programming, visit https://leetcode.com/. Good luck!

Rust language

I am sure that the next language for the systems programming would be Rust. I will make a list what I did to learn Rust.

Linus Torvalds said "Unless something odd happens, it [Rust] will make it into 6.1."

Applications

Hardware and Firmware

If you want to be an embedded systems engineer, it would be best to start from a simple hardware kit, rather than starting with the latest ARM chipset.

At this point, you should be good to start the latest ARM or x86 processor.

For example, the Raspberry Pi board has a Cortex-A53 Processor that supports a 64-bit instruction set. This allows you to experience a modern processor architecture with rPi. Yes, you can buy it... but... what are you going to do with it? If you have no target project, you would be likely to throw the board into a drawer and forget it like other gadgets you may have bought before.

So, I recommend one project for you.

I've made a toy kernel that supports 64-bit long mode, paging and very simple context switching. Making a toy kernel is good way to understand modern computer architecture and hardware control.

In fact, you have already the latest processor and the latest hardware devices. Your laptop! Your desktop! You already have all that you need in order to start! You don't need to buy anything. The qemu emulator can emulate the latest ARM processors and Intel processors. So everything you need is already on hand. There are many toy kernels and documents you can refer to. Just install qemu emulator and make a tiny kernel that just boots, turns on paging, and prints some messages.

Other toy kernels:

Linux kernel and device driver

You don't need to make a complete operating system. Join the Linux community and participate in development.

Some resources for Linux kernel and device driver development from beginner to advanced.

References

Check when you need something

Other applications

Yes, you might not be interested in Linux or firmware. If so, you can find other applications:

I don't have any knowledge about those applications. Please send me any information for beginners.

Kernels and drivers are not all of low-level programming. One more important application of low-level programming is the software-defined storage or distributed filesystem. Detailed descriptions of them is beyond the scope of this document but there is an excellent course where you can try a simple distributed filesystem.

Future of low-level programming

I do not know the future, but I keep my eye on Rust.

If I could have one week free and alone, I would learn Rust. That is because Rust is the latest language with which I can develop Linux device drivers.

IoT is new trend, so it's worth to check what OSs are for IoT. ARM, Samsung and some companies has their own realtime OS but sadly many of them are closed source. But Linux Foundation also has a solution: Zephyr

Typical cloud servers have many layers; for instance, host OS, KVM driver, qemu process, guest OS and service application. A container has been developed to provide light virtualization. In the near future, a new concept of OS, a so-called library OS or Unikernel, would replace the typical stack of SW for virtualization.

Big data and cloud computing require bigger and bigger storage. Some disks directly attached to server machines cannot satisfy the required capacity, stability and performance. Therefore there has been research to make huge storage systems with many storage machines connected by a high speed network. It used to be focused on making one huge storage volume. But currently they are providing many volumes dedicated for many virtual machines.

How to start?

I received an email asking how to start. There are many information about books, courses and projects in this page. It is my mistake to forget to write how to start. Unfortunately, there is no King's Road to King's Landing. I will just write what I did in order. If you have already done something, please skip it. AGAIN, this is just an example that you could do in order, just in case if you do not know how to start or what to do.

Translations

Please send me the pull request if you'd like to translate this page. I'll list it here.

Who am I?

I'm inspired by google-interview-university. I'd like to share my experience and show a roadmap to becoming a low-level programmer because I have found that these skills are not as common as they once were. In addition, many students and beginners ask me how they could become low-level programmers and Linux kernel engineers.

FYI, I have over 10 years of experience as a low-level programmer:

lowlevelprogramming-university (gurugio/lowlevelprogramming-university)

Searching Database…

这是什么?这是一份精选的低级编程学习路线图(涵盖汇编、C、Rust、嵌入式系统、Linux 内核),灵感来自 google-interview-university。它是一个很长的单一 README,按主题组织,附有书籍、课程和项目的链接。
这是一份我要一步一步跟着学的教程,还是一份让我挑选的参考清单?这是一份按主题分组的外部资源精选清单(书籍、课程、项目),而不是交互式课程。你需要自己选定学习路径,并自行访问外部链接学习。
新手应该从哪里开始?作者建议读者先看 'How to start?' 一节获取快速入门指引,并建议先学习理论(计算机体系结构、操作系统),再进入汇编、C 语言以及 Arduino 等硬件项目。
跟着学需要特殊的硬件或软件吗?大部分内容不需要特殊硬件:一台笔记本或台式机,装上 QEMU 模拟器就够了,因为它可以模拟 ARM 和 Intel 处理器。如果要学硬件部分,作者推荐购买 Arduino Start Kit(Arduino 入门套件)。
这个项目还在持续维护吗?不再维护。该仓库已归档,并因垃圾信息问题被设为只读。作者还明确提醒,低级编程类工作岗位正在变少。
这份清单到底是给谁看的?它面向对成为低级、嵌入式或 Linux 内核工程师感兴趣的学生和初学者。但作者提醒这是一个正在萎缩的就业市场,如果你还没开始职业生涯,建议仔细考虑其他领域。
这份清单在低级编程方面涵盖哪些语言?涵盖汇编(x86 或 ARM)、C 和 Rust。作者认为 Rust 很可能成为下一代系统编程语言,并以它进入 Linux 内核为例。
它也涵盖硬件和内核开发吗?涵盖。有关于硬件和固件的部分(从 Arduino 以及 8086/80386 手册开始),也有关于利用 QEMU 为 Raspberry Pi 或 x86 构建玩具操作系统内核的部分,另外还有 Linux 内核和设备驱动的资料。
这些条目经过筛选,还是只是链接堆砌?作者亲自审阅了大部分资源,并对每一项都做了点评,还注明了他真正读过哪些书。他建议精读一本书,而不是泛泛翻阅许多本。
作者为什么要自己做这份清单,而不是直接推荐现成的计算机课程体系?他受 google-interview-university 启发,但觉得低级编程和内核方面的技能现在越来越少见,于是想做一份专门的路线图,把理论、语言实践以及动手的硬件和内核项目结合起来。
Creator
gurugio
Size
0.3 MB
Stars
12.8K
Updated
CommitMar 24
Age
9y
Commits · 90 Days