>> Intra-Process serialisation mutex KSEM imbedded in the PTDA.
>> This KSEM is sometimes referred to as "fscrit" (file system critical
>> section) since it is used to serialise file system activity within
>> a process.
.p#
Slot Pid Ppid Csid Ord Sta Pri pTSD pPTDA pTCB Disp SG Name
*000c# 0002 0000 0002 0004 blk 0804 ab78d000 ab997020 ab978420 1c9c 00 cntrl
##.d ksem %ab997020 +ptda_ptdasem-ptda_start
Signature : KSEM Nest: 0000
Type : MUTEX
Flags : 00
Owner : 0000 PendingWriters: 0000
##
>> MFT Shared KSEM imbedded at the beginning of the MFT
##..d sft d0:8
sf_ref_count: 0001 sfi_mode: 00a0
sf_usercnt: 0000 sfi_hVPB: 0012
reserved: 00 sfi_ctime: 0000
sf_flags(2): 0100:0000 sfi_cdate: 0000
sf_devptr: #0000:0000 sfi_atime: 0000
sf_FSC: #00c8:0008 sfi_adate: 0000
sf_chain: #0000:0000 sfi_mtime: 0000
sf_MFT: fe7fb788 sfi_mdate: 0000
sfdFAT_firFILEclus: 5ad6 sfi_size: 000bb135
sfdFAT_cluspos: 09c8 sfi_position: 00085d90
##.d ksem %fe7fb788
Signature : KSEM Nest: 0000
Type : SHARE Readers: 0000
Flags : 01 PendingReaders: 0000
Owner : 0000 PendingWriters: 0000
##
>> Slot 49 is blocked. So we proceed by finding out what the BlockId
>> represents by finding its owner.
##.pb 49
Slot Sta BlockID Name Type Addr Symbol
0049 blk fe83bdf4 warp_d
##.m %0fe83bdf4
*har par cpg va flg next prev link hash hob hal
072c %feaf8dd2 00000400 %00540000 149 072d 072b 0003 0000 0003 0025 hptda=0878
hal=0025 pal=%ffe5d140 har=072c hptda=0878 pgoff=00000 f=021
har par cpg va flg next prev link hash hob hal
0003 %feaef04c 00000400 %fe6ef000 001 0002 0023 0000 0000 0003 0000 =0000
hob har hobnxt flgs own hmte sown,cnt lt st xf
0003 072c fec5 1000 ffec 0000 0000 00 01 00 00 vmkrhrw
pvmli cs eip phlock cpg va flg hptda hob sig csig
%fe82e4c4 002d 0a6800a5 %ac22403c 0001 %fe83c000 0005 024b 0003 ea9f ea9f
>> Block Id is in the kernel resident heap - assume that it is at the
>> beginning of a data portion of a heap block.
>> Dump the header.
##dd %0fe83bdf4-10 l8
%fe83bde4 00000000 bd100000 fe83fe83 ff7e0018
%fe83bdf4 4d45534b 000a0004 46380001 bd28a801
>> Object Owner Id is ff7e
##.mo ff7e
ff7e ksem
##.d ksem %0fe83bdf4
Signature : KSEM
Type : EVENT
Flags : 04
Owner : 000a PendingWriters: 0001
##
Notes:
KSEMs are usually found imbedded in system control blocks for serialisation and sharing purposes.
Dynamically allocated KSEMs are allocated out of one of the kernel heaps.
Virtual Device Driver semaphore helper services result in KSEMs.
Under the ALLSTRICT kernel only, the KSEM has a signature field. This is manufactured by the .D command for non-ALLSTRICT kernels. Under the ALLSTRICT kernel the presence of a KSEM may be verified by dumping the KSEM in bytes. Offset +0x0 is where the signature is located.
The owner field refers to the slot number of the semaphore owner.
When a thread blocks on a KSEM the following addresses are used as the BlockId
MUTEX KSEM
For a description of the KSEM structure see the Kernel Semaphore Structure in the System Reference.