(Mutex Lock): basic understanding of spinlock and its advantages & disadvantages
ID: 658225 • Letter: #
Question
(Mutex Lock): basic understanding of spinlock and its advantages & disadvantages
(Semaphores): basic concept of semaphore, its use and its implementation o Section 5.11 (Deadlock): just focus on the semantics of resourceallocation graph in characterizing a deadlock scenario
(Basic concept) focus on the concept of CPU scheduling; check the components involved in CPU scheduling
(Scheduling Algorithms): focus on the basic concept on the working principle of major four algorithms;
(Fragmentation): focus on causes and solutions
(Paging): (Basic concepts) and (TLB) only, but these two subsections are important and thorough reading may help; however
(Demand Paging)
Explanation / Answer
Mutex Lock:-
Spinlocks are an abstract data types or classes, which support Busy-Wait solution for the Mutual Exclusion Problem.
Now the operations perform on the spinlocks are InitLock, Lock, and Unlock.
Here the pseudo codes for implementing the SpinLocks are as follows:
typedef int SpinLock;
void InitLock(SpinLock *R)
{*R = 0;}
void Lock(SpinLock *R)
{ while (TestAndSet(R)); }
void UnLock(SpinLock *R)
{*R = 0;}
THE FRAGMENTATION PROBLEM:-
THRASHING:-
When a computer's virtual memory subsystem is in a constant state of paging then the thrashing may occurs, rapidly exchanging the data in memory for data on disk, to the exclusion of most application-level processing.
This causes the performance of the computer to degrade or collapse. The situation may continue indefinitely until the underlying cause is addressed.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.