IBM 000-8697 Instrukcja Użytkownika Strona 137

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 702
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 136
System Architecture 2-43
Managing Shared-Memory Resources
Semaphores
When an OnLine user process attempts to acquire a latch and finds that the
latchisunavailable,theuserprocesscanblockuntilthelatchisavailable.The
mechanism that signals the process to wake when the latch becomes
available is a UNIX semaphore.
The semaphore mechanism works likes this. Every OnLine user process is
associated with a semaphore. If a user process finds a latch unavailable, the
semaphore associated with the process is placed on a list of waiting
semaphores.Whentheuserprocessholdingthelatchisreadytoreleaseit,the
holding user process looks to see if any user processes are waiting for the
latch. If so, the holding process releases the latch and wakes the first appro-
priate user process in the semaphore list.
Ifthe latch tobereleasedisa bufferlatch, the holdinguserprocesswakesthe
first waiting process that has a compatible lock access type. (Refer to
page 2-60 for further information about buffer acquisition.)
All semaphores are created when shared memory is created. In most UNIX
operating systems, the number of semaphores permitted is equal to the
maximum number of concurrent user processes, specified as USERS in the
OnLine configuration file.
UNIXkernelparameterscanaffectthenumberofsemaphorescreatedbyyour
UNIX operating system. (Refer to page 2-18 for a description of the role
played by UNIX kernel parameters.)
Forced Abort
If you explicitly kill a user process that is holding a latch, OnLine immedi-
atelyinitiatesanaborttopreservedataconsistency.IfanOnLineuserprocess
is holding a latch, the implication is that the user process is intent on
modifying shared memory. When a user process terminates, the tbinit
daemoninitiates propercleanup, releasingall locks andotherresourcesheld
by the user process.
Although tbundo can perform routine cleanup for processes that die prema-
turely, data consistency prevents tbinit from releasing shared-memory
latchesaspartofcleanup.Itisimpossible for tbinit todeterminewhetherthe
user process concluded its modifications before it was terminated or if the
database is in a consistent state.
Przeglądanie stron 136
1 2 ... 132 133 134 135 136 137 138 139 140 141 142 ... 701 702

Komentarze do niniejszej Instrukcji

Brak uwag