Tag

spin lock

1 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Dec 11, 2022 · Backend Development

Understanding Spin Locks and Implementing a Reentrant Spin Lock in Java

This article explains the concept of spin locks, compares them with non‑spin locks, discusses their advantages and drawbacks, and provides Java code examples—including an AtomicLong implementation and a custom re‑entrant spin lock—to illustrate how spin locks work in concurrent programming.

AtomicLongConcurrencyJava
0 likes · 8 min read
Understanding Spin Locks and Implementing a Reentrant Spin Lock in Java
IT Services Circle
IT Services Circle
Oct 21, 2022 · Fundamentals

Understanding Thread Blocking and Scheduling in Operating Systems

The article explains what thread blocking means in operating systems, how the OS moves blocked threads to wait queues and schedules other threads, discusses spin locks, and reflects on common misconceptions and community debates about callbacks versus polling.

ConcurrencyOperating SystemsScheduling
0 likes · 5 min read
Understanding Thread Blocking and Scheduling in Operating Systems
Code Ape Tech Column
Code Ape Tech Column
May 17, 2022 · Fundamentals

Understanding Compare‑And‑Swap (CAS), Its Mechanisms, and Common Pitfalls

This article explains the fundamentals of the compare‑and‑swap (CAS) atomic primitive, how CPUs guarantee its atomicity through bus and cache locking, illustrates a Java spin‑lock implementation using CAS, and discusses typical issues such as single‑variable limitation, long spin times, and the ABA problem with mitigation strategies.

ABA problemCASConcurrency
0 likes · 9 min read
Understanding Compare‑And‑Swap (CAS), Its Mechanisms, and Common Pitfalls
Aikesheng Open Source Community
Aikesheng Open Source Community
May 21, 2021 · Databases

Investigating MySQL InnoDB Spin‑Lock Parameters: innodb_spin_wait_delay and innodb_sync_spin_loops

This article examines MySQL InnoDB spin‑lock tuning by adjusting innodb_spin_wait_delay and innodb_sync_spin_loops, describing spin‑lock mechanics, detailing an experiment with performance_schema metrics, and concluding that modest spin settings are preferable to aggressive tuning.

Database OptimizationInnoDBPerformance Tuning
0 likes · 5 min read
Investigating MySQL InnoDB Spin‑Lock Parameters: innodb_spin_wait_delay and innodb_sync_spin_loops
Qunar Tech Salon
Qunar Tech Salon
Jan 28, 2021 · Fundamentals

Understanding CLH Locks and Their Enhancement in Java's AbstractQueuedSynchronizer (AQS)

This article explains the fundamentals of spin locks, introduces the CLH lock as an improved spin‑lock variant, analyzes its Java implementation details, and describes how Java's AbstractQueuedSynchronizer refactors CLH locks to provide fair, low‑overhead synchronization for concurrent applications.

AQSCLH LockConcurrency
0 likes · 12 min read
Understanding CLH Locks and Their Enhancement in Java's AbstractQueuedSynchronizer (AQS)
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Sep 23, 2020 · Fundamentals

Understanding and Implementing the CLH Lock in Java (JDK 1.8 Source Code Analysis)

This article explains the concepts of spin locks and mutex locks, introduces the CLH lock as a fair spin lock used in Java's AbstractQueuedSynchronizer, and provides a detailed walkthrough of its Java implementation, initialization, lock and unlock processes, along with code examples and visual illustrations.

AQSCLH LockConcurrency
0 likes · 19 min read
Understanding and Implementing the CLH Lock in Java (JDK 1.8 Source Code Analysis)