take one of the topics in the readings, find a reference outside our readings ta
ID: 3822904 • Letter: T
Question
take one of the topics in the readings,
find a reference outside our readings talking about that topic
cite your reference
tell us a little about how the two presentations relate to each other
tell us what you have learned about that topic from your readings
Some suggested topics:
Spin locks
Atomic read/write operations vs the real world
Sequentially consistent memory
Memory barrier instructions
Test and set locks: getAndSet (), compareAndSet ()
Monitors, locks, conditions
Locked queue
Lost wake up events
Readers writers locks
Reentrant locks
Semaphores
Threads - creating and running them
Thread structure of the JVM and the Java GUI classes
Race conditions and deadlocks
Writing a concurrent program
condition variables
producer-consumer problem
finding objects
active, passive and control objects
Explanation / Answer
Spinlock:
A spinlock is a lock mechanism which causes a thread and trying to acquire it to simply wait in a loop and then it repeat while checking taht if the lock is available or not.In that situations the thread remains active but not performing a task, the main use of such lock is waiting.After that spinlocks will usually be held until they are explicitly released. Spin locks are kernel-defined and it can be used to protect shared data.Alomst each and every component use spin locks, including drivers.The main point here is spinlocks are efficient if thread blocks for only short periods.In this short situations only kernels use spinlocks. As like spinlocks become wasteful if held for they are longer durations. Because the longer block causes the greater the risk that the thread will be interrupted by the OS scheduler. If this happens, other threads will be left spinning.What the next happend is is an infinite postponement until the thread holding the lock can finish.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.