Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section A: Synthesize programming ideas from the concepts of Generic classes and methods you implemented in homework 1 . The goal for homework 2 is

Section A:
Synthesize programming ideas from the concepts of Generic classes and methods you implemented in
homework 1.
The goal for homework 2 is to create a generic class of process attributes and operational methods for
managing processes in a computer system. (You will use this generic class by instantiating it with a
'concrete' program object called: Process; and simulate an operating system's functions of process
scheduling and performance analysis in Programming Assignment Part1 and Part2.)
The generic class must have the following properties:
Generic variables for:
Process ID, which will become a concrete integer type.
Priority number, which will become a concrete integer type.
Process arrival time, which will become a concrete double (random number) type.
Process service time, which will become a concrete double (random number) type.
Queue size, which will become a 'private' concrete integer type.
Generic methods: (think about what generic parameter types to pass for each method, if any)
Enqueue ()// for adding a process to a priority queue data structure
Dequeue ()// for taking a process from a priority queue data structure
Reset_Priority ()// for changing the priority of a process
Waiting_Time 0?? for calculating the time a process waits in a system
CPU_Running 0?? for processing scheduled (dequeued) process - clock 'advance.'
Time_In-System ()// for calculating the total time a process stays in a system
Note: The actual logic or algorithms for these methods must be done in pseudocode form, with
comments, for homework purposes. [Use ideas about these methods for Queues and other data structures
from the textbook]. In Part1 and Part2 of the Programming Assignments you will implement the actual
logic of these methods. Thus, the outcomes of this homework will serve as a basis for these programming
assignments, therefore any additional operational methods and variables needed for a fully functioning
'concrete' class objects in Part1 and Part2 will be stated in their respective specs.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions