How to interpret "as do" in this sentence
I'm reading a tutorial about "mutex" and "semaphore", in which the following sentence has confused me:
Mutexes can be applied only to threads in a single process and do not work between processes as do semaphores.
Does it mean mutex and semaphore fall into the same category or belong to just the opposite categories? Also, is it a bad wording problem of the author or a poor understanding of mine on the sentence?
Solution 1:
It might help to clarify if you break the sentence into its two pieces:
Mutexes can be applied only to threads in a single process.
Mutexes do not work between processes as do semaphores.
A slightly better way to word it would be:
Mutexes do not work between processes as semaphores do.
Or even better:
Unlike semaphores, mutexes do not work between processes.
Solution 2:
The sentence may be rewritten to:
Mutexes can be applied only to threads in a single process and unlike semaphores they do not work between processes.
This should remove your confusion, I believe. The sentence means that semaphores do work between processes, but mutexes don't.
I don't think the wording is strange. I'd say it's pretty common to say it like that and the problem was in your understanding. You probably never heard anything similar, so you couldn't figure it out.