Build a program that schedules simulated CPU jobs

Assignment Help Computer Engineering
Reference no: EM131838931

Problem

One of the main applications of priority queues is in operating systems for scheduling jobs on a CPU. In this project you are to build a program that schedules simulated CPU jobs. Your program should run in a loop, each iteration of which corresponds to a time slice for the CPU. Each job is assigned a priority, which is an integer between -20 (highest priority) and 19 (lowest priority), inclusive. From among all jobs waiting to be processed in a time slice, the CPU must work on a job with highest priority. In this simulation, each job will also come with a length value, which is an integer between 1 and 100, inclusive, indicating the number of time slices that are needed to process this job. For simplicity, you may assume jobs cannot be interrupted-once it is scheduled on the CPU, a job runs for a number of time slices equal to its length. Your simulator must output the name of the job running on the CPU in each time slice and must process a sequence of commands, one per time slice, each of which is of the form "add job name with length n and priority p" or "no new job this slice".

Reference no: EM131838931

Questions Cloud

Elements affected the foreseeability of the disaster : Include details from the narratives above, any additional research, and your own insights into how the disaster might have been foreseen by those responsible.
How can a program display two frames at once : How can a program display two frames at once? How can a program show a frame with two buttons labeled Yes and No?
Consider two savings accounts-bank is offering better deal : Consider two savings accounts. Bank A pays 7.5 percent compounded annually, and Bank B pays 7.4 percent compounded semiannually.
What types of strategy should you consider including in plan : Propose one specific example of each type of strategy that you are considering, and present your rationale (reasoning) for your strategy selections.
Build a program that schedules simulated CPU jobs : Build a program that schedules simulated CPU jobs. Your program should run in a loop, each iteration of which corresponds to a time slice for the CPU.
Signing the contract of sale as purchaser : Gloria purchased White acre. Shortly after signing the Contract of Sale as purchaser, Gloria lodged a
Impact of the decision on the operation of companies : Discuss and critically ANALYSE the court/tribunal decision and the reason for the decision in view of the Corporations Act - impact of the decision
List the stages of instructional design : The CEO wonders about the need for diversity training and asks you to let her know how you would approach such training.
Business conveyance and a property conveyance : With your policies and procedures, do you distinguish between a business conveyance and a property conveyance- and if so how?

Reviews

Write a Review

Computer Engineering Questions & Answers

  You work as the network administrator for a medium-size

you work as the network administrator for a medium-size company. you got to work on a monday morning and as soon as you

  What is an image description language

What is an image description language? What are the advantages of representing images with image description languages?

  Explain how the c compiler handles memory allocation

The following two fragments of code are a C program and the 68000 assembly language output produced by Intermetrics cross-compiler.

  Why rotational latency is not considered in disk scheduling

Why Rotational latency is not considered in disk scheduling? How FCFS, SSTF, SCAN and C-SCAN are modified for rotational latency optimization

  How the architecture is to be used in the system

Discuss in detail, using diagrams to support your words, how the architecture is to be used in the system. Address operational, performance, security, cultural, and political requirements for the project.

  How to obtain information and resources for audit

Explain how to obtain information, documentation, and resources for the audit. Analyze how each of the seven domains aligns within your chosen organization.

  How your employment is directly related to your field

Explain how your employment is directly related to your field of study? Business Disaster and Recovery Planning and Information Security and Risk Management.

  What s difference between real resource and virtual resource

What s the difference between real resource and virtual resource? What are goals of an OS resource allocation function? Describe the conflicts between them.

  Explain the purpose of the ethical hacking concept

Explain the purpose of the ethical hacking concept. Outline legal assessments on remote/foreign networks.3. Describe the role of an ethical hacker. Present what an ethical hacker can do legally at the state level.

  Draw a parse tree for a sentence in the grammar

Draw a parse tree for a sentence in this grammar which only uses a terminal once. Draw a second tree which uses different options for at least two nonterminals.

  Questionsophie is development on using applocker to control

questionsophie is development on using applocker to control access to applications on a new network she has constructed

  In a four- to five-page paper analyze a business task that

in a four- to five-page paper analyze a business task that you would like to computerize. consider how you could use

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