×

Deallocation of computer data in a multithreaded computer

  • US 7,328,438 B2
  • Filed: 03/27/2003
  • Issued: 02/05/2008
  • Est. Priority Date: 03/27/2003
  • Status: Active Grant
First Claim
Patent Images

1. A method of deleting a partition from a logically-partitioned computer of the type including a plurality of logical partitions managed by a partition manager, the logically-partitioned computer further including a plurality of threads executing thereon, and the partition manager having access to a partition control block associated with the partition being deleted, the method comprising:

  • incrementing a sequence number associated with a first thread among the plurality of threads to one of an odd and an even value whenever the first thread enters program code for the partition manager;

    incrementing the sequence number from the other of an odd and an even value whenever the first thread exits the program code; and

    deallocating the partition control block by;

    setting a shared pointer to the partition control block to a null value to indicate that the partition control block is not available;

    capturing a value of the sequence number;

    waiting until each of the plurality of threads is no longer using the shared pointer by monitoring each thread to determine whether said each thread is executing program code that uses the shared pointer, including determining that said each thread is no longer using the shared pointer in response to meeting at least one of a plurality of conditions that includes a first condition where said each thread is inactive, a second condition where said thread is executing in an idle loop in the partition manager, a third condition where said each thread is currently executing program code other than program code for the partition manager, and a fourth condition where the sequence number has changed from the captured value; and

    deallocating the partition control block after setting the shared pointer to the null value and waiting until each of the plurality of threads is no longer using the shared pointer.

View all claims
  • 3 Assignments
Timeline View
Assignment View
    ×
    ×