What is the turnaround time of each process

Assignment Help Operating System
Reference no: EM131291796

Question 1: Consider the following set of processes, with the length of the ctiu burst given in milliseconds:

Process       Burst Time     Priority

P1                    2                    2

P2                    1                    1

P3                    8                    4

P4                    4                    2

P5                    5                    3

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time O.

a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, nonpreemptive priority (a larger priority number implies a higher priority), and R R (quantum = 2)+

b. What is the turnaround time of each process for each of the scheduling algorithms in part a?

c. What is the waiting time of each process for each of these schedul-ing algorithms?

d. Which of the algorithms results in the minimum average waiting time (over all processes)?

Question 2: The following processes are being scheduled using a preemptive, round-robin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. In addition to the processes listed below, the system also has an idle task (which consumes no CPU resources and is identified as Pure). This task has priority 0 and is scheduled whenever the system has no other available processes to run. The length of a time quantum is 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue.

Thread Priority  Bust Arrival
P1 4a 20 0
p2 30 25 25
P3 30 25 30
P4 35 15 60
P5 5 10 100
P6 10 10 105

a. Show the scheduling order of the processes using a Gantt chart.

b What is the turnaround time for each process?

c. What is the waiting time for each process?

d. What is the CPU utilization rate?

Question 3: Consider the following snapshot of a system:

   Allocation  Max     Available
      ABCD     ABCD    ABCD

P0  0012      0012    1520
P1  1000     1750
P2  1354     2356
P3  0632     0652
P4  0014     0656

Answer the following questions using the banker's algorithm:

a. What is the content of the matrix Need?

b. Is the system in a safe state?

c. If a request from process 131 arrives for (0,42,0), can the request be granted immediately?

Question 4 Consider the following snapshot of a system:


Allocation Max Available

ABCD ABCD ABCD
P0 2001 4212 3321
P1 3121 5252
P2 2103 2316
P3 1312 1424
P4 1432 3665

Answer the following questions using the banker's algorithm:
a. Illustrate that the system is in a safe state by demonstrating an order in which the processes may complete.
b. If a request from process Pi arrives for (1, 1, 0, 0), can the request be granted immediately?
c. If a request from process P4 arrives for (0, 0, 2, 0), can the request be granted immediately?
For all these questions, please consider taking inputs from the file. Don't fixed the input in your
Program. We will test with various data given though the file.

Attachment:- Instructions.rar

Verified Expert

This assignment is based on operating system. A java program is designed for various CPU Scheduling algorithms and Bankers algorithm CPU scheduling algorithms includes FCFS, round robin, SJF and priority algorithm. The burst time, priority and arrival time of the process are read from the text file. A gantt chart of the scheduling is drawn. Together with this waiting time, turn-around time and CPU utilization rate is obtained. The bankers algorithm is implemented in Java to determine the need matrix and safe state of the system. The input to this program too is provided with the help of the input file..

Reference no: EM131291796

Questions Cloud

Bank reconciliation and adjusting entries : Bank reconciliation and adjusting entries; cash and cash equivalents [Appendix 7A] The bank statement for the checking account of Management Systems Inc. (MSI) showed a December 31, 2016, balance of $14,732.37. What amount would MSI report as cash an..
Calculate ordinary gain when it is sold during third year : A drill press with a cost basis of $55,000 is a 7-year MACRS property. Calculate ordinary gain when it is sold during the third year for $35,000. Round to the nearest integer.
Calculate ordinary gain when it is sold during third year : A drill press with a cost basis of $55,000 is a 7-year MACRS property. Calculate ordinary gain when it is sold during the third year for $35,000. Round to the nearest integer.
Compute the depreciation charges at year two : A depreciable asset costs $20,000 and has an estimated salvage value of $4,500 at the end of its 5-year depreciable life. Use DB depreciation with depreciation rate 1.5 to compute the depreciation charges at year 2.
What is the turnaround time of each process : What is the turnaround time of each process for each of the scheduling algorithms in part and what is the waiting time of each process for each of these schedul-ing algorithms?
Write a java application that displays the triangle patterns : Write a Java application (Triangles.java) that displays the following triangle patterns side-by-side using nested while loops. Everything can be in main().
Discuss about the motivations of altruistic behavior : Justify the use of elements by connecting them to various motivations of altruistic behavior as identified in social exchange theory.
Compare and/or contrast your responses : encourage further dialogue and discussion,encourage your classmate to think about other aspects of the topic,ask a relevant, meaningful question to better assist with your understanding,compare and/or contrast your responses
Mission or values statement : Which of the following exist in an organization where you've worked: mission or values statement, policy manual, code of conduct, ethics training (who conducts it), hotline? Were they consistent and credible?

Reviews

len1291796

11/26/2016 8:08:20 AM

Question :coding must have be by Java eclipse + documentation assignment and instructions input are attached For all these questions, please consider taking inputs from the file. Don't fixed the input in your Program. We will test with various data given though the file

Write a Review

Operating System Questions & Answers

  When a customer buys an item from the store

When a customer buys an item (or several) from the store, several changes to database tables will occur. Explain what those might be.

  Applying forensic science to computers

In our first seminar, we will learn how to acquire, authenticate, and analyze digital evidence. We will compare the technology and law for different countries.

  How long would it take to run the jobs consecutively

How long would it take to run the jobs consecutively in batch mode and How would this improve if multiprogramming was allowed?

  Combining global variables and functions

The parameter list is the normal means to supply values to a function. Global variables are an alternate means for a function to have access to values.

  Change the permissions on a file

Write a command which will change the permissions on a file named boreworms.txt so that the owner of the file has read and execute permission, the group owner has read permission, and no one else has any access to the file.

  What are the processes that are not bothered by the swapper

What are the processes that are not bothered by the swapper? Give Reason. What are the requirements for a swapper to work?

  Issues with trusted platform module

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

  What is the predication about of the next run time?

1). An aging algorithm with a = 1/2 is used to predict run times. The previous four runs, from oldest to most recent, are 30, 10, 20, 40 msec. what is the predication about of the next run time? You may use regular arithmetic or binary with bit shift..

  Tasks that a linux administrator performs

It is clear that the HWBS administration staff is a junior staff that has mostly focused on Windows servers. They are concerned that the tasks that they will need to learn will cause a tremendous amount of unneeded stress. Describe to the staff th..

  Determine the number of hits and misses

Assuming the following memory accesses on a Direct Mapped cache unit which is defined by a 2-bit offset, index, and tag. Determine the number of hits and misses for the following sequence of memory addresses: 27, 15, 60, 43, 11, 48, 54, 15, 43, 22

  Implement a multiprocess downloader application

Appreciate the performance and fault-tolerance bene_ts of multi-process applications - implement a multiprocess downloader application.

  What is gained by increasing the rotation speed of a disk

1. What is gained by increasing the rotation speed of a disk or a CD?

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