r/CodingForBeginners • • 17d ago

What is the best way to learn system-level programming?

I had some experience with C during my college days, but I never really did any projects that are worth mentioning. I know AI can write code, but I want to understand what is happening at the system level. As of now, Rust is too overwhelming for me, so I'm thinking of restarting with C. Any advices?

5 Upvotes

15 comments sorted by

4

u/cvco210 17d ago

Highly recommend the book “Operating Systems: Three Easy Pieces”. You can buy a physical copy if you want, but it’s also free online. Covers a good breadth of OS concepts (with a focus on Unix-based systems)

2

u/politepinkpill 17d ago

I believe I have the digital copy of it. I will start to read it then. Also what do you think is the best way to experiment practically? Thank you.

3

u/KarmaTorpid 17d ago

Read a book. You will learn it well enough to begin building on your own. O'Reilly is a publiser who make programming and technology technical books. The books are white with a line art drawing on the covor of an animal (or something).

There are a TON. Check their website, Amazon, etc.

Do NOT just find the title of one of the books and Google that with filetype:pdf and just download it. Thats what a no good pirate would do.

🍀 Luck

2

u/politepinkpill 17d ago

Thanks a lot.

Sure. I will check out their website. My primary source of ebooks was z-library since I can't afford even my own food atm.

2

u/W31337 17d ago

Build your own OS in a VM.... (one of those projects I'm wanting to do but never do)

2

u/politepinkpill 17d ago

I will work on it after understanding the initial concepts.

2

u/gm310509 17d ago

When you say "system-level" what does that mean to you?

For example, does it mean:

  • How does "the system" handle a high level statement such as for each element in list do: type of things?
  • When you call a high level function like open or read etc, how is this communicated to the operating system?
  • When a program does call something like open how does the operating system manage that - e.g. how does the file system work, how does it manage and track your request etc?
  • How does the operating system manage multiple tasks and memory?
  • How does the operating system interact with the underlying hardware?
  • Something else?

At the "system-level" is a pretty big topic and could include many different things - with many different approaches to start learning them.

Do you have much recent experience? If so in what language(s), how long and what type of things have you been doing recently?

1

u/politepinkpill 16d ago

Yes. More like I want to understand how operating system works or how a compiler works.

I don't have any recent experience other than using AI to write quick scripts. Python and Bash scripting mostly. I never really had a worthy project mentioning other than a few discord bots.

2

u/gm310509 16d ago

For those there are loads of resources. Google is your friend here, but equally people have provided some good resources.

As for the compiler aspect, have a look at https://craftinginterpreters.com/

The title is "interpreters", but many of the tasks needed are the same for a compiler and the author does address some of the extra stuff a compiler would do and does produce a "compiled output" for a virtual machine.

As a bonus, it is a follow along guide - he develops a very simple language (called Lox) and goes through the various steps needed to make the programs written in the language it "run" on a computer.

All up it is a relatively simple example of a complex subject that you can follow along as you build it yourself.

Have fun with it.

2

u/BranchLatter4294 17d ago

If that's what you want to do, maybe write a device driver.

1

u/gm310509 17d ago

When you say "system-level" what does that mean to you?

For example, does it mean:

  • How does "the system" handle a high level statement such as for each element in list do: type of things?
  • When you call a high level function like open or read etc, how is this communicated to the operating system?
  • When a program does call something like open how does the operating system manage that - e.g. how does the file system work, how does it manage and track your request etc?
  • How does the operating system manage multiple tasks and memory?
  • How does the operating system interact with the underlying hardware?
  • Something else?

At the "system-level" is a pretty big topic and could include many different things - with many different approaches to start learning them.

Do you have much recent experience? If so in what language(s), how long and what type of things have you been doing recently?

0

u/Traditional_Vast9419 14d ago

Rust isn't a systems language. The whole community literally brags about its abstractions.