Hacker News new | past | comments | ask | show | jobs | submit login

Lockfree OS kernel. Give it a couple weeks.



How do you even start writing something like that?


Well, I'd done a small kernel for a class. Later, I wrote a lockfree malloc and realized that large lockfree programs are actually pretty managable, and that was the start. It's generally just a matter of designing around simple data structures (which are the only ones you can really do lockfree) and a repetition of some key tricks like refcounting, generation counting, and type-stable memory. Writing the data structures and primitives was tough, but otherwise you don't have to worry about locking and things come out quite neatly as a result.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: