DEV Community

Wesley Bertipaglia
Wesley Bertipaglia Subscriber

Posted on Originally published at wesleybertipaglia.com

From Power-On to main()

Hey dev.to 👋

Post 8/8 of my Operating Systems Explained series is out — and the finale closes both series.

Every post so far assumed a running kernel. This one starts at the power button: firmware and the CPU reset vector, the bootloader, kernel startup in dependency order, init as pid 1, the ELF loader, and the handoff to main.

The line I kept coming back to: eight posts of machinery narrow to _start calling __libc_start_main, which calls your main. Every abstract mechanism in the series shows up in that one call.

Two series, one arc: the first built the machine, the second taught it to share. Whatever we build on top — from Fibonacci to distributed systems — runs on this stack. The details will change; the shape won't.

Read here: https://www.wesleybertipaglia.com/blog/6bbtdrie

Which layer of the stack would you like me to take apart next?

Top comments (2)

Collapse
 
sgaggjhkjh profile image
Arjun Sharma •

Framing the whole series as narrowing down to _start calling main is a clear way to close it. Which stage in the boot chain, from firmware to init as pid 1, do you think most developers misunderstand the most?

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

power-on to main as a series finale, nice way to close it.