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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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