/[Apache-SVN]
ViewVC logotype

Revision 1727424


Jump to revision: Previous Next
Author: jwross
Date: Thu Jan 28 19:27:49 2016 UTC (8 years, 2 months ago)
Changed paths: 12
Log Message:
[ARIES-1383] Provide option to disable the provisioning of dependencies at install time.

As part of the implemented locking strategy, three locks are used. The Global Read/Write Lock (GRWL) is used to ensure thread safety among all operations: install, install
dependencies, resolve, start, stop, and uninstall. The write lock is acquired for install, install dependencies, and uninstall. The read lock is acquired for resolve, start, and stop.
The Global Mutual Exlusion Lock (GMEL) is used to prevent cycle deadlocks when acquiring the state change locks of individual subsystems. Every subsystem has a Local State Change Lock
(LSCL). These locks are used to prevent more than one state change operation at a time to occur for the same subsystem.

A condition exists for the GMEL. The condition is used in order to notify waiting threads that the LSCL of at least one subsystem was released and that at least one thread may now be
able to proceed. Threads that fail to acquire the LSCL of a subsystem while holding the GMEL will release all currently held locks and wait for the condition to apply. This is
necessary because, when starting, the target subsystem must be locked before any other affected subsystems since the latter may only be computed after dependencies, which may include
other subsystems, are installed.

The consequences of this strategy is that installs and uninstalls are synchronous while resolutions, starts, and stops are asynchronous as long as the same subsystem is not affected.
It may be possible to create an even more granular locking mechanism in the future if dictated by performance requirements.

Changed paths

Path Details
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/BasicSubsystem.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/InstallAction.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/LockingStrategy.java added
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/ResolveContext.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/StartAction.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/StopAction.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResource.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/SubsystemResourceInstaller.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/UninstallAction.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/WovenClassListener.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/defect/Aries1383Test.java modified , text changed
Directoryaries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/aries/subsystem/itests/util/SubsystemArchiveBuilder.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26