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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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