Quantcast
Channel: The Old New Thing
Viewing all articles
Browse latest Browse all 24428

re: This code would be a lot faster if it weren't for the synchronization

$
0
0

Danny Moules: When the kernel is running on just a single processor, nothing else can be running simultaneously, so it doesn't need locks. Of course it can still be interrupted by hardware, so it just has to disable interrupts when it enters critical sections.

In other words, the uniprocessor kernel just defines EnterCriticalSection to be the CLI instruction and LeaveCriticalSection to be STI. This makes it faster and smaller.


Viewing all articles
Browse latest Browse all 24428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>