Re: Questions regarding Synchronisation in Windows (Spinlocks)



1) spinlocks used to have different implementation in uniprocessor kernel.
Vista/Longhorn now only ship multiprocessor kernel.
Interrupts are handled in context of ISR. There is no thread switch, as they
don't run in a particular thread context.


"smawsk" <sk.smawsk@xxxxxxxxx> wrote in message
news:b2a63809-b597-4a8c-a8f4-efc069b3a05b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have some questions regarding the implementation of synchronisatio
techniques in Windows.
I would be greatful if some one can answer these.

1) How are Spinlocks implemented in Windows for a UNIPROCESSOR
machine? Do they involve busy waiting?
Since Spinlocks execute at DPC/Dispatch level, there is no way for the
thread to move to wait state.

Consider a scenario where a thread is trying to acquire a spin lock.
But an interrupt occurs which has an IRQL > DPC Dispatch level OR the
IRQL of the thread that acquired the spin lock. For the new interrupt
to be serviced, dispatcher has to be invoked to switch to the new
thread servicing the interrupt.

What happens in this scenario?

2) What is the difference between an executive object and a kernel
object? Can some one give an example for each?
I reckon Semaphore, Event, Mutex etc are executive objects. So what
kernel objects are these executive objects built on?

Which category do "Dispatcher" objects belong to?

3) What is th edifference between a Mutex and Fast Mutex/Guarded
Mutex?

Thanks in advance.

Warm Regards.


.



Relevant Pages

  • RE: RT patch acceptance
    ... >> and PI is something we should keep out of the kernel tree. ... > A general threaded interrupt is not a good thing. ... > drivers running in interrupt is way overkill. ... > spinlocks are good enough. ...
    (Linux-Kernel)
  • Re: Interrupt context...
    ... > gone through most of the posts on interrupt in usenet. ... > kernel stack and ISR is executed. ... More may be saved depending on the architecture. ... Here the kernel have assembler code to save all general ...
    (comp.os.linux.development.system)
  • Re: [PATCH 19-rc1] Fix typos in /Documentation : Misc
    ... +do not have a corresponding kernel virtual address space mapping) and ... This command sets the scale factor for the ABSOLUTE MOUSE POSITIONING mode. ... If you check the source code you will see that what I draw here as a frame ... interrupt-parent: contains the phandle of the interrupt ...
    (Linux-Kernel)
  • Re: [PATCH 18-rc3] Fix typos in /Documentation : Q-R
    ... The driver will receive them again on the ... The kernel is entered with r3 pointing to an area of memory that is ... Bits are then right shifted into the GP_SAMPLE register at the specified ... you get an interrupt when a full DWORD is recieved. ...
    (Linux-Kernel)
  • PROBLEM: oops in 2.6.21.1 after bringing up the network
    ... I am consistently getting a kernel oops from a vanilla 2.6.21.1 kernel. ... Fatal exception in interrupt ... pin B routed to IRQ 0 ... Elitegroup Computer Systems Unknown device b732 ...
    (Linux-Kernel)