Answered step by step
Verified Expert Solution
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
The goal for homework 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 Part and Part
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
ResetPriority for changing the priority of a process
WaitingTime for calculating the time a process waits in a system
CPURunning for processing scheduled dequeued process clock 'advance.
TimeInSystem 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 Part and Part 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 Part and Part will be stated in their respective specs.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started