Ask HN: How are OS able to support such a number of devices? I have been reading about computer architecture and device drives and it is very fascinating on how a processor functions and how are operating systems created to abstract the low level details of the CPU. I was able to understand about the processor, memory and basic devices (like the Hard Disk and Display) using the Writing a simple operating system from scratch book (https://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf) shared recently on HN (https://news.ycombinator.com/item?id=30800715). Understanding this provides a good grasp of the fundamentals of the hardware and software. But, even after this, I am not really sure on an Operating System can support such a massive number of devices, that just simply work on plug and play basis. If feels like magic. I understand that the operating system has in build drivers to a lot of these devices, but still don't understand how are such a massive number of devices covered using just by the inbuild drivers. Also, how does this related to PCI Express and other kinds of busses ? What there the generic interfaces which enable such massive number of devices to be able to work with the operating system ? Does anyone have any good resources for explaining this from first principles, for eg. How would one go about designing a system that can work with so many devices out of the box at runtime ? It'll be really great is anyone has analogies for understanding the various parts involved in such a system. Thank you! |