iluwatar / iluwatar/java-design-patterns

Lock Manager pattern

Open
#1,283 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

epic: pattern info: help wanted type: feature
Dominant language
Java
Stars
94.7k
Forks
27.4k
Avg merge
3d 4h
Merged PRs (30d)
10

Description

Description:
The Lock Manager design pattern is a concurrency control mechanism used to manage access to shared resources in a multi-threaded environment. This pattern ensures that multiple processes or threads do not simultaneously access a shared resource in a way that causes conflicts. The key elements of the Lock Manager design pattern include:

  1. Lock Management: Centralized control for acquiring and releasing locks on resources.
  2. Lock Types: Different types of locks, such as read and write locks, to manage varying levels of access control.
  3. Deadlock Detection and Resolution: Mechanisms to detect and handle deadlocks.
  4. Lock Granularity: Ability to define locks at different levels of granularity, such as fine-grained or coarse-grained locks.

References:

Acceptance Criteria:

  1. Implement a Lock Manager class that supports acquiring and releasing locks with read and write permissions.
  2. Integrate deadlock detection and resolution within the Lock Manager.
  3. Provide unit tests demonstrating the correct functionality of the Lock Manager, including scenarios for deadlock detection and handling.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the project contribution guidelines and existing Java design-pattern implementations to determine where a Lock Manager belongs. Use the listed acceptance criteria to define the required read/write locking, deadlock handling, and unit-test coverage; no source file or test path is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.