PrepAway - Latest Free Exam Questions & Answers

How many threads does the semaphore currently have waiting?

You are the IT professional who work in an International company named Wiikigo. You are experienced in troubleshooting operating systems and applications that are not working correctly, identifying code defects and so on. You have enough knowledge on windows internals and you provide technical support for the company. According to the company requirement, you are debugging a Windows device driver. An unexpectedly long delay occurs on the device driver. You locate the problem in the following synchronization mechanism.

kd> dt var_sema

Local var @ 0xf9dfbc48 Type _KSEMAPHORE

+0x000 Header : _DISPATCHER_HEADER

+0x010 Limit : 2

kd> dt nt!_DISPATCHER_HEADER f9dfbc48

+0x000 Type : 0x5 ”

+0x001 Absolute : 0xe6 ”

+0x002 Size : 0x5 ”

+0x003 Inserted : 0xbb ”

+0x004 SignalState : 0

+0x008 WaitListHead : _LIST_ENTRY [ 0x819ca438 – 0x819ca438 ]

kd> dt nt!_KWAIT_BLOCK 0x819ca438

+0x000 WaitListEntry : _LIST_ENTRY [ 0xf9dfbc50 – 0xf9dfbc50 ]

+0x008 Thread : 0x819ca3c8 _KTHREAD

+0x00c Object : 0xf9dfbc48

+0x010 NextWaitBlock : 0x819ca480 _KWAIT_BLOCK

+0x014 WaitKey : 0

+0x016 WaitType : 1

kd> dt nt!_KWAIT_BLOCK 0xf9dfbc50

+0x000 WaitListEntry : _LIST_ENTRY [ 0x819ca438 – 0x819ca438 ]

+0x008 Thread : 0x00000002 _KTHREAD

+0x00c Object : 0xfd050f80

+0x010 NextWaitBlock : 0xffffffff _KWAIT_BLOCK

+0x014 WaitKey : 0

+0x016 WaitType : 0

You have to find out the number of threads that the semaphore currently has waiting. How many threads does the semaphore currently have waiting?

PrepAway - Latest Free Exam Questions & Answers

A.
0

B.
1

C.
2

D.
4

E.
5


Leave a Reply