none
MMF(shared memory) IPC is not reflect directly RRS feed

  • 질문

  • I am using mmf for 2 process's IPC(SharedMemory) ( CreateFileMap/MapViewOfFile )

    And My senario is this.

    -------------- a process ------------------

    writing to mapview '2'

    set event(1)

    wait event(2)

    print mapview ...?? <- this is problem!


    -------------- b process ------------------

    wait event (1)

    read mapview, if value is 2 write mapview 4(2*2, value x value)

    event (2) set


    and then.. 'print mapview' is blow

    2 <-- ??? why not directly reflected??

    2

    2

    4 <- now reflected..

    4

    4

    process b is write 4 to mapview, after set event (2), but process a's mapview is not 4! after about 1ms, process a's mapview is 4. why is that...?

    2012년 9월 13일 목요일 오전 5:10