Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Performance comparison between "event" and "critical section" system objects

Last post 03-25-2008 8:53 AM by K++. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-25-2008 8:53 AM

    • K++
    • Not Ranked
    • Joined on 07-05-2007
    • Tunisia
    • New Member
    • Points 45

    Performance comparison between "event" and "critical section" system objects

    Well, this is not a real question, it is just wondering.

    I recently studied in deep "event" and "critical section" system objects and found that "critical section" is nothing but an implementation on top of "event" object, so I wonder whether I should use "critical section" object or "event" object to solve programming tasks with better performances. In fact I have found that problems involving "critical section" objects can be solved using "event" (with some more code needed, just a little!) so why should Microsoft "invent" these?

    Another thing, the "CRITICAL_SECTION" structure has some fields that are never used or are just there for debugging purposes. But why should a released program have such debugging data? I know they may be useful for debugging, but removing them may reduce memory requirements of your program, especially if it uses heavily "critical section" objects (a server program, for example).

     Some guys say that in some cases "critical section" objects avoid the "user mode/kernel mode" transition, but when I studied that, it seemed to me that such things rarely occur in execution life time and it seems that it presents a risk of data corruption.

    If anyone is interested in this subject or anything else, he/she can contact me directly by email at "koutheir@gmail.com" .

    Nice day! 

    He who never make mistakes, makes nothing...
    • Post Points: 5
Page 1 of 1 (1 items)