Get premium membership and access questions with answers, video lessons as well as revision papers.
Monitors are a higher level synch primitive that takes the form of a data type, in which the compiler
defines mutual exclusion. When a thread calls a monitor which is already used, it is queued and sleeps
until the monitor is free again – very much like a semaphore, but needs to be defined beforehand as part
of the OS. A condition variable is a wait() and signal() primitive for monitor functions.
Titany answered the question on April 26, 2022 at 09:20
- Describe how to implement a lock using semaphores(Solved)
Describe how to implement a lock using semaphores
Date posted: April 26, 2022. Answers (1)
- A semaphore is a blocking synchronisation primitive. Describe how they work with the
aid of pseudo-code. You can assume the existance of a thread_block() and a...(Solved)
A semaphore is a blocking synchronisation primitive. Describe how they work with the
aid of pseudo-code. You can assume the existance of a thread_block() and a thread_wakeup()
function
Date posted: April 26, 2022. Answers (1)
- What is the producer consumer problem? Give an example of its occurrence in operating systems(Solved)
What is the producer consumer problem? Give an example of its occurrence in operating systems
Date posted: April 26, 2022. Answers (1)
- What is a test-and-set instruction? How can it be used to implement mutual exclusion?
Consider using a fragment of psuedo-assembly language aid you explanation(Solved)
What is a test-and-set instruction? How can it be used to implement mutual exclusion?
Consider using a fragment of psuedo-assembly language aid you explanation
Date posted: April 26, 2022. Answers (1)
- Interrupt disabling and enabling is a common approach to implementing mutual exclusion,
what are its advantages and disadvantages?(Solved)
Interrupt disabling and enabling is a common approach to implementing mutual exclusion,
what are its advantages and disadvantages?
Date posted: April 26, 2022. Answers (1)
- Why is turn passing a poor solution to the critical sections problem?(Solved)
Why is turn passing a poor solution to the critical sections problem?
Date posted: April 26, 2022. Answers (1)
- What are three requirements of any solution to the critical sections problem? Why are the
requirements needed?(Solved)
What are three requirements of any solution to the critical sections problem? Why are the
requirements needed?
Date posted: April 26, 2022. Answers (1)
- What is a critical region? How do they relate to controlling access to shared resources?(Solved)
What is a critical region? How do they relate to controlling access to shared resources?
Date posted: April 26, 2022. Answers (1)
- What is a race condition? Give an example(Solved)
What is a race condition? Give an example
Date posted: April 26, 2022. Answers (1)
- Context switching between two threads of execution within the operating system is
usually performed by a small assembly language function. In general terms, what does this
small...(Solved)
Context switching between two threads of execution within the operating system is
usually performed by a small assembly language function. In general terms, what does this
small function do internally?
Date posted: April 26, 2022. Answers (1)
- Enumerate the advantages and disadvantages of supporting multi-threaded applications
with kernel-level threads(Solved)
Enumerate the advantages and disadvantages of supporting multi-threaded applications
with kernel-level threads
Date posted: April 26, 2022. Answers (1)
- Why are user-level threads packages generally cooperatively scheduled?(Solved)
Why are user-level threads packages generally cooperatively scheduled?
Date posted: April 26, 2022. Answers (1)
- Name some advantages and disadvantages of user-level threads(Solved)
Name some advantages and disadvantages of user-level threads
Date posted: April 26, 2022. Answers (1)
- Describe how a multi-threaded application can be supported by a user-level threads package. It may be helpful to consider (and draw) the components of such...(Solved)
Describe how a multi-threaded application can be supported by a user-level threads package. It may be helpful to consider (and draw) the components of such a package, and the function they perform
Date posted: April 26, 2022. Answers (1)
- What is a process? What are attributes of a process?(Solved)
What is a process? What are attributes of a process?
Date posted: April 26, 2022. Answers (1)
- Multi-programming (or multi-tasking) enables more than a single process to apparently execute simultaneously. How is this achieved on a uniprocoessor?
(Solved)
Multi-programming (or multi-tasking) enables more than a single process to apparently execute simultaneously. How is this achieved on a uniprocoessor?
Date posted: April 25, 2022. Answers (1)
- Describe the three state process model, describe what transitions are valid between the
three states, and describe an event that might cause such a transition(Solved)
Describe the three state process model, describe what transitions are valid between the
three states, and describe an event that might cause such a transition
Date posted: April 25, 2022. Answers (1)
- Is putting security checks in the C library a good or a bad idea? Why?
(Solved)
Is putting security checks in the C library a good or a bad idea? Why?
Date posted: April 25, 2022. Answers (1)
- Why must the operating system be more careful when accessing input to a system call (or
producing the result) when the data is in memory...(Solved)
Why must the operating system be more careful when accessing input to a system call (or
producing the result) when the data is in memory instead of registers?
Date posted: April 25, 2022. Answers (1)
- Using a simple system call as an example (e.g. getpid, or uptime), describe what is
generally involved in providing the result, from the point of...(Solved)
Using a simple system call as an example (e.g. getpid, or uptime), describe what is
generally involved in providing the result, from the point of calling the function in the C
library to the point where that function returns
Date posted: April 25, 2022. Answers (1)