Hi,
I am not quite sure on your intentions, but as far as Windows is concerned, there is no global kernel lock or the like. So in general it is not possible to gain exclusive access on the entire system space.
If you want to protect a certain portion of your driver allocated memory there are plenty of synchronization primitives you can use. For example KMUTEX or KSPIN_LOCK, depending on the requirements of your driver.
If you want to ensure that you are the only thread running, you may indeed raise the IRQL. This is implicitly done when acquiring a spin lock on an uniprocessor system. On SMP systems, you may try issuing DPCs on the other processors, which can notify your driver when they are scheduled. If you also disable interrupts, you should be pretty sure being the only thread running. However, I am not sure, if this is a recommended scenario by MSFT.
Regards,
Alex