Ask Operating System Expert

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.

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M92665896

Have any Question?


Related Questions in Operating System

Research types of operating systems that are currently

Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Explain why you think the choice you made ...

Question research hex editors available for mac os and

Question : Research hex editors available for Mac OS and Linux. Based on the documentation, how easy would validating these tools be? Select at least two hex editors for each OS, and discuss what you would do to validate ...

Foundation of information technologyresearch types of

Foundation of Information Technology Research types of operating systems that are currently available and provide a scenario in which the operating system you chose would be appropriate to be used in this situation. Expl ...

Assignment -building a multi-threaded web server using c

Assignment - Building a multi-threaded web server using C and p threads, following the model from the lecture. Your program will have one thread acting as a dispatcher thread, listening fornetwork connections with reques ...

Question you are a security administrator responsible for

Question: You are a security administrator responsible for providing secure configuration requirements for new laptop deployments. After reading Module 2 of Certified Secure Computer User v2exercises, apply the configura ...

Question what do you see as the major differences between

Question : What do you see as the major differences between UNIX/Linux and other operating systems, such as Windows and Mac OS X? The response must be typed, single spaced, must be in times new roman font (size 12) and m ...

Question description of lasa in this assignment you will

Question: Description of LASA: In this assignment, you will select a real-world operating system (can be for a PC, server, tablet, handheld, or embedded device). You will introduce the operating system and its components ...

Discussion question this research assignment will give

Discussion Question : This research assignment will give further information on the nature and workings of multi-tasking and multi-processing operating systems. All information reported in this assignment is to be in the ...

Taskyour job in this assignment is to create two virtual

Task Your job in this assignment is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these VM's is to offer services to a user base. The ...

State the required answer precisely and then provide proper

State the required answer precisely and then provide proper explanation. It is not enough to provide one- word or one-line answers. Briefly describe the following concepts and indicate how they are related in the context ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As