Start learning 50% faster. Sign in now
Get Started with ixamBee
Start learning 50% faster. Sign in nowA semaphore is a synchronization mechanism that is crucial for controlling access to shared resources in a multithreaded environment. It serves as a signaling mechanism that can be used to prevent race conditions, which occur when multiple threads attempt to modify shared data simultaneously, leading to unpredictable outcomes. Semaphores maintain a count of available resources and ensure that only a certain number of threads can access the critical section of code at any given time. When a thread wants to enter a critical section, it checks the semaphore's value; if it is greater than zero, the thread decrements it and proceeds; otherwise, it is blocked until the semaphore is released by another thread. This prevents multiple threads from executing critical sections concurrently, thereby eliminating race conditions and ensuring data consistency. Option B (Fork) - Fork is used to create new processes, not for synchronizing access to shared resources. Option C (Signal) - Signals are used for inter-process communication but do not provide the same level of resource control as semaphores. Option D (Context Switch) - Context switching refers to the operating system's ability to switch between processes and threads, which does not inherently prevent race conditions. Option E (Stack) - A stack is a data structure and does not serve any synchronization purpose in multithreading.
Offices of __________ are designated as Stand-Up Connect Centres to arrange the support that is needed under the Stand Up India Scheme.
Which entities are excluded from the scope of the Master Circular related to housing finance?
Deendayal Antyodaya Yojana-National Rural Livelihood Mission is administered by which of the following Ministries?
Consider the following statements regarding bullion:
1) Bullion is a precious metal like gold or silver that is valued by weight and purity. <...
Which of the following financial ratios is most indicative of a firm's ability to service long-term debt obligations, especially in light of the declini...
Which of the following committee oversees the credit/counterparty risk and country risk in a bank?
A manufacturing company is considering expanding its production capacity by acquiring new machinery. The company is exploring the option of leasing the ...
What is the risk weight for the housing loans with LTV Ratio (Loan to Value Ratio) lesser than 80%?
Which of the following is not a type of bank in India?
The Risk based supervision (RBS) for banks was introduced in 2012 by RBI. Which of the following is correct regarding RBS?