search
Log In

Recent questions tagged process-synchronization

2 votes
1 answer
1
Consider a computer system with multiple shared resource types, with one instance per resource type. Each instance can be owned by only one process at a time. Owning and freeing of resources are done by holding a global lock $(L)$. The ... that deadlocks will not occur The scheme may lead to live-lock The scheme may lead to starvation The scheme violates the mutual exclusion property
asked Feb 18 in Operating System Arjun 784 views
2 votes
2 answers
2
Consider the following pseudocode, where $\textsf{S}$ is a semaphore initialized to $5$ in line $\#2$ and $\textsf{counter}$ is a shared variable initialized to $0$ in line $\#1$. Assume that the increment operation in line $\#7$ is $\textit{not}$ ... $0$ after all the threads successfully complete the execution of $\textsf{parop}$ There is a deadlock involving all the threads
asked Feb 18 in Operating System Arjun 972 views
1 vote
1 answer
3
Which of the following statements about semaphores is true? $P$ and $V$ operations should be indivisible operations. A semaphore implementation should guarantee that threads do not suffer indefinite postponement. If several threads attempt a $P(S)$ operation simultaneously, only one thread should be allowed to proceed. All of the above.
asked Mar 31, 2020 in Operating System Lakshman Patel RJIT 405 views
0 votes
1 answer
4
A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication is called _______. Local Procedure Call Remote Procedure Call Inter Process Communication Remote Machine Invocation
asked Mar 31, 2020 in Operating System Lakshman Patel RJIT 395 views
4 votes
4 answers
5
The operating system and the other processes are protected from being modified by an already running process because they run at different time instants and not in parallel they are in different logical addresses they use a protection algorithm in the scheduler every address generated by the CPU is being checked against the relocation and limit parameters
asked Jan 13, 2020 in Operating System Satbir 1.2k views
1 vote
1 answer
6
Dispatch latency is defined as the speed of dispatching a process from running to the ready state the time of dispatching a process from running to ready state and keeping the CPU idle the time to stop one process and start running another one none of these
asked Jan 13, 2020 in Operating System Satbir 1.4k views
0 votes
0 answers
7
Write a producer-consumer problem that uses threads and shares a common buffer. However, do not use semaphores or any other synchronization primitives to guard the shared data structures. Just let each thread access them when it wants to. Use sleep and wakeup to handle the ... number once in a while. Do not print more than one number every minute because the I/O could affect the race conditions.
asked Oct 25, 2019 in Operating System Lakshman Patel RJIT 196 views
0 votes
0 answers
8
Suppose that a university wants to show off how politically correct it is by applying the U.S. Supreme Court's Separate but equal is inherently unequal'' doctrine to gender as well as race, ending its long-standing practice ... write the following procedures: woman_wants_to_enter, man_wants_to_enter, woman_leaves, man_leaves. You may use whatever counters and synchronization techniques you like.
asked Oct 25, 2019 in Operating System Lakshman Patel RJIT 216 views
0 votes
0 answers
9
The readers and writers problem can be formulated in several ways with regard to which category of processes can be started when. Carefully describe three different variations of the problem, each one favoring (or not favoring) some category of processes. For each variation ... what happens when a reader or a writer becomes ready to access the database, and what happens when a process is finished.
asked Oct 25, 2019 in Operating System Lakshman Patel RJIT 67 views
0 votes
1 answer
10
The $CDC\: 6600$ computers could handle up to $10\: I/O$ processes simultaneously using an interesting form of round-robin scheduling called processor sharing. A process switch occurred after each instruction, so instruction $1$ came from process $1$, instruction $2$ ... $T$ sec to complete in the absence of competition, how much time would it need if processor sharing was used with n processes?
asked Oct 25, 2019 in Operating System Lakshman Patel RJIT 81 views
0 votes
1 answer
11
Synchronization within monitors uses condition variables and two special operations, wait and signal. A more general form of synchronization would be to have a single primitive, waituntil, that had an arbitrary Boolean predicate as parameter. Thus, one could say, for example, ... general than that of Hoare or Brinch Hansen, but it is not used. Why not? (Hint: Think about the implementation.)
asked Oct 25, 2019 in Operating System Lakshman Patel RJIT 154 views
1 vote
2 answers
13
Why in reader section we are locking(I highlighted the locking) read_count-- and if section? If we don't use locking what problems might arise? I know that we should use locking whenever we access shared variable but in this particular case I don't see any problem if we don't use locking(highlighted). Please explain what I am missing
asked May 26, 2019 in Operating System Bhaskar Singh 464 views
0 votes
2 answers
14
Consider the two processes need to access $P_{i}$ and $P_{j}$ need to access the C.S. The following synchronization construct used by both the processes. Process Pi While(true){ j=false; i=true; while(j==true); CRITICAL SECTION i=false; } Process Pj While(true){ i= ... while(i==true); CRITICAL SECTION j=false; } I got it is not satisfying M.E., but will it satisfying deadlock too?? Plz explain-
asked May 20, 2019 in Operating System srestha 596 views
0 votes
0 answers
15
Galvin, 9th edition on page 146 states that Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls and thus require the more time-consuming task of kernel intervention. In shared-memory systems, system ... I agree that shared memory is bound to be faster, but aren't the mutex and semaphore calls require Kernel intervention?
asked May 5, 2019 in Operating System vinay chauhan 302 views
0 votes
0 answers
16
Design an algorithm for a monitor that implements an alarm clock that enables a calling program to delay itself for a specified number of time units (ticks). You may assume the existence of a real hardware clock that invokes a function $tick()$ in your monitor at regular intervals.
asked Mar 20, 2019 in Operating System akash.dinkar12 238 views
0 votes
0 answers
17
Suppose we replace the $wait($) and $signal()$ operations of monitors with a single construct a $wait(B)$, where B is a general Boolean expression that causes the process executing it to wait until B becomes true. a. Write a monitor using this ... construct cannot be implemented efficiently. c. What restrictions need to be put on the await statement so that it can be implemented efficiently ?
asked Mar 20, 2019 in Operating System akash.dinkar12 106 views
0 votes
0 answers
18
When a signal is performed on a condition inside a monitor, the signaling process can either continue its execution or transfer control to the process that is signaled. How would the solution to the preceding exercise differ with these two different ways in which signaling can be performed?
asked Mar 20, 2019 in Operating System akash.dinkar12 113 views
...