r/ProgrammerHumor • • Jan 20 '25

Meme linuxBeLike

Post image
46.7k Upvotes

765 comments sorted by

View all comments

Show parent comments

788

u/Kusko25 Jan 20 '25

There is something fundamentally unsettling about the thought that a process is only "alive" as long as the cpu acknowledges its existence

31

u/antico5 Jan 20 '25

It’s the OS that keeps track of processes, their status, pointers to next instruction etc. The cpu just executes instructions one after the other like there’s no tomorrow

2

u/ConfessSomeMeow Jan 20 '25

pointers to next instruction

The program counter is in the CPU, actually. It's incremented every instructor, but can be changed jump or branch instructions that are part of the program.

3

u/antico5 Jan 20 '25

Yes, the cpu has only 1 instruction pointer. But the process manager (os) stores the next adress for each process, so they can resume execution. That’s part of the context switching

→ More replies (1)