EldoS | Feel safer!

Software components for data protection, secure storage and transfer

About SerializeCallbacks()

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#11636
Posted: 11/10/2009 23:56:54
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Quote
When SerializeCallbacks is true, all callback functions are called sequentially from a single thread. When SerializeCallbacks is false, the callback functions are called from a single thread for the same file, but for different files the callback functions can be called in parallel. The number of parallel threads is deterined by ThreadPoolSize property


However, I saw some strange situation.

I mounted C:\1 to Z:\ by sample Mounter and run Iometer.
When sinlge worker at Iometer runs, it shows different worker threads from CBFS process reads to sinlge file like this;
Quote
OpenFile(default:/iobw.tst): TID(6340), DesiredAccess(120089) and ShareMode(3).
ReadFile(default:/iobw.tst): TID(6628), pos(0), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(32768), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(65536), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(98304), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(131072), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(163840), size(32768)
ReadFile(default:/iobw.tst): TID(7732), pos(196608), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(229376), size(32768)
....
ReadFile(default:/iobw.tst): TID(6340), pos(511836160), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511868928), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(511901696), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511934464), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(511967232), size(32768)
CloseFile(M::\)....


But, when 4 workers at Iometer run, mainly single worker thread from CBFS executes reads to the same file like this;
Quote
OpenFile(default:/iobw.tst): TID(6628), DesiredAccess(120089) and ShareMode(3).
ReadFile(default:/iobw.tst): TID(6628), pos(0), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(0), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(0), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(0), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(32768), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(32768), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(32768), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(32768), size(32768)
....
ReadFile(default:/iobw.tst): TID(6628), pos(511934464), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511901696), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511901696), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511901696), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511967232), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511934464), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511934464), size(32768)
ReadFile(default:/iobw.tst): TID(6628), pos(511934464), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(511967232), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(511967232), size(32768)
ReadFile(default:/iobw.tst): TID(6340), pos(511967232), size(32768)
CloseFile(M::\)....


I thought quite the opposite.
I think read requests should be evenly allocated to different threads.
Why does it show the result like these?
#11638
Posted: 11/11/2009 01:05:40
by Volodymyr Zinin (EldoS Corp.)

Hello Sangmin,

There is a mistake in the documentation.
When SerializeCallbacks is true, all callback functions are called sequentially but not from a single thread. Any worker thread can be used to call a callback. The quantity of worker threads is specified in the CallbackFileSystem.ThreadPoolSize property.
When SerializeCallbacks is false, the callback functions for the same file are called from any worker thread but calls are sequential. Calls pointed to to different files can be called in parallel (again by any worker threads).

Reply

Statistics

Topic viewed 1583 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!