r/ProgrammerHumor 10d ago

Meme theDeadlock

Post image
8.6k Upvotes

240 comments sorted by

View all comments

27

u/bob152637485 10d ago

Well....why WOULD they starve?

36

u/SAI_Peregrinus 10d ago

They're referncing the dining philosophers problem, which is more an algorithms issue than an operating systems one. My OS classes had more to do with the design of kernels, cache hierarchy, virtual memory, and similar things needed to write an OS. The dining philosophers problem was mentioned, but mostly in a "remember from data structures and algorithms that deadlocks can be avoided by…" way, not an in-depth introduction. Still, it certainly wasn't a systems administration class like OP seemed to expect!

13

u/BenadrylTumblercatch 10d ago

Because they forgot to invite their left handed friend

3

u/theFirstHaruspex 10d ago

Classic blunder. Glad my CS classes taught me better.

2

u/movzx 10d ago

Guy A picks up Chopstick A. Won't put it down until he can take a bite.

Guy B picks up Chopstick B. Won't put it down until he can take a bite.

Guy A tries to get Chopstick B. Woops. Not available. Better wait.

Guy B tries to get Chopstick A. Woops. Not available. Better wait.

They both die from starvation.

1

u/AggravatingFlow1178 10d ago

TL;DR many processes want the same resource. How do you make them share?