A resource and partition manager of the preferred embodiments includes a
lock mechanism that operates on a plurality of locks that control access
to individual PCI adaptor slots. The resource and partition manager uses
the lock mechanism to obtain a lock on an PCI adaptor slot when
transferring control of the PCI adaptor slot to a logical partition that
is powering on and when removing the PCI adaptor from a logical partition
that is powering off. The resource and partition manager uses the lock
mechanism to remove control of an PCI adaptor slot from, or return
control to, an operating logical partition in order to facilitate
hardware service operations on that PCI adaptor slot or on the physical
enclosure in which it is contained.