Tuesday, March 18, 2014

[OSDI] Ways for Protecting Shared Data/Process Problems


Ways for protecting shared data/process problems
  1. atomic operation: http://www.threadingbuildingblocks.org/docs/help/tbb_userguide/Atomic_Operations.htm
    • apply a single variable as a lock, check it before entering critical session
  2. disable interrupt: http://stackoverflow.com/questions/3427546/what-is-meant-by-disabling-interrupts
    • sometimes it's not necessary
    • costs a lot
  3. interrupt mask
    • device drive interrupt handler
  4. program reentry
  5. disable kernel preemption
  6. spin lock
    • implemented by atomic operation
    • run for loop while it's locked