Save this video free

ECE344 Fall 2026 (Sec 1) Lec 4 - Process Creation

Jon Eyolfson · 50:14 · Watch on YouTube

Part of University of Toronto ECE 344. See all 26 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Jon Eyolfson explains Unix process creation through the Linux system calls `fork` and `execve`, beginning with process control blocks, process states, and `/proc`. He demonstrates how `fork` creates an independent child that returns 0 while the parent receives the child's PID, why scheduling makes output order unpredictable, how `execve` replaces a process with a new program, and how shells use these calls for commands and redirection. The lecture also covers copy-on-write, repeated-fork process growth, `strace -f`, and `posix_spawn` as a safer alternative to managing the fork-to-exec interval.

Key takeaways

Chapters

0:00 Linux Process Control Blocks, States, and `/proc`
7:20 Unix Separates Process Creation into `fork` and `execve`
11:24 What `fork` Copies: Memory, File Descriptors, and Parentage
16:44 Reading Parent and Child Results from a `fork` Example
24:07 Repeated `fork` Calls Multiply the Number of Processes
31:18 Using `strace -f` to Follow Forked Processes
33:45 Forking in a Loop Creates Concurrent Child Programs
38:11 Why Returning Instead of Exiting Can Multiply Children
40:37 `execve` Replaces a Process with a New Program
47:12 How Shells Combine `fork`, Redirection, `execve`, and `posix_spawn`

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:10 Alrighty, welcome back to operating systems. So, we get to create processes today, which is a few more fun system calls we get to learn. So as a little bit of a review, recall that the kernel is the thing managing every process. So our process is now we know the thing running in user mode. It has its own independent registers, virtual memory, file descriptors and then the kernel is the thing that is managing our processes. So how it's creating the illusion of virtual registers or independent registers. It's doing it through save registers. We don't know how it's doing it for virtual memory or file descriptors yet. And the kernel is the thing running in kernel

0:59 mode. The only way to cross this user mode kernel mode boundary is through making system calls that we can now srace and figure out what our process is doing. So the actual name of the structure that the process or the kernel uses to actually manage and kind of have bookkeeping information about your process is called the process control block. Everything in Linux is in this sketch.h header file. So Linux kernel calls that process control block the task strct. in XV6 which you are currently working on lab one there it's that strruct proc and it is in that proc.h H file. If I check two right now, oh looks like in lab one over 40% of you

1:54 are already done with lab one. So that is fantastic. So some of the things that will be in that process control block is the process state that we will go over in the next slide. Save registers. So that's where they actually get stored in the process control block. any scheduling information like whether or not I want to run this process next that

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Jon Eyolfson.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.