2 ms·
Windows has got a Hardware Abstraction Layer: http://en.wikipedia.org/wiki/Hardware_abstraction#Microsoft_Windows http://en.wikipedia.org/wiki/Hardware_abstract
by shin_lao 13y ago
Windows has got a Hardware Abstraction Layer: http://en.wikipedia.org/wiki/Hardware_abstraction#Microsoft_Windows http://en.wikipedia.org/wiki/Hardware_abstraction#Microsoft_...
Until Windows 4, even the graphic part wasn't in the kernel, eventually they had to compromise for performance reasons.
I don't know Linux well enough to answer your question about Linux, but I'm pretty sure that concerns are well separated, however they are so fundamental to what the OS does that you can't just rely on some "external library".
An Hypervisor doesn't touch any hardware stuff. Basically if you consider kernel mode to run in ring 0 and user mode to run in ring 3, the Hypervisor runs in ring -1 and just deals with privileges to sum up. At to no instance does the hypervisor deal with the hardware such as disks or network cards. That code lies in the ring 0 kernel. All the Hypervisor says is ... "yeah ok, ring -1 kernel, you can play in that sandbox".
For example when you run a VM, the VM emulates hardware but the OS running in the VM stills need drivers...
Now it's not that easy to separate the OS from the drivers, because each OS has got some ideas about how the cache should work and how disks should be managed and what is actually a NIC.
When you write an OS you make your best so that writing a driver can be done to someone else and the code can be reused (e.g. for writing to multiple OS) but you CAN'T expect to use a common framework because well, at some point you will want to do DMA and you don't want to tell your user that their Intel SSD will run at 10 MiB/s.
- yuhong 13y agoWindows 4 != NT4