Preemptive cpu scheduling algorithm

Assignment Help Basic Computer Science
Reference no: EM133269914

Problem:

Write C program to simulate the following preemptive CPU scheduling algorithm to find turnaround time and waiting time.

Let's assume that total number of processes are always 5 in the ready queue at any particular time (program run). Accept the CPU burst times and arrival times for each of the processes. Sort your processes in ascending order according to the CPU-burst requirements. In case two or more processes have the same execution requirement then FCFS approach will be performed. Your code should handle the preemption on the basis of shorter remaining times of the processes. Calculate the average waiting time and average turnaround time.

Marking Criteria:

Correct Input (with validation check on zero processes and processes more than 5)

Correct Output for process sequence, burst time and waiting time

Correct Average waiting and turnaround times for the processes

Reference no: EM133269914

Questions Cloud

Write a method that does a breadth-first search : Write a method that does a breadth-first search from a given cube, returning the first sequence of moves found that reaches the solution state. Add a "bfs" comm
Types of pseudo tests : Three types of Controlled tests and two types of Full tests. Identify one of the types for each method and then describe how that type of testing works.
Creating a web game application : Assume you are creating a web game application that asks for the user's name, which will later be displayed, on the screens of other players.
Basic techniques of memory management in minix : After Identifying the basic techniques of memory management in MINIX, how would I modify chmem to make a new command showmem, which simply displays the current
Preemptive cpu scheduling algorithm : Write C program to simulate the following preemptive CPU scheduling algorithm to find turnaround time and waiting time.
Divide and conquer problem solving : Suppose we have a sorted array of n elements. The sequence is supposed to represent the numbers 0, 1, 2, ..., but some values are missing. Describe a divide-and
What is scalability-data store and lambda : What is Scalability, Data Store and Lambda? Explain what is IaaS on AWS and CloudFormation? Elaborate about each term and give a clear explanation.
Children school about protecting personal data : You have been asked to speak to the parents at your children's school about protecting personal data. What topics would you discuss and what would you tell them
Determine the required number of production runs : Formulate the linear programming model which determines the required number of production runs to maximise ABC Electricity's revenue for required production.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Industry experts believe blockchain is technology

Industry experts believe blockchain is a technology that has the potential to affect the business of most IT professionals in the next five years.

  How much would the investor investment be worth

What is the IRR of this investment? (round to the nearest percent).

  Personal viewpoints on pros and cons to IoT

Discuss your personal viewpoints on the pros and cons to the IoT and how those positives/negatives weigh out for you.

  Prepare a paper describing what office automation

Include an analysis of the advantages and disadvantages of each software used.

  Numbers using two different algorithms

Consider a vector x, containing integers from 1 to 10.x

  Log transformation on a categorical

Should you perform a log transformation on a categorical (nominal) variable, or can you only do that for continuous variables?

  Chances of getting the ring around a bottle

If there are 12 bottles of sprite, 10 bottles of coke, and 8 bottles of rootbeer; what are the chances of getting the ring around a bottle of coke

  Predicts the value of a target feature

What method of machine Learning can "predicts the value of a target feature for each observation, based on the values of other features"

  Find a criminal case that involved digital forensics

Do a bit of research on-line. Find a criminal case that involved Digital Forensics. describing the case and how digital forensics were used in the investigation

  Submit a java program comprising two source files

Submit a Java program comprising two source files: MyArrayList.java, defining a generic MyArrayList class representing "stretchy" arrays. This class is to mimic some features of the built-in ArrayList generic collection class .

  Business control and disaster recovery plan

A simulated disaster and comprehensive recovery test may involve many of an organization's key personnel for several days:

  Started the process of deleveraging

Additionally, many households in the U.S. started the process of deleveraging, reducing debt from their balance sheets, and rather using equity when making.

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