Ads skipped

The Weird Way Linux Creates Processes

178K views · Jan 20, 2026 · Science & Technology

Comments · 753

  • @CoreDumpped · 8 months ago · pinned

    👉Get Rust training from Let’s Get Rusty: <a href="https://letsgetrusty.com/start-with-jorge">https://letsgetrusty.com/start-with-jorge</a>

    13

  • @pixwarrior · 8 months ago (edited)

    We need to create a child process!<br>Windows: Let&apos;s do that<br>Linux: Mitosis

    2.2K

  • @mtxn · 8 months ago

    fork(), depending on the system configuration, does not copy whole memory when executing new process; it&apos;s using COW (copy on write) approach. When value is changed in the child process it&apos;s just stops pointing to the parent&apos;s one and allocates new one in it&apos;s own address space

    614

  • @XyndraNerd · 8 months ago

    <a href="https://www.youtube.com/watch?v=SwIPOf2YAgI&amp;t=114">1:54</a> lol nice detail on memory size between chrome and firefox

    777

  • @koop_ss · 8 months ago

    It&apos;s crazy how something can look complicated, but as soon as it&apos;s taught in a visual way, it becomes so much easier.<br>This channel is a gold mine, and I really appreciate the hard work you put into your presentations.

    344

  • @zerto111 · 8 months ago

    The game Factorio can utilize the fork on Linux to save the game without pausing it.<br>On Windows during an autosave the game pauses until the games state is written to disk.<br>On Linux the devs explained they can utilize fork which inherits the memory of the parent to save the game while the main process keeps running.<br>It increases memory usage for a short time. But you get a smoother experience.

    80

  • @nullify. · 8 months ago

    Oh boy, we going to talk about PID 1 next.

    151

  • @nasheethahmeda817 · 8 months ago

    at this point make a playlist for making our own OS by explaining all the implementation of existing OS&apos;s. Really looking forward to it.

    60

  • @AJMansfield1 · 8 months ago

    Also important to note, fork doesn&apos;t <i>actually</i> copy the underlying memory contents. It might seem like unix is doing redundant work there, especially if it&apos;s going to immediately overwrite the copied process with execve --- but the apparent &quot;copy&quot; is actually just a paper-thin illusion the kernel sets up via MMU shared pages.<br>For read-write memory areas, whichever fork first tries to write to its &quot;copy&quot; first might end up surprised to find that those read-write areas have been marked read-only --- except that the kernel catches that write-protection error before the process can even notice, and quickly makes an <i>actual</i> copy of just the modified page to switcheroo into the faulting process&apos;s page table before anyone notices. (Also, execve is smart enough to unmap and remap the memory pages instead of making the kernel do this switcheroo on every page.)<br>I&apos;ll also note that, to the keen eyed, it might then seem like it&apos;s <i>Windows</i> that ends up stuck making redundant extra copies in memory of the exact same worker process binary, but fortunately Windows has clever filesystem caching and page-mapping tricks of its own: processes running the same binary <i>still</i> end up sharing the same physical memory pages for their read-only program data. The specific runaround needed to make that happen isn&apos;t one I understand quite as well, and I suspect it&apos;s still a bit less efficient than fork; but if you <i>mean</i> to run multiple workers from the same shared program, you&apos;re meant to use CreateThread rather than CreateProcess.<br>(For sake of argument, I am of course ignoring systems with max-paranoia-level mitigations active for things like Spectre / Meltdown. In those configurations, you <i>do</i> just have hard copies.)<br>The real difference here is just that Unix prefers a small number of tightly-optimized abstractions that can handle multiple different use-cases, while Windows tends to provide multiple abstractions that are each more narrowly optimized, and leaves it to the programmer to pick the correct one.

    10

  • @pheww81 · 8 months ago

    I&apos;m surprisingly by the first process being name P1 instead of P0

    179

  • @Xylos144 · 8 months ago (edited)

    <a href="https://www.youtube.com/watch?v=SwIPOf2YAgI&amp;t=1000">16:40</a> in under 20 minutes we reached the genesis of process religion.

    8

  • @beowulf4669 · 8 months ago

    Looking forward to learning about init systems!<br><br>It seems that `fork() + execv()` is more flexible than Windows&apos; approach, as fork can be used for much more than just subsequently spawing a subprocess. <br><br>If subprocess spawning is so frequent however, do you know why Unix systems didn&apos;t decide to provide an &apos;optimized&apos; syscall to skip the process duplication part?

    233

Up next

LIVE

How Hardware Makes Threads Less of a Nightmare

Core Dumped · 100K views

LIVE

The Question Nobody Ever Explains: Where Does the Kernel End?

Core Dumped · 309K views

LIVE

How CPUs Run Functions

Core Dumped · 160K views

LIVE

The Life of a Process

Ryan Baker · 69K views

LIVE

Friday Night Database Recovery Crash Course (A True Story)

pouria · 336K views

LIVE

The Filesystem is Awesome

Ryan Baker · 360K views

LIVE

How History Shaped the Programming Terms We Still Use Today

Core Dumped · 150K views

LIVE

How Real Projects Mix Compiled and Interpreted Languages

Core Dumped · 234K views

LIVE

Bill Gates SHOCKED as Windows Users ABANDON Microsoft for Linux!

Tech With Tommy · 260K views

LIVE

Simple Instructions, Weird Algorithms

Core Dumped · 112K views

LIVE

It's Over: Bonds COLLAPSE to WORST Levels Since 2002 - Netherlands BANS Microsoft

House of El · 220K views

LIVE

CONCURRENCY IS NOT WHAT YOU THINK

Core Dumped · 212K views

LIVE

Every Time Travel Paradox, Explained

Deep Space Explainer and Space Dude · 6.9K views

LIVE

Signals: Make Ctrl+C Do Anything You Want

Core Dumped · 120K views

LIVE

How C Really Works

Cave of Programming · 214K views

LIVE

Linux Full Course for Beginners | Learn Linux System Administration

Alpha Brains Courses · 183K views

LIVE

Why Some Projects Use Multiple Programming Languages

Core Dumped · 1.5M views

LIVE

How Does Linux Work? | Greg Kroah-Hartman

Wookash Podcast · 70K views

LIVE

The Fancy Algorithms That Make Your Computer Feel Smoother

Core Dumped · 283K views

LIVE

One Formula That Demystifies 3D Graphics

Tsoding · 1M views

LIVE

Casey Muratori – The Big OOPs: Anatomy of a Thirty-five-year Mistake – BSC 2025

Better Software Conference · 902K views

LIVE

What Happens When a Program Calls Sleeps?

Core Dumped · 335K views

LIVE

Linux Kernel Internals: Process

Maple Circuit · 26K views

LIVE

How Operating Systems ACTUALLY work (kernel mode vs. user mode)

Ben Dicken · 390K views

LIVE

glibc - How does glibc make a system call in Linux?

VagabondLinux · 69K views

LIVE

Linux processes, init, fork/exec, ps, kill, fg, bg, jobs

Engineer Man · 188K views

YouTube, with the door locked.

Aegis plays a clean stream instead of YouTube's player, so pre-roll ads, trackers, and fingerprinting never ride along. Drop Shields any time if you want the official player back.