Get the latest tech news
Object-oriented design patterns in C and kernel development
[My scheduler operations implementation] A benefit of working on your own operating system is that you’re free from the usual "restraints" of coll...
” The article describes how the Linux kernel, despite being written in C, embraces object-oriented principles by using function pointers in structures to achieve polymorphism. Systems like Unix and Plan 9 embrace the philosophy that “everything is a file.” Whether you’re dealing with sockets, devices, or plain text files, they all expose the same simple interface: read and write. Much like how Linux modules work, custom drivers or hooks can be loaded dynamically in my system by replacing the vtables of certain structures.
Or read this on Hacker News