Write a cpu class that has one member function

Assignment Help Computer Engineering
Reference no: EM132088474

Part a: Basic Queue

The goal of this assignment is to reinforce your understanding and implementation of queues in C++. Specifically, the assignment is to do

A double-ended queue is a list that allows the addition and removal of entries from either end. One end is arbitrarily called the

front and the other the rear, but the two ends behave identically. Specify, design, and implement a template class for a double-ended queue. Include operations to check if it is empty or full.

For each end, include operations for adding and deleting entries. Implement the double-ended queue as a doubly linked list.

Call your class deque (which is pronounced "deck"). By the way, the C++ Standard Library has a deque class.

You need to have a test program to test your code and your code needs to meet class standards (preconditions, postconditions, etc.).

Part b: An OS CPU/Process Scheduler

Further use the solution (linked-list implementation of the Queue Class) from Part 6a to implement the following ‘Scheduler', a simulated subsystem of an OS.

In this subproject you are charged to design and implement a Ready Queue (RQ) to support a Scheduler subsystem of an OS. The RQ must be designed as a ‘priority' queue, which is governed by the FIFO policy. Write a Scheduler class to manage this queue - scheduling processes from the queue.

Assume that the queue length is unknown from the start when the computer system is booted, or turned on. Processes get enqueued and dequeued depending on their assigned priority numbers, which are randomly generated. The priority order of the queue is always preserved.

The processes are executed on a virtual CPU (object) for a random-execution time when dequeued by the Scheduler from the RQ.

Write a CPU class that has one member function, ‘Execute,' which simply gets called to execute the process.

Write a Process class that generates ‘processes' at random time intervals, and calls the Scheduler object to enqueue the processes.

The entire logic of this virtual CPU's ‘Execute' function is to simply set a time-counter for each process with the random-execution time when it is dequeued/called by the Scheduler object.

Balance the number of processes-generated and processes-executed using the Poisson/exponential distribution functions (as you generate the random numbers). The times to generate process arrivals and scheduling are mutual exclusive, and random.

Reference no: EM132088474

Questions Cloud

Draw a legal binary min heap that stores these keys : Draw a legal binary min heap that stores these keys such that after deleting 8 from the heap, the resulting repair of the binary heap involves.
Create an html web page contains an image : Add a form to your web page from Part 1. The action of the form should be to the formmail.cgi script on the personal web server .
Analyse available purchase methods : MBA404 - Consumer Behaviour and Marketing Psychology - Evaluate alternatives and narrow down the attributes of the FMCG product that satisfy the need or want
What is the predefined class for non-digits : Test that the form is submitted correctly when the quantities are numeric or empty, and that an error message is produced otherwise.
Write a cpu class that has one member function : Write a CPU class that has one member function, ‘Execute,' which simply gets called to execute the process.
What does a vertex in your state traversal tree represent : Present this result in terms of n and p where nxn is the size of the Sudoku board and p is the number of possible numbers (1-9) permitted in a square.
What are follicle cells : What are follicle cells? What hormone is secreted by developing follicle cells?
Anatomy and physiology : If a section of a DNA template stand contained the sequence TGAGAC, what would be the sequence of bases of the complementary mRNA strand
Design a database based on client requirements : The volunteer golfers get donors to sponsor them. The donors are asked to pledge a specific amount of money for each hole that the golfer plays.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Review problem on agile release planning

Imagine you are working on a project and the release date is predetermined by upper management. Determine if you can use Agile release planning.

  Design and develop a small prototype website

You are asked to design and develop a small prototype website for the client organisation in the scenario below

  Weighted probabilities for x86 processorscreate a procedure

weighted probabilities for x86 processorscreate a procedure that receives a value n between 0 to 100. when the

  Write a function to implement meansort

Write a function to implement meansort. The partition function must be modified, since the mean of the keys is not necessarily one of the keys in the list.

  Securing system using iptable firewall

Discuss the advantages and disadvantages of firewalls with iptables and make suggestions to overcome the disadvantages in your report - Start the services and ensure that they are available for you to do experiment with IPTable Firewall.

  Questiontwo members of your project development team are

questiontwo members of your project development team are differing about relative significance of training and

  Write a program that animates two cars moving across a frame

Write a program that animates two cars moving across a frame in opposite directions (but at different heights so that they don't collide.)

  Questionsteve smith is a restaurant owner who wants to

questionsteve smith is a restaurant owner who wants to expend his 10000 to modernize his restaurant by adapting it more

  Question1 what three things most an attacker have and why

question1. what three things most an attacker have and why with reason?2. describe disparity between a vulnerability

  Write a function that takes a sentence as input

Write a function that takes a sentence as input and returns it scrambled. For example, if it is passed Does anything rhyme with orange?

  Preparing the list of tables

In the last board meeting, your supervisor has asked someone to build a list of tables for the Fernandos Skate Shop customer orders.

  What are mac addresses for each of unique pair of machines

What are the MAC Addresses for each of the unique pair of machines that are communicating with one another?

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