Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Operating System Expert

Deadlock/Scheduling/Virtual Memory - Operating Systems

PROBLEM A:

Write a program to model deadlock detection. The program will accept a list of processes, resources, requests, and releases in the following format:

A req R

A req S

A rel R

A rel S

B req S

B req R

B rel S

B rel R

The program will then produce possible orderings of the resource requests/releases. Orderings within a process cannot be rearranged (so A must always request R before it can request S in the example above), however orderings across processes can be rearranged (B can request S and R before A requests R). Each ordering will be output with a header, the ordering, and an indication if the order causes a deadlock or not.

For example:

ORDER 1: A req R, A req S, A rel R, A rel S, B req S, B req R, B rel S, B rel R ORDER 2: A req R, A req S, A rel R, B req S, A rel S, B req R, B rel S, B rel R
...
ORDER x: A req R, B req S, A req S, B req R DEADLOCK!

Try your program with the following input files:

--------------File 1------------
A req R A req S A rel R A rel S B req S B req R B rel S B rel R

--------------File 2------------
A req R A req S A rel R A rel S B req S B req T B rel S B rel T C req T C req R C rel T C rel R

PROBLEM B:

Design, implement, and gather results for a set of experiments to determine:
- the OS quantum
- the OS context switch overhead

Hints (you can ignore these if you have your own idea):
- Use a HIGH RESOLUTION TIMER
- You may need more than one thread/process for this
- You can look up the number of context switches that process has performed
- For the quantum measurement, you want your thread/processes to be doing work, you can also check your result against: sched_rr_get_interval. This method may work for you... I've had some success with it... however I've also had students with problems with this method... it simply returns a quantum of 0. Try it.
- For the context switch overhead measurement, you want your thread/process to not be doing work

Place your results in a README.TXT file.

PROBLEM C:

Write a program that simulates a paging system using the following reference string: 0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1
Assume that the computer can hold only FOUR page frames at any one time. Your program should output the number of page faults when simulating the following page replacement algorithms:
- Optimal (do not hard code this, you must determine this from the reference string in your program)
- FIFO
- LRU

Based on the results from the simulation. Which algorithm is the best? Which algorithm is the worst? Why?

Operating System, Computer Science

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

Have any Question?


Related Questions in Operating System

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 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 ...

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 ...

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 ...

Question note apa format 250 words and three reference

Question: Note: APA format 250 words and three reference without plagarism Computerized Operating Systems (OS) are almost everywhere. We encounter them when we use out laptop or desktop computer. We use them when we use ...

Catalog course descriptionin this course students carry out

Catalog Course Description In this course students carry out independent research in a significant technical area of information, network, and computer security. The student is to investigate a technical area, research i ...

Question students working at individual pcs in a computer

Question : Students working at individual PC's in a computer laboratory send their files to be printed by a server that spools the files on its hard disk. Under what conditions may a deadlock occur if the disk space for ...

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 ...

Question 1answer the following questions 10 marks a

Question 1 Answer the following questions: 10 marks a. Consider the following page reference string: 3, 1, 4, 1, 2, 3, 5, 3, 2, 1, 2,5, 4, 3, 5, 2, 4,2, 5,3 Using the above page reference string display the contents of t ...

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. Consider a computer embedded in the control of a manned spacecraft. Would it require an ...

  • 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