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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Object

Object

Photo of kernel development

kernel development

Related news:

News photo

The use of LLM assistants for kernel development

News photo

Japan discovers object out beyond Pluto that rewrites the Planet 9 theory

News photo

Panasonic S1 II review: A near-perfect creator's camera if money is no object