logoalt Hacker News

CamperBob2yesterday at 7:14 PM4 repliesview on HN

Sheesh. Can something this complicated ever truly be said to work?


Replies

adrryesterday at 9:31 PM

OS kernel runqueue is using a spinlock to schedule everything. So it works. Should you ever use a spinlock in application code? No. Let the OS via the synchronization primitives in whatever language your app is in.

bluGillyesterday at 7:52 PM

You can limit yourself to the performance of a 1mhz 6502 with no OS if you don't like it. Even MSDos on a 8086 with 640K ram allows for things that require complexity of this type (not spin locks, but the tricks needed to make "terminate stay resident" work are evil in a similar way)

show 1 reply
direwolf20yesterday at 9:37 PM

Yes, if you're careful. Actually careful, not pretend careful. Which is pretty normal in C and C++.

nh23423fefeyesterday at 7:44 PM

Isn't it the opposite? The complication is evidence of function. The simple code doesn't work.

show 1 reply