Question

In: Computer Science

Operating Systems Concepts What difficulties arise from concurrency? What are the requirements necessary to support mutual...

Operating Systems Concepts

  1. What difficulties arise from concurrency?
  1. What are the requirements necessary to support mutual exclusion?
  1. Does interrupt disabling work on multiprocessors? Why?

Solutions

Expert Solution

What difficulties arise from concurrency?

Concurrency means process or several instruction running at the same time . In OS a process is divided into multiple threads and some threads runs in parallel. they uses a shared memory or sharing  same resource . There are many resources that are commonly shared among many threads .

Concurrency does not mean that more than one processes are running simultaneously in the CPU Just Remember that a single process can only be present at CPU at any point of time in a Uni-processor system.

Problems in Concurrency

1.Sharing some global resources is difficult as i=global resources are common to all so it mayn't be allocated to everyone at one point of time. So safety of resources is a problem.

2.Optimally allocating resources to more than one process

3.Programming errors can occur because a shared resource is being updated by many process so at the end it may lead to error .

What are the requirements necessary to support mutual exclusion?

Mutual Exclusion is a very important property to satisfy synchronization between different processes . It means that only one process can be present at any time inside critical section using shared resources . As critical section contains shared resources so by allowing only one process at a time we can make sure no redundancy or deadlock will occur

1 No Deadlock

2. No starvation every process will get a chance to execute .

3. Fairness every process will get equal and fair chance to execute its instructions .

4. Consider a reader -writer problem if any reader is reading then no writer is allowed to enter and update the data before reader exit the shared region and vice versa . As it may lead to a problem of synchronization between the two.

3. Does interrupt disabling work on multiprocessors? Why?

No Interrupt Disabling doesn't work on multiprocessors systems. It works on only uni-processor system .In this mechanism a process before entering into critical section disables the interrupt and enabling the interrupt after it enters into Critical section So mutual exclusion is achieved as no other process can interrupt the already running process in between it's execution thus it excludes all other processes from entering into CS.

So this technique is used and applicable for only Uni -processor CPU but now lets talk about multiprocessors

IN multiprocessors many processes run in different CPUs' at so let's say if any process of CPU 1 disable interrupt then only process in CPU 1 cannot enter into CS as their interrupt is enabled . But processes running in other CPU's like CPU 2 Or CPU 3 then those processes don't have any boundation on entering CS they can enter the CS and fight for the shared resource and access them at same point of time which may lead to deadlock or programming erros can occure

so disabling interrupt doesn't work on multiprocessors as it doesn't make sure of mutual exclusion in multiprocessors systems


Related Solutions

Using the concepts from the Concurrency Basics Tutorial I provided in Modules, write a program that...
Using the concepts from the Concurrency Basics Tutorial I provided in Modules, write a program that consists of two threads. The first is the main thread that every Java application has. The main thread should create a new thread from the Runnable object, MessageLoop, and wait for it to finish. If the MessageLoop thread takes too long to finish, the main thread should interrupt it. Use a variable named maxWaitTime to store the maximum number of seconds to wait. The...
What difficulties might you anticipate when using the rational problem-solving process?  Why? What additional difficulties might arise...
What difficulties might you anticipate when using the rational problem-solving process?  Why? What additional difficulties might arise because of personal attributes? Which of these have you experienced? Explain. What were the consequences? How can these difficulties be avoided?
Why are good systems operational requirements and a maintenance & support concept important?
Why are good systems operational requirements and a maintenance & support concept important?
Using Eclipse to answer this Java question Using the concepts from the Concurrency Basics Tutorial I...
Using Eclipse to answer this Java question Using the concepts from the Concurrency Basics Tutorial I provided in Modules, write a program that consists of two threads. The first is the main thread that every Java application has. The main thread should create a new thread from the Runnable object, MessageLoop, and wait for it to finish. If the MessageLoop thread takes too long to finish, the main thread should interrupt it. Use a variable named maxWaitTime to store the...
What are some expectations from auditors when entities face economic difficulties? Support your answer with some...
What are some expectations from auditors when entities face economic difficulties? Support your answer with some examples.
What information is necessary for the operating budgets?
What information is necessary for the operating budgets?
Should we adopt the land ethic suggested by Aldo Leopold? What sorts of difficulties might arise...
Should we adopt the land ethic suggested by Aldo Leopold? What sorts of difficulties might arise if we consider things like soil, water, and plants as members of the same moral community to which we belong?
what is Cloud and IoT Operating Systems ?
what is Cloud and IoT Operating Systems ?
Prompt: What are some of the most important concepts from Management Information Systems applied today in...
Prompt: What are some of the most important concepts from Management Information Systems applied today in the real world? How will this information benefit you?
What concepts, ideas, and items are necessary in determining a location for a sporting event? What...
What concepts, ideas, and items are necessary in determining a location for a sporting event? What do you think is the most important
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT