Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For this week, take one of the topics in the readings, find a reference outside

ID: 3710112 • Letter: F

Question

For this week, 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 e e e e e Some suggested topics: 1. Spin locks 2. Atomic read/write operations vs the real world 3. Sequentially consistent 4. Memory barrier instructions 5. Test and set locks: getAndSet,compareAndSet ( 6. Monitors, locks, conditions 7. Locked queue 8. Lost wake up events 9. Readers writers locks memory 10. Reentrant locks 11. Semaphores 12. Threads -creating and running them 13. Thread structure of the JVM and the Java GUI classes 14. Race con 15. Writing a concurrent program ditions and deadlocks a. condition variables b. producer-consumer problem c. finding objects d. active, passive and control objects

Explanation / Answer

Solution:

Topic: Spin Locks

Spinlock is a locking mechanism. If a thread is waiting for a blocked resource the thread will spin until the resource is available. This is called busy waiting. Because the thread is active but will go nothing.

The alternative is a mutex. In this the thread will be put in a queue and when the resource is free. The OS will activate the thread. Here Locking/Unlocking is very heavy but the wait time is 0.

Spinlocks are useful when you already know that wait time is going to be very low.

Note: Sharing of external links on Q&A is against Chegg guidelines, please ask it in the comments if you really need it.

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote