-
Notifications
You must be signed in to change notification settings - Fork 0
synchronization hardware
Synchronization Hardware
Test-and-Set
Test-and-set is an atomic hardware operation used in concurrent programming to ensure mutual exclusion when multiple threads or processes access shared resources. It involves reading a value from memory, testing it, and then setting it to a new value in a single, atomic operation. This ensures that only one thread or process can modify the value at a time, preventing race conditions.
Test-and-set is commonly used in low-level synchronization mechanisms like spinlocks.
Compare-and-Swap
Compare-and-swap (CAS) is another atomic operation used in multi-threaded programming to synchronize access to shared memory. It compares the value of a memory location with a specified value, and if they match, it swaps the memory location’s value with a new value. CAS is widely used in implementing lock-free data structures and algorithms, as it avoids the need for traditional locking mechanisms, thus improving performance in highly concurrent systems.
Sources:
Tanenbaum, A. S. (2001). Modern Operating Systems. Stallings, W. (2013). Operating Systems: Internals and Design Principles.
Created by: Taris Major Theo Rolle Jacob Bradley
-
- Process
- Threads
- Process States (New, Ready, Running, Waiting, Terminated)
- Process Control Block (PCB)
- Context Switch
- Multitasking
- Multiprocessing
- Multithreading
- Process Synchronization
- Inter-Process Communication (IPC)
-
- Device Drivers
- Device Controllers
- Interrupts
- DMA (Direct Memory Access)
- Polling
- Spooling
- Disk Structure
- Disk Scheduling Algorithms (see File Systems)
-
- System Performance
- System Calls
- Kernel Types:
- Virtual Machines (VMs)
- Resource Allocation
- Debugging Tools (strace, gdb)
- Synchronization Hardware (Test-and-Set, Compare-and-Swap)