Deadlock-handling process chooses the next process

Assignment Help Operation Management
Reference no: EM13334375

In this assignment, you will implement a deadlock avoidance algorithm as part of the process manager to avoid deadlocks in a Unix/Linux system. Part of the assignment requires the manipulation of Unix/Linux processes and part of it consists of simulation.

Both the deadlock-handling process and the processes requesting resources are real Unix/Linux processes created using fork(). However, you do not need to actually allocate any resource. The main process executes the Banker's algorithm. The resource-requesting processes make requests by communicating with the deadlock-handling process with either Unix/Linux pipes or shared memory controlled by semaphores (your choice, but pipes are easier to use).

The deadlock-handling process chooses the next process with the longest computation time (LJF) to be serviced. The rationale is that a long process should be executed earlier. Note that this is the opposite of shortest job first (SJF). After having one request serviced, a process has to allow another process to make a request before making another one, that is, another process with the longest computation time is chosen for service. Ties are broken in favor of the process with the nearest absolute deadline. A process can also release resources during its execution, and releases all resources held when it terminates.

Associated with each process is also a relative deadline (that is, the deadline from the current time instant). One time unit is needed for servicing each request (whether the resource is allocated or not), so the relative deadline for each process is decreased by 1 whether it is serviced or not. If the resource is allocated for a request, then the computation time of this process decreases by 1; otherwise, the computation time remains the same. If a process misses its deadline, keep servicing its requests but indicate the deadline miss in the output. A release instruction also needs 1 unit of computation time just like a request.

The input format is as follows:

m /* number of resources */

n /* number of processes */

available[1] = number of instances of resource 1

:

available[m] = number of instances of resource m

max[1,1] = maximum demand for resource 1 by process 1

:

max[n,m] = maximum demand for resource m by process n

process_1:

deadline_1 /* an integer, must be >= computation time */

computation_time_1 /* an integer, equal to number of requests and releases */

:

request(0,1,0,...,2) /* request vector, m integers */

:

release(0,1,0,...,1) /* release vector, m integers */

:

request(1,0,3,...,1) /* request vector, m integers */

:

end.

:

process_n:

deadline_n /* an integer */

computation_time_n /* an integer, equal to number of requests and releases */

:

request(0,2,0,...,2) /* request vector, m integers */

:

release(0,1,0,...,2) /* release vector, m integers */

:

request(1,0,3,...,1) /* request vector, m integers */

:

end.

For output, print the state of the system after servicing each request: the arrays available, allocation, need, and deadline misses, if any.

Next, let's try EDF (earliest deadline first scheduling) instead of LJF. The deadlock-handling process chooses the next process with the nearest absolute deadline to be serviced. Ties are broken in favor of the process with the longest execution time. Which scheduling technique yields fewer deadline misses?

Reference no: EM13334375

Questions Cloud

Determine what is the required rate of return on aas stock : AA Industries's stock has a beta of 0.8. The risk-free rare is 4% and the expected return on the market is 12%. What is the required rate of return on AA's stock
Explain multidimensional analysis : Give at least three reasons why ETL functions are most challenging in a data warehouse environment.
What does he mean by the veil of separation : Dubois writes of the "little world" in Tennessee, where he was a schoolteacher, and of the "'veil" separating the black community there from the rest of the nation. Why was he living in a "little world" and what does he mean by the "veil" of se..
Handle competitive pressures in private firms : Explain and critically discuss how human resource management can provide managers with solutions to handle competitive pressures in private firms
Deadlock-handling process chooses the next process : The deadlock-handling process chooses the next process with the nearest absolute deadline to be serviced. Ties are broken in favor of the process with the longest execution time. Which scheduling technique yields fewer deadline misses?
Estimation-forecasting-linear programming : Please describe ways in which two or more of the following techniques (Estimation, Forecasting, Linear Programming, and Econometrics) can be used together to solve a business problem, and please describe the nature of such a problem for which joint u..
Explain what volume in ml should be measured out : An experiment requires 42.5 g of sulfuric acid, which is easier to measure by volume than by mass. What volume in mL should be measured out, if the density of the sulfuric acid is 1.84 g/cm^3
What is the value of net domestic product : How does the income approach to measuring gdp differ from the expenditure approach? Explain the meaning of value added and it's importance in the income approach. Consider the following data for the selling price at each stage in the production of a ..
Estimate the magnetic field strength at the surface of bulb : Assume that a 7.0-cm-diameter, 50 W light bulb radiates all its energy as a single wavelength of visible light. Estimate the magnetic field strength at the surface of the bulb

Reviews

Write a Review

Operation Management Questions & Answers

  Book review - the goal

Operations Management is about a book review. Title of the book is "Goal". This book has been written by Dr. Eliyahu Goldartt. The book has been appreciated by many as one of those books which offers an insight into the operations and strategic capac..

  Operational plan in hospitality enterprise

Operational plan pertaining to a hospitality enterprise is given in detail in the solution. The operational plan is an important plan or preparation which gives guidelines regarding the role and responsibilities of each and every operation at all lev..

  Managing operations and information

Recognise the importance of a strategic approach to the development and deployment of organisational information systems. Demonstrate an understanding of the importance of databases and their integration to the organisation's overall information mana..

  A make-or-buy analysis

An analysis of the holding costs, including the appropriate annual holding cost rate.

  Evolution and contributor of operations management

Briefly explain Evolution and contributor of Operations management.

  Functions and responsibilities of an operations manager

A number of drivers of change have transformed the roles, functions and responsibilities of an operations manager over recent years. These drivers have not only been based on technological innovations but also on the need for organisations to develop..

  Compute the optimal order quantity

Compute the Optimal Order quantity of DVD players. Determine the appropriate reorder point.

  Relationship to operations practice in the organisation

Evaluate problems in operations and identify approaches to overcoming them. Critically evaluate operating plans and identify areas for improvement. Justify, implement and evaluate changes to operations in line with modern approaches.

  A make or buy analysis

Develop a report for Figi Fabricating that will address the question of whether the company should continue to purchase the part from the supplier or begin to produce the part itself.

  Prepare a staffing plan

Prepare a staffing plan showing the change of your unit from medical/surgical staffing to oncology staffing.

  Leadership styles in different organizations

Ccompare the effectiveness of different leadership styles in different organizations

  Risk management tools and models

Be able to understand the concept of risk, roles and responsibilities for risk management and risk management tools and models.

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