Compare the use of monitor and semaphore operations

Assignment Help Operating System
Reference no: EM131837536

Assignment 1:

1. Describe how multithreading improve performance over a singled-threaded solution.

2. Provide two programming examples of multithreading giving improved performance over a single-threaded solution.

3. Provide two programming examples of multithreading that would not improve performance over a single-threaded solution.

4. Why thread is necessary? What are the two differences between the kernel level threads and user level threads? Which one has a better performance?

5. List the differences between processes and threads.

6. What resources are used when a thread is created? How do they differ from those used when a process is created?

7. Describe the actions taken to context switch between threads.

8. If a multithreaded process forks, a problem occurs if the child gets copies of all the parent's threads. Suppose that one of the original threads was waiting For keyboard input. Now two threads are waiting for keyboard input, one in each process. Does this problem ever occur in single-threaded processes?

9. Why would a thread ever voluntarily give up the CPU by calling thread_yield? After all, since there is no periodic clock interrupt, it may never get the CPU back.

10. In a system with threads, is there one stack per thread or one stack per process when user-level threads are used? What about when kernel threads are used? Explain.

Assignment 2:

1. What is race condition?

2. When a computer is being developed, it is usually first simulated by a program that runs one instruction at a time. Even multiprocessors are simulated strictly sequentially like this. Is it possible for a race condition to occur when there are no simultaneous events like this?

3. Does the busy waiting solution using the turn variable (fig.2-20) work when the two processes are running on a shared-memory multiprocessor, that is, two CPUs, sharing a common memory?

4. Does Peterson's solution to the mutual exclusion problem shown in Fig 2-21 work when process scheduling is preemptive? How about when it is non- preemptive?

5. Consider a computer that does not have a TSL instruction but does have an instruction to swap the contents of a register and a memory word in a single indivisible action. Can that be used to write a routine enter_region such as the one found in fig. 2-22?

6. Give a sketch of how an operating system that can disable interrupts could implement semaphores?

7. What is the meaning of busy waiting? What others kinds of waiting are in OS? Compare each type on their applicability and relative merits.

8. Show the Peterson's algorithm preserve mutual exclusion, indefinite postponement and deadlock.

9. Compare the use of monitor and semaphore operations.

10. Define Semaphore. How does semaphore help in dinning philosopher problem. Explain.

11. Draw and describe the 3-state process model.

12. What is the problem with thread implementation in User Space when any one of the threads gets blocked while performing IO operation?

13. "Using Semaphore is very critical for programmer" Do you support this statement? If yes prove the statement with some fact. If not, put your view with some logical facts against the statement.

14. What is critical section problem? Why executing critical section must be mutual exclusive? Explain.

Reference no: EM131837536

Questions Cloud

Government bonds issued : There are two $100,000 government bonds issued today. Which one is more expensive?
What was his annual rate of return on this sculpture : Although appealing to more refined tastes, art as a collectible has not always performed so profitably. What was his annual rate of return on this sculpture?
Two machines to determine which one it should purchase : Central Hydraulics is analyzing two machines to determine which one it should purchase. Firm currently pays no taxes. Which machine should be purchased and why?
Compute the given ratios for ness company : The condensed financial statements of Ness Company for the years 2016 and 2017 are presented below.
Compare the use of monitor and semaphore operations : Compare the use of monitor and semaphore operations. Define Semaphore. How does semaphore help in dinning philosopher problem. Explain
What is the amount of the monthly payment : What is the amount of the monthly payment?
Find the market value of the annuity and total value : Find the market value of the annuity. Find the market value of the lump sum. Find the total value. What is the quoted price?
What is the regular irr of the better project : A company is analyzing two mutually exclusive projects, S and L, whose cash flows are shown below. What is the regular IRR (not MIRR) of the better project?
The business cycle and the effects on individual industries : Diagram the business cycle and the effects on individual industries. Why is an index measuring Christmas sales so important?

Reviews

Write a Review

Operating System Questions & Answers

  What if four hexadecimal digits are used

What if four hexadecimal digits are used? Explain your answer.

  How could you try to solve this problem using a gui

Open a Command Prompt (MS-DOS Prompt) window and complete the following activities. As always, be sure to cite any sources you use in your response.

  Differences between a windows and a linux operating system

What are the differences between a Windows operating system and a Linux operating system

  What are some metrics that can be used during the sdlc

What are some of the methodologies commonly used for requirements elicitation?

  Implementing a data warehouse project

Assume you are implementing a data warehouse project for a consumer and require to evaluate the many tools available for extracting, transforming, and loading data into the data warehouse from several sources.

  Unix command practice

Ques 2: Assuming that a file's current permission are rwx r-- r-x , specify chmod expression required for this change Ques 3: Your application home directory is full? How will you find which directory is taking how much space?Ques 4: How do you find ..

  Point to point and end to end security models

Argue differences in point to point and end to end security models and security problems they address. Are they redundant?

  Characterize page fault rate-process first start execution

When a process first start execution, how would you characterize the page fault rate? Once the working set for a process is loaded into memory, how would you characterize the page fault rate?

  1 what factors affect storage speed2 what features should

1. what factors affect storage speed?2. what features should you look for in a printer? describe at least four in

  Questiona process is a program under execution and as it

questiona process is a program under execution and as it executes it changes state. the state of a process is defined

  Estimate the compression factor for music.

The CPU of a video server has a utilization of 65%. How many movies can it show using RMS scheduling?

  Set of three uml class relationship diagrams

Prepare a set of three UML class relationship diagrams highlighting important relations among the discovered classes. Each diagram should give a coherent picture of relations among 3-5 classes.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd