SlideShare a Scribd company logo
1 of 28
prog-05.pdf
Programming Assignment #5
CSci 430, Spring 2019
Dates:
Assigned: Monday April 15, 2019
Due: Wednesday May 1, 2019 (before Midnight)
Objectives:
� Understand short-term process scheduling.
� Work with data structures to implement a round-robin
scheduler.
� Look at e�ects of di�erent time slice quantum sizes on the
round-robin scheduling algorithm.
� Use C/C++ to implement vector and matrix data structures,
get practice in creating and using
such data structures in C/C++.
Description:
Our textbooks chapter 9 discusses several possible short-term
process scheduling policies. In this
programming assignment exercise we will implement two of the
preemptive policies, the simple shortest
remaining time policy (SRT) and the round-robin scheduler with
preemptive time slicing. Your program
will be given a simple input �le, indicating the process name,
its arrival time and its total service time,
the same as the process scheduling examples from our textbook
in Table 9.4 and Figure 9.5. You will
simulate the execution of the required schedulers. As in
previous assignments, you program will need
to work non-interactively and be callable from the command
line. The program will be provided with
the �le name of a �le with process information, in the format
discussed below. Your program will also
be given the time slicing quantum parameter it is to use for the
simulation, if round-robin scheduling
is selected. Your program will need to output the results of
running the set of simulated processes
using the selected scheduling policy with the indicated time
slice for the round-robin scheduler. Your
program will have to output its results exactly as shown below
in the required output format. Your
program will also need to calculate some summary statistics for
the simulated processes, including the
turnaround time and Tr/Ts ratio for each process, and the mean
Tr and Tr/Ts values for the given
simulation.
Process simulation �le formats
The �les with the information about the processes to be
simulated are fairly simple, and have the same
information that our textbook uses to illustrate the process
scheduling examples. Each simulation �le
contains multiple rows of data, where each row consists of the
process name, its arrival time, and its
service time. Here is an example:
1
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
This �le is named process-01.sim in the zip archive of �les I
have given you to get started on this
assignment. This is also the same set of processes and
start/service times used for all of the examples
in table 9.4 and �gure 9.5.
Running Simulations
As with previous assignments you are required to support using
your simulation from the command
line. Your program will take the name of the �le containing the
process information �rst. The next
parameter will be either 'rr' to perform round-robin scheduling,
or 'srt' if shortest remaining time policy
is to be simulated. Finally, a 3rd parameter will be supplied for
the round-robin scheduler, the time
slice quantum to use. An example of running your �nished
program should look like this:
$ ./p3 process-01.sim rr 4
A A A B B B B C C C C D D D D B B E E D
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
D 20 14 2.8
E 19 11 5.5
Here we are running the simulation using the set of process
information given in the previous section
and with a time slice quantum of 4.
Required Output
As shown above, your program must generate 2 bits of output.
First of all, while running the simulation
of the selected scheduling policy, you should display the
process names in the order they are run. In
the previous example, the sequence of scheduled/run processes
was:
A A A B B B B C C C C D D D D B B E E D
This indicates that process A ran �rst (times 0, 1 and 2),
followed by B running 4 times (times 3
to 7), etc. You are required to output the sequence of process
runs as the �rst line of output, with a
single space in between each process name as shown.
After the processes have run, you need to calculate and display
the statistics for the processes that
you just simulated. In our previous example, the statistics for
our round-robin simulation with a time
quantum of 4 time slices were:
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
2
D 20 14 2.8
E 19 11 5.5
For each process, you need to output the time when it �nished,
the turnaround time (Tr) and the
ratio of the turnaround time to the service time (Tr/Ts).
I have provided a zip �le with a �le named p3-start.cpp as a
template to get you started. In addition,
I have provided you with two process simulation �les, named
process-01.sim and process-02.sim, with
2 sets of process information you can simulate. There are
several examples of correct results generated
for the two sets of inputs, named things like process-01-q1.res,
process-01-q4.res, process-01-srt.res, etc.
These are the correct results you should get for running your
simulation with round-robin scheduling
for various time quantums or for shortest remaining time
scheduling.
3
prog-05.zip
p5-start.cppp5-start.cpp/**
* @author Jane Student
* @cwid 123 45 678
* @class CSci 430, Spring 2018
* @ide Visual Studio Express 2010
* @date November 15, 2018
* @assg prog-04
*
* @description This program implements a simulation of proce
ss
* scheduling policies. In this program, we implement round-
robin
* scheduling, where the time slice quantum can be specified a
s
* as a command line parameter. And we also implement shor
test
* remaining time (SRT) scheduling policy
*/
#include<stdlib.h>
#include<iostream>
#include<iomanip>
#include<fstream>
#include<string>
#include<list>
usingnamespace std;
// global constants
// I won't test your round robin implementation with more than 2
0 processes
constint MAX_PROCESSES =20;
constint NO_PROCESS =0;
// Simple structure, holds all of the information about processes,
their names
// arrival and service times, that we are to simulate.
typedefstruct
{
string processName;
int arrivalTime;
int serviceTime;
// holds running count of time slices for current time quantum,
when
// serviceTime == quantum, time slice is up
int sliceTime;
// holds total number of time steps currently run, when == to
// serviceTime process is done
int totalTime;
// holds time when process finishes, used to calculate final stats,
// like T_r, T_r/T_s
int finishTime;
// a boolean flag, we will set this to true when the process is co
mplete
bool finished;
}Process;
// Process table, holds table of information about processes we a
re simulating
typedefstruct
{
int numProcesses;
Process* process[MAX_PROCESSES];
}ProcessTable;
/** Create process table
* Allocate memory for a new process table. Load the process
* information from the simulation file into a table with the proc
ess
* information needed to perform the simulation. At the same ti
me we
* initialize other information in process table for use in the
* simulation. Return the newly created ProcessTable
*
* @param processFilanem The name (char*) of the file to open
and read
* the process information from.
* @param processTable This is actually a return parameter. Th
is
* should be a pointer to an already allocated array of
* Process structure items. We will fill in this structure
* and return the process information.
*
* @returns ProcessTable* The newly allocated and initialized P
rocessTable
* structure.
*/
ProcessTable* createProcessTable(char* processFilename)
{
ifstream simprocessfile(processFilename);
ProcessTable* processTable;
int pid;
string processName;
int arrivalTime;
int serviceTime;
// If we can't open file, abort and let the user know problem
if(!simprocessfile.is_open())
{
cout <<"Error: could not open process simulation file: "
<< processFilename << endl;
exit(1);
}
// Format of file is
// ProcessName1 ArrivalTime1 ServiceTime1
// ProcessName2 ArrivalTime2 ServiceTime2
// ...
// ProcessNameN ArrivalTimeN ServiceTimeN
//
// Where the name is any arbitray string identifier, and ArrivalT
ime
// and ServiceTime are integer values
pid =0;
processTable =new(ProcessTable);
while(simprocessfile >> processName >> arrivalTime >> servic
eTime)
{
// allocate a new process to hold information
Process* process =new(Process);
processTable->process[pid]= process;
// load information into process read from simulation file
process->processName = processName;
process->arrivalTime = arrivalTime;
process->serviceTime = serviceTime;
// initialize other process information for the simulaiton
process->sliceTime =0;
process->totalTime =0;
process->finishTime =0;
process->finished =false;
pid++;
}
// Set the number of processes we need to simulate information i
n
// the process table
processTable->numProcesses = pid;
return processTable;
}
/** Display process table
* Convenience method, dump all of the information about the p
rocesses
* in a process table to stdout.
*
* @param processTable The table, a pointer to type ProcessTab
le
* struct, with the information we are to display
*/
void displayProcessTable(ProcessTable* processTable)
{
cout <<"Process Table num = "<< processTable-
>numProcesses << endl;
cout <<"PID Name Arrv Srvc"<< endl;
cout <<"------------------"<< endl;
for(int pid=0; pid < processTable->numProcesses; pid++)
{
Process* p = processTable->process[pid];
cout << setw(2)<< right << pid <<") ";
cout << setw(4)<< left << p->processName <<" ";
cout << setw(4)<< right << p->arrivalTime <<" ";
cout << setw(4)<< right << p->serviceTime <<" ";
cout << endl;
}
}
/** Round robin scheduler simulator
* The main routine for performing the round robin preemptive
* scheduler simulator. We expect the time quantum to already
be
* specified and given to us as the first parameter. The file nam
e
* with the process arrival and service time information is given
as
* the second parameter. We simulate preemptive round robin
* scheduling of all of the processes until there are no longer an
y
* processes left in the system (all processes have exceeded thei
r
* service time and have exited).
*
* @param processTable A pointer to a ProcessTable structure h
olding
* information about the processes, arrival times and duratio
ns
* that we are simulating execution of.
* @param quantum An integer value holding the time slice qua
ntum we
* are using for this simulation.
*/
void roundRobinScheduler(ProcessTable* processTable,int quan
tum)
{
// Implement the round robin scheduler here
cout <<"<roundRobinScheduler> entered, quantum: "<< quant
um << endl;
}
/** shortest remaining time simulator
* The main routine for performing the shortest remaining time
* preemptive scheduler simulator. The file name with the proc
ess
* arrival and service time information is given as the first
* parameter. We simulate preemptive shortest remaining time
* scheduling of all of the processes until there are no longer an
y
* processes left in the system (all processes have exceeded thei
r
* service time and have exited).
*
* @param processTable A pointer to a ProcessTable structure h
olding
* information about the processes, arrival times and duratio
ns
* that we are simulating execution of.
*/
void shortestRemainingTime(ProcessTable* processTable)
{
// Implement the shortest remaining time policy here
cout <<"<shortestRemainingTime> entered"<< endl;
}
/** Main entry point of round robin scheduler
* The main entry point of the round robin scheduler simulator.
The main funciton
* checks the command line arguments, and calls the simulation
function if correct
* arguments were supplied. We expect two command line argu
ments, which are the
* time slice quantum value we are to use for this preemptive sc
heduler simulation,
* and the name of the simulation file holding the process arriva
l and service
* time information.
*
* @param argc The argument count
* @param argv The command line argument values. We expect
argv[1] to be the
* time slice quantum parameter (int format) and argv[2
] to be the
* name of the process simulation file (charcter string)
*/
int main(int argc,char** argv)
{
string policy;
ProcessTable* processTable;
int quantum =0;
// If not all parameters provides, abort and let user know of prob
lem
if(argc <3|| argc >4)
{
cout <<"Error: expecting process simulation file and scheduli
ng policy as command line parameters"
<< endl;
cout <<"Usage: "<< argv[0]<<" process-
file.sim [rr|srt] [quantum]"<< endl;
exit(1);
}
// load process table and parse command line arguments
processTable = createProcessTable(argv[1]);
// just to confirm that process table loaded correctly. You shoul
d
// comment out or remove this as it is not asked for as part of th
e
// output for the assignment simulation
displayProcessTable(processTable);
// determine policy to simulate
policy.assign(argv[2]);
// perform simulation of indicated scheduling policy
if(policy =="rr")
{
if(argc !=4)
{
cout <<"Error: time quantum must be provided for round ro
bin `rr` scheduling policy"<< endl;
exit(1);
}
quantum = atoi(argv[3]);
if((quantum <=0)||(quantum >1000))
{
cout <<"Error: received bad time slice quantum parameter:
"<< argv[1]<< endl;
cout <<" valid values are integers in range from 1 to 10
00"<< endl;
exit(1);
}
roundRobinScheduler(processTable, quantum);
}
elseif(policy =="srt")
{
shortestRemainingTime(processTable);
}
else
{
cout <<"Error: unknown process scheduling policy: "<< polic
y << endl;
}
}
prog-05.pdf
Programming Assignment #5
CSci 430, Spring 2019
Dates:
Assigned: Monday April 15, 2019
Due: Wednesday May 1, 2019 (before Midnight)
Objectives:
� Understand short-term process scheduling.
� Work with data structures to implement a round-robin
scheduler.
� Look at e�ects of di�erent time slice quantum sizes on the
round-robin scheduling algorithm.
� Use C/C++ to implement vector and matrix data structures,
get practice in creating and using
such data structures in C/C++.
Description:
Our textbooks chapter 9 discusses several possible short-term
process scheduling policies. In this
programming assignment exercise we will implement two of the
preemptive policies, the simple shortest
remaining time policy (SRT) and the round-robin scheduler with
preemptive time slicing. Your program
will be given a simple input �le, indicating the process name,
its arrival time and its total service time,
the same as the process scheduling examples from our textbook
in Table 9.4 and Figure 9.5. You will
simulate the execution of the required schedulers. As in
previous assignments, you program will need
to work non-interactively and be callable from the command
line. The program will be provided with
the �le name of a �le with process information, in the format
discussed below. Your program will also
be given the time slicing quantum parameter it is to use for the
simulation, if round-robin scheduling
is selected. Your program will need to output the results of
running the set of simulated processes
using the selected scheduling policy with the indicated time
slice for the round-robin scheduler. Your
program will have to output its results exactly as shown below
in the required output format. Your
program will also need to calculate some summary statistics for
the simulated processes, including the
turnaround time and Tr/Ts ratio for each process, and the mean
Tr and Tr/Ts values for the given
simulation.
Process simulation �le formats
The �les with the information about the processes to be
simulated are fairly simple, and have the same
information that our textbook uses to illustrate the process
scheduling examples. Each simulation �le
contains multiple rows of data, where each row consists of the
process name, its arrival time, and its
service time. Here is an example:
1
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
This �le is named process-01.sim in the zip archive of �les I
have given you to get started on this
assignment. This is also the same set of processes and
start/service times used for all of the examples
in table 9.4 and �gure 9.5.
Running Simulations
As with previous assignments you are required to support using
your simulation from the command
line. Your program will take the name of the �le containing the
process information �rst. The next
parameter will be either 'rr' to perform round-robin scheduling,
or 'srt' if shortest remaining time policy
is to be simulated. Finally, a 3rd parameter will be supplied for
the round-robin scheduler, the time
slice quantum to use. An example of running your �nished
program should look like this:
$ ./p3 process-01.sim rr 4
A A A B B B B C C C C D D D D B B E E D
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
D 20 14 2.8
E 19 11 5.5
Here we are running the simulation using the set of process
information given in the previous section
and with a time slice quantum of 4.
Required Output
As shown above, your program must generate 2 bits of output.
First of all, while running the simulation
of the selected scheduling policy, you should display the
process names in the order they are run. In
the previous example, the sequence of scheduled/run processes
was:
A A A B B B B C C C C D D D D B B E E D
This indicates that process A ran �rst (times 0, 1 and 2),
followed by B running 4 times (times 3
to 7), etc. You are required to output the sequence of process
runs as the �rst line of output, with a
single space in between each process name as shown.
After the processes have run, you need to calculate and display
the statistics for the processes that
you just simulated. In our previous example, the statistics for
our round-robin simulation with a time
quantum of 4 time slices were:
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
2
D 20 14 2.8
E 19 11 5.5
For each process, you need to output the time when it �nished,
the turnaround time (Tr) and the
ratio of the turnaround time to the service time (Tr/Ts).
I have provided a zip �le with a �le named p3-start.cpp as a
template to get you started. In addition,
I have provided you with two process simulation �les, named
process-01.sim and process-02.sim, with
2 sets of process information you can simulate. There are
several examples of correct results generated
for the two sets of inputs, named things like process-01-q1.res,
process-01-q4.res, process-01-srt.res, etc.
These are the correct results you should get for running your
simulation with round-robin scheduling
for various time quantums or for shortest remaining time
scheduling.
3
processtable-01.sim
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
processtable-02.sim
A 0 4
B 1 7
C 4 5
D 4 5
E 7 2
F 8 5
G 10 1
H 10 4
I 12 6
processtable-03.sim
A 0 3
B 2 4
C 3 5
D 3 8
E 3 2
F 5 6
G 7 9
H 7 4
I 8 3
J 8 5
K 8 4
L 10 6
Makefile
all: p5sol
p5: p5-start.cpp
g++ -g $< -o [email protected]
p5sol: p5-solution.cpp
g++ -g $< -o p5
debug: p5-solution.cpp
g++ -DDEBUG_BUILD=1 -g $< -o p5
p5test:
./p5 processtable-01.sim rr 1 > sim-01-rr-1.tst
@diff -s -q sim-01-rr-1.tst sim-01-rr-1.res
./p5 processtable-01.sim rr 4 > sim-01-rr-4.tst
@diff -s -q sim-01-rr-4.tst sim-01-rr-4.res
./p5 processtable-01.sim srt > sim-01-srt.tst
@diff -s -q sim-01-srt.tst sim-01-srt.res
./p5 processtable-02.sim rr 1 > sim-02-rr-1.tst
@diff -s -q sim-02-rr-1.tst sim-02-rr-1.res
./p5 processtable-02.sim rr 4 > sim-02-rr-4.tst
@diff -s -q sim-02-rr-4.tst sim-02-rr-4.res
./p5 processtable-02.sim srt > sim-02-srt.tst
@diff -s -q sim-02-srt.tst sim-02-srt.res
./p5 processtable-03.sim rr 1 > sim-03-rr-1.tst
@diff -s -q sim-03-rr-1.tst sim-03-rr-1.res
./p5 processtable-03.sim rr 5 > sim-03-rr-5.tst
@diff -s -q sim-03-rr-5.tst sim-03-rr-5.res
./p5 processtable-03.sim srt > sim-03-srt.tst
@diff -s -q sim-03-srt.tst sim-03-srt.res
@rm sim-01-rr-1.tst sim-01-rr-4.tst sim-01-srt.tst sim-02-
rr-1.tst sim-02-rr-4.tst sim-02-srt.tst sim-03-rr-1.tst sim-03-rr-
5.tst sim-03-srt.tst
p5zip:
zip ../prog-05.zip p5-start.cpp prog-05.pdf processtable-
01.sim processtable-02.sim processtable-03.sim Makefile *.res
p5solzip:
zip ../prog-05-sol.zip p5-solution.cpp processtable-*.sim
sim-*.res
clean:
rm -f p5 sim-*.tst core* *~
sim-01-rr-1.res
sim-01-rr-4.res
sim-01-srt.res
sim-02-rr-1.res
sim-02-rr-4.res
sim-02-srt.res
sim-03-rr-1.res
sim-03-rr-5.res
sim-03-srt.res
Programming Assignment #5
CSci 430, Spring 2019
Dates:
Assigned: Monday April 15, 2019
Due: Wednesday May 1, 2019 (before Midnight)
Objectives:
� Understand short-term process scheduling.
� Work with data structures to implement a round-robin
scheduler.
� Look at e�ects of di�erent time slice quantum sizes on the
round-robin scheduling algorithm.
� Use C/C++ to implement vector and matrix data structures,
get practice in creating and using
such data structures in C/C++.
Description:
Our textbooks chapter 9 discusses several possible short-term
process scheduling policies. In this
programming assignment exercise we will implement two of the
preemptive policies, the simple shortest
remaining time policy (SRT) and the round-robin scheduler with
preemptive time slicing. Your program
will be given a simple input �le, indicating the process name,
its arrival time and its total service time,
the same as the process scheduling examples from our textbook
in Table 9.4 and Figure 9.5. You will
simulate the execution of the required schedulers. As in
previous assignments, you program will need
to work non-interactively and be callable from the command
line. The program will be provided with
the �le name of a �le with process information, in the format
discussed below. Your program will also
be given the time slicing quantum parameter it is to use for the
simulation, if round-robin scheduling
is selected. Your program will need to output the results of
running the set of simulated processes
using the selected scheduling policy with the indicated time
slice for the round-robin scheduler. Your
program will have to output its results exactly as shown below
in the required output format. Your
program will also need to calculate some summary statistics for
the simulated processes, including the
turnaround time and Tr/Ts ratio for each process, and the mean
Tr and Tr/Ts values for the given
simulation.
Process simulation �le formats
The �les with the information about the processes to be
simulated are fairly simple, and have the same
information that our textbook uses to illustrate the process
scheduling examples. Each simulation �le
contains multiple rows of data, where each row consists of the
process name, its arrival time, and its
service time. Here is an example:
1
A 0 3
B 2 6
C 4 4
D 6 5
E 8 2
This �le is named process-01.sim in the zip archive of �les I
have given you to get started on this
assignment. This is also the same set of processes and
start/service times used for all of the examples
in table 9.4 and �gure 9.5.
Running Simulations
As with previous assignments you are required to support using
your simulation from the command
line. Your program will take the name of the �le containing the
process information �rst. The next
parameter will be either 'rr' to perform round-robin scheduling,
or 'srt' if shortest remaining time policy
is to be simulated. Finally, a 3rd parameter will be supplied for
the round-robin scheduler, the time
slice quantum to use. An example of running your �nished
program should look like this:
$ ./p3 process-01.sim rr 4
A A A B B B B C C C C D D D D B B E E D
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
D 20 14 2.8
E 19 11 5.5
Here we are running the simulation using the set of process
information given in the previous section
and with a time slice quantum of 4.
Required Output
As shown above, your program must generate 2 bits of output.
First of all, while running the simulation
of the selected scheduling policy, you should display the
process names in the order they are run. In
the previous example, the sequence of scheduled/run processes
was:
A A A B B B B C C C C D D D D B B E E D
This indicates that process A ran �rst (times 0, 1 and 2),
followed by B running 4 times (times 3
to 7), etc. You are required to output the sequence of process
runs as the �rst line of output, with a
single space in between each process name as shown.
After the processes have run, you need to calculate and display
the statistics for the processes that
you just simulated. In our previous example, the statistics for
our round-robin simulation with a time
quantum of 4 time slices were:
Name Fnsh T_r T_r/T_s
----------------------
A 3 3 1
B 17 15 2.5
C 11 7 1.75
2
D 20 14 2.8
E 19 11 5.5
For each process, you need to output the time when it �nished,
the turnaround time (Tr) and the
ratio of the turnaround time to the service time (Tr/Ts).
I have provided a zip �le with a �le named p3-start.cpp as a
template to get you started. In addition,
I have provided you with two process simulation �les, named
process-01.sim and process-02.sim, with
2 sets of process information you can simulate. There are
several examples of correct results generated
for the two sets of inputs, named things like process-01-q1.res,
process-01-q4.res, process-01-srt.res, etc.
These are the correct results you should get for running your
simulation with round-robin scheduling
for various time quantums or for shortest remaining time
scheduling.
3

More Related Content

Similar to prog-05.pdfProgramming Assignment #5CSci 430, Spring 2.docx

ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorialpinck2380
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Managementzahid7578
 
14 mass data engineering v1.00_en
14 mass data engineering v1.00_en14 mass data engineering v1.00_en
14 mass data engineering v1.00_enconfidencial
 
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docx
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docxLab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docx
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docxfestockton
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comHarrisGeorgx
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comStephenson34
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.comWilliamsTaylorzl
 
An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timingPVS-Studio
 
Eff Plsql
Eff PlsqlEff Plsql
Eff Plsqlafa reg
 
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docxkatherncarlyle
 
Lab Assignment 4 CSE330 Spring 2014 Skeleton Code for ex.docx
 Lab Assignment 4 CSE330 Spring 2014  Skeleton Code for ex.docx Lab Assignment 4 CSE330 Spring 2014  Skeleton Code for ex.docx
Lab Assignment 4 CSE330 Spring 2014 Skeleton Code for ex.docxMARRY7
 
Assignment 02 Process State SimulationCSci 430 Introduction to.docx
Assignment 02 Process State SimulationCSci 430 Introduction to.docxAssignment 02 Process State SimulationCSci 430 Introduction to.docx
Assignment 02 Process State SimulationCSci 430 Introduction to.docxcargillfilberto
 
Operator Instructions Once the program is running the operator c.docx
Operator Instructions Once the program is running the operator c.docxOperator Instructions Once the program is running the operator c.docx
Operator Instructions Once the program is running the operator c.docxcherishwinsland
 
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...Nur Atiqah Mohd Rosli
 
9. DBMS Experiment Laboratory PresentationPPT
9. DBMS Experiment Laboratory PresentationPPT9. DBMS Experiment Laboratory PresentationPPT
9. DBMS Experiment Laboratory PresentationPPTTheVerse1
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdfRajMantry
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Ontico
 

Similar to prog-05.pdfProgramming Assignment #5CSci 430, Spring 2.docx (20)

ECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/SnaptutorialECET 360 help A Guide to career/Snaptutorial
ECET 360 help A Guide to career/Snaptutorial
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Management
 
14 mass data engineering v1.00_en
14 mass data engineering v1.00_en14 mass data engineering v1.00_en
14 mass data engineering v1.00_en
 
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docx
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docxLab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docx
Lab 3 of 7 Process Management Simulation L A B  O V E R V I E W.docx
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.com
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.com
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.com
 
An eternal question of timing
An eternal question of timingAn eternal question of timing
An eternal question of timing
 
Eff Plsql
Eff PlsqlEff Plsql
Eff Plsql
 
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx
#define ENABLE_COMMANDER#define ENABLE_REPORTER#include c.docx
 
Lab Assignment 4 CSE330 Spring 2014 Skeleton Code for ex.docx
 Lab Assignment 4 CSE330 Spring 2014  Skeleton Code for ex.docx Lab Assignment 4 CSE330 Spring 2014  Skeleton Code for ex.docx
Lab Assignment 4 CSE330 Spring 2014 Skeleton Code for ex.docx
 
Assignment 02 Process State SimulationCSci 430 Introduction to.docx
Assignment 02 Process State SimulationCSci 430 Introduction to.docxAssignment 02 Process State SimulationCSci 430 Introduction to.docx
Assignment 02 Process State SimulationCSci 430 Introduction to.docx
 
Operator Instructions Once the program is running the operator c.docx
Operator Instructions Once the program is running the operator c.docxOperator Instructions Once the program is running the operator c.docx
Operator Instructions Once the program is running the operator c.docx
 
CP 04.pptx
CP 04.pptxCP 04.pptx
CP 04.pptx
 
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
BITS 1213 - OPERATING SYSTEM (PROCESS,THREAD,SYMMETRIC MULTIPROCESSOR,MICROKE...
 
Os lab final
Os lab finalOs lab final
Os lab final
 
ch3-lect7.pptx
ch3-lect7.pptxch3-lect7.pptx
ch3-lect7.pptx
 
9. DBMS Experiment Laboratory PresentationPPT
9. DBMS Experiment Laboratory PresentationPPT9. DBMS Experiment Laboratory PresentationPPT
9. DBMS Experiment Laboratory PresentationPPT
 
Document 14 (6).pdf
Document 14 (6).pdfDocument 14 (6).pdf
Document 14 (6).pdf
 
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
Peeking into the Black Hole Called PL/PGSQL - the New PL Profiler / Jan Wieck...
 

More from stilliegeorgiana

1. The Incident Command System (ICS) is a tool forA. Co.docx
1. The Incident Command System (ICS) is a tool forA. Co.docx1. The Incident Command System (ICS) is a tool forA. Co.docx
1. The Incident Command System (ICS) is a tool forA. Co.docxstilliegeorgiana
 
1. The Thirteenth Amendment effectively brought an end to slaver.docx
1. The Thirteenth Amendment effectively brought an end to slaver.docx1. The Thirteenth Amendment effectively brought an end to slaver.docx
1. The Thirteenth Amendment effectively brought an end to slaver.docxstilliegeorgiana
 
1. The Thirteenth Amendment effectively brought an end to slavery in.docx
1. The Thirteenth Amendment effectively brought an end to slavery in.docx1. The Thirteenth Amendment effectively brought an end to slavery in.docx
1. The Thirteenth Amendment effectively brought an end to slavery in.docxstilliegeorgiana
 
1. The Fight for a True Democracyhttpswww.nytimes.com201.docx
1. The Fight for a True Democracyhttpswww.nytimes.com201.docx1. The Fight for a True Democracyhttpswww.nytimes.com201.docx
1. The Fight for a True Democracyhttpswww.nytimes.com201.docxstilliegeorgiana
 
1. The article for week 8 described hip hop as a weapon. This weeks.docx
1. The article for week 8 described hip hop as a weapon. This weeks.docx1. The article for week 8 described hip hop as a weapon. This weeks.docx
1. The article for week 8 described hip hop as a weapon. This weeks.docxstilliegeorgiana
 
1. The Hatch Act defines prohibited activities of public employees. .docx
1. The Hatch Act defines prohibited activities of public employees. .docx1. The Hatch Act defines prohibited activities of public employees. .docx
1. The Hatch Act defines prohibited activities of public employees. .docxstilliegeorgiana
 
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docxstilliegeorgiana
 
1. Some people say that chatbots are inferior for chatting.Others di.docx
1. Some people say that chatbots are inferior for chatting.Others di.docx1. Some people say that chatbots are inferior for chatting.Others di.docx
1. Some people say that chatbots are inferior for chatting.Others di.docxstilliegeorgiana
 
1. Some people say that chatbots are inferior for chatting.Other.docx
1. Some people say that chatbots are inferior for chatting.Other.docx1. Some people say that chatbots are inferior for chatting.Other.docx
1. Some people say that chatbots are inferior for chatting.Other.docxstilliegeorgiana
 
1. Some people say that chatbots are inferior for chatting. Others d.docx
1. Some people say that chatbots are inferior for chatting. Others d.docx1. Some people say that chatbots are inferior for chatting. Others d.docx
1. Some people say that chatbots are inferior for chatting. Others d.docxstilliegeorgiana
 
1. Tell us about yourself and your personal journey that has to .docx
1. Tell us about yourself and your personal journey that has to .docx1. Tell us about yourself and your personal journey that has to .docx
1. Tell us about yourself and your personal journey that has to .docxstilliegeorgiana
 
1. Tell us what characteristics of Loma Linda University are particu.docx
1. Tell us what characteristics of Loma Linda University are particu.docx1. Tell us what characteristics of Loma Linda University are particu.docx
1. Tell us what characteristics of Loma Linda University are particu.docxstilliegeorgiana
 
1. Tell us about yourself and your personal journey that has lea.docx
1. Tell us about yourself and your personal journey that has lea.docx1. Tell us about yourself and your personal journey that has lea.docx
1. Tell us about yourself and your personal journey that has lea.docxstilliegeorgiana
 
1. The Research paper will come in five parts. The instructions are.docx
1. The Research paper will come in five parts. The instructions are.docx1. The Research paper will come in five parts. The instructions are.docx
1. The Research paper will come in five parts. The instructions are.docxstilliegeorgiana
 
1. The minutiae points located on a fingerprint will help determine .docx
1. The minutiae points located on a fingerprint will help determine .docx1. The minutiae points located on a fingerprint will help determine .docx
1. The minutiae points located on a fingerprint will help determine .docxstilliegeorgiana
 
1. The initial post is to be posted first and have 300-500 words.docx
1. The initial post is to be posted first and have 300-500 words.docx1. The initial post is to be posted first and have 300-500 words.docx
1. The initial post is to be posted first and have 300-500 words.docxstilliegeorgiana
 
1. The key elements of supplier measurement are quality, delivery, a.docx
1. The key elements of supplier measurement are quality, delivery, a.docx1. The key elements of supplier measurement are quality, delivery, a.docx
1. The key elements of supplier measurement are quality, delivery, a.docxstilliegeorgiana
 
1. Search the Internet and locate an article that relates to the top.docx
1. Search the Internet and locate an article that relates to the top.docx1. Search the Internet and locate an article that relates to the top.docx
1. Search the Internet and locate an article that relates to the top.docxstilliegeorgiana
 
1. Text mining – Text mining or text data mining is a process to e.docx
1. Text mining – Text mining or text data mining is a process to e.docx1. Text mining – Text mining or text data mining is a process to e.docx
1. Text mining – Text mining or text data mining is a process to e.docxstilliegeorgiana
 
1. Students need to review 3 different social media platforms that a.docx
1. Students need to review 3 different social media platforms that a.docx1. Students need to review 3 different social media platforms that a.docx
1. Students need to review 3 different social media platforms that a.docxstilliegeorgiana
 

More from stilliegeorgiana (20)

1. The Incident Command System (ICS) is a tool forA. Co.docx
1. The Incident Command System (ICS) is a tool forA. Co.docx1. The Incident Command System (ICS) is a tool forA. Co.docx
1. The Incident Command System (ICS) is a tool forA. Co.docx
 
1. The Thirteenth Amendment effectively brought an end to slaver.docx
1. The Thirteenth Amendment effectively brought an end to slaver.docx1. The Thirteenth Amendment effectively brought an end to slaver.docx
1. The Thirteenth Amendment effectively brought an end to slaver.docx
 
1. The Thirteenth Amendment effectively brought an end to slavery in.docx
1. The Thirteenth Amendment effectively brought an end to slavery in.docx1. The Thirteenth Amendment effectively brought an end to slavery in.docx
1. The Thirteenth Amendment effectively brought an end to slavery in.docx
 
1. The Fight for a True Democracyhttpswww.nytimes.com201.docx
1. The Fight for a True Democracyhttpswww.nytimes.com201.docx1. The Fight for a True Democracyhttpswww.nytimes.com201.docx
1. The Fight for a True Democracyhttpswww.nytimes.com201.docx
 
1. The article for week 8 described hip hop as a weapon. This weeks.docx
1. The article for week 8 described hip hop as a weapon. This weeks.docx1. The article for week 8 described hip hop as a weapon. This weeks.docx
1. The article for week 8 described hip hop as a weapon. This weeks.docx
 
1. The Hatch Act defines prohibited activities of public employees. .docx
1. The Hatch Act defines prohibited activities of public employees. .docx1. The Hatch Act defines prohibited activities of public employees. .docx
1. The Hatch Act defines prohibited activities of public employees. .docx
 
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx
1. The Case for Reparations” by Ta-Nehisi Coates (604-19) in Rere.docx
 
1. Some people say that chatbots are inferior for chatting.Others di.docx
1. Some people say that chatbots are inferior for chatting.Others di.docx1. Some people say that chatbots are inferior for chatting.Others di.docx
1. Some people say that chatbots are inferior for chatting.Others di.docx
 
1. Some people say that chatbots are inferior for chatting.Other.docx
1. Some people say that chatbots are inferior for chatting.Other.docx1. Some people say that chatbots are inferior for chatting.Other.docx
1. Some people say that chatbots are inferior for chatting.Other.docx
 
1. Some people say that chatbots are inferior for chatting. Others d.docx
1. Some people say that chatbots are inferior for chatting. Others d.docx1. Some people say that chatbots are inferior for chatting. Others d.docx
1. Some people say that chatbots are inferior for chatting. Others d.docx
 
1. Tell us about yourself and your personal journey that has to .docx
1. Tell us about yourself and your personal journey that has to .docx1. Tell us about yourself and your personal journey that has to .docx
1. Tell us about yourself and your personal journey that has to .docx
 
1. Tell us what characteristics of Loma Linda University are particu.docx
1. Tell us what characteristics of Loma Linda University are particu.docx1. Tell us what characteristics of Loma Linda University are particu.docx
1. Tell us what characteristics of Loma Linda University are particu.docx
 
1. Tell us about yourself and your personal journey that has lea.docx
1. Tell us about yourself and your personal journey that has lea.docx1. Tell us about yourself and your personal journey that has lea.docx
1. Tell us about yourself and your personal journey that has lea.docx
 
1. The Research paper will come in five parts. The instructions are.docx
1. The Research paper will come in five parts. The instructions are.docx1. The Research paper will come in five parts. The instructions are.docx
1. The Research paper will come in five parts. The instructions are.docx
 
1. The minutiae points located on a fingerprint will help determine .docx
1. The minutiae points located on a fingerprint will help determine .docx1. The minutiae points located on a fingerprint will help determine .docx
1. The minutiae points located on a fingerprint will help determine .docx
 
1. The initial post is to be posted first and have 300-500 words.docx
1. The initial post is to be posted first and have 300-500 words.docx1. The initial post is to be posted first and have 300-500 words.docx
1. The initial post is to be posted first and have 300-500 words.docx
 
1. The key elements of supplier measurement are quality, delivery, a.docx
1. The key elements of supplier measurement are quality, delivery, a.docx1. The key elements of supplier measurement are quality, delivery, a.docx
1. The key elements of supplier measurement are quality, delivery, a.docx
 
1. Search the Internet and locate an article that relates to the top.docx
1. Search the Internet and locate an article that relates to the top.docx1. Search the Internet and locate an article that relates to the top.docx
1. Search the Internet and locate an article that relates to the top.docx
 
1. Text mining – Text mining or text data mining is a process to e.docx
1. Text mining – Text mining or text data mining is a process to e.docx1. Text mining – Text mining or text data mining is a process to e.docx
1. Text mining – Text mining or text data mining is a process to e.docx
 
1. Students need to review 3 different social media platforms that a.docx
1. Students need to review 3 different social media platforms that a.docx1. Students need to review 3 different social media platforms that a.docx
1. Students need to review 3 different social media platforms that a.docx
 

Recently uploaded

21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxCeline George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfNirmal Dwivedi
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 

Recently uploaded (20)

Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 

prog-05.pdfProgramming Assignment #5CSci 430, Spring 2.docx

  • 1. prog-05.pdf Programming Assignment #5 CSci 430, Spring 2019 Dates: Assigned: Monday April 15, 2019 Due: Wednesday May 1, 2019 (before Midnight) Objectives: � Understand short-term process scheduling. � Work with data structures to implement a round-robin scheduler. � Look at e�ects of di�erent time slice quantum sizes on the round-robin scheduling algorithm. � Use C/C++ to implement vector and matrix data structures, get practice in creating and using such data structures in C/C++. Description: Our textbooks chapter 9 discusses several possible short-term process scheduling policies. In this programming assignment exercise we will implement two of the preemptive policies, the simple shortest remaining time policy (SRT) and the round-robin scheduler with
  • 2. preemptive time slicing. Your program will be given a simple input �le, indicating the process name, its arrival time and its total service time, the same as the process scheduling examples from our textbook in Table 9.4 and Figure 9.5. You will simulate the execution of the required schedulers. As in previous assignments, you program will need to work non-interactively and be callable from the command line. The program will be provided with the �le name of a �le with process information, in the format discussed below. Your program will also be given the time slicing quantum parameter it is to use for the simulation, if round-robin scheduling is selected. Your program will need to output the results of running the set of simulated processes using the selected scheduling policy with the indicated time slice for the round-robin scheduler. Your program will have to output its results exactly as shown below in the required output format. Your program will also need to calculate some summary statistics for the simulated processes, including the turnaround time and Tr/Ts ratio for each process, and the mean Tr and Tr/Ts values for the given simulation. Process simulation �le formats The �les with the information about the processes to be simulated are fairly simple, and have the same information that our textbook uses to illustrate the process scheduling examples. Each simulation �le contains multiple rows of data, where each row consists of the process name, its arrival time, and its service time. Here is an example: 1
  • 3. A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 This �le is named process-01.sim in the zip archive of �les I have given you to get started on this assignment. This is also the same set of processes and start/service times used for all of the examples in table 9.4 and �gure 9.5. Running Simulations As with previous assignments you are required to support using your simulation from the command line. Your program will take the name of the �le containing the process information �rst. The next parameter will be either 'rr' to perform round-robin scheduling, or 'srt' if shortest remaining time policy is to be simulated. Finally, a 3rd parameter will be supplied for the round-robin scheduler, the time slice quantum to use. An example of running your �nished program should look like this: $ ./p3 process-01.sim rr 4 A A A B B B B C C C C D D D D B B E E D
  • 4. Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1 B 17 15 2.5 C 11 7 1.75 D 20 14 2.8 E 19 11 5.5 Here we are running the simulation using the set of process information given in the previous section and with a time slice quantum of 4. Required Output As shown above, your program must generate 2 bits of output. First of all, while running the simulation of the selected scheduling policy, you should display the process names in the order they are run. In the previous example, the sequence of scheduled/run processes was: A A A B B B B C C C C D D D D B B E E D This indicates that process A ran �rst (times 0, 1 and 2), followed by B running 4 times (times 3 to 7), etc. You are required to output the sequence of process runs as the �rst line of output, with a single space in between each process name as shown. After the processes have run, you need to calculate and display
  • 5. the statistics for the processes that you just simulated. In our previous example, the statistics for our round-robin simulation with a time quantum of 4 time slices were: Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1 B 17 15 2.5 C 11 7 1.75 2 D 20 14 2.8 E 19 11 5.5 For each process, you need to output the time when it �nished, the turnaround time (Tr) and the ratio of the turnaround time to the service time (Tr/Ts). I have provided a zip �le with a �le named p3-start.cpp as a template to get you started. In addition, I have provided you with two process simulation �les, named process-01.sim and process-02.sim, with 2 sets of process information you can simulate. There are several examples of correct results generated for the two sets of inputs, named things like process-01-q1.res, process-01-q4.res, process-01-srt.res, etc. These are the correct results you should get for running your
  • 6. simulation with round-robin scheduling for various time quantums or for shortest remaining time scheduling. 3 prog-05.zip p5-start.cppp5-start.cpp/** * @author Jane Student * @cwid 123 45 678 * @class CSci 430, Spring 2018 * @ide Visual Studio Express 2010 * @date November 15, 2018 * @assg prog-04 * * @description This program implements a simulation of proce ss * scheduling policies. In this program, we implement round- robin * scheduling, where the time slice quantum can be specified a s * as a command line parameter. And we also implement shor test * remaining time (SRT) scheduling policy */ #include<stdlib.h> #include<iostream> #include<iomanip> #include<fstream> #include<string> #include<list> usingnamespace std;
  • 7. // global constants // I won't test your round robin implementation with more than 2 0 processes constint MAX_PROCESSES =20; constint NO_PROCESS =0; // Simple structure, holds all of the information about processes, their names // arrival and service times, that we are to simulate. typedefstruct { string processName; int arrivalTime; int serviceTime; // holds running count of time slices for current time quantum, when // serviceTime == quantum, time slice is up int sliceTime; // holds total number of time steps currently run, when == to // serviceTime process is done int totalTime; // holds time when process finishes, used to calculate final stats, // like T_r, T_r/T_s int finishTime; // a boolean flag, we will set this to true when the process is co mplete bool finished; }Process; // Process table, holds table of information about processes we a re simulating typedefstruct { int numProcesses; Process* process[MAX_PROCESSES]; }ProcessTable;
  • 8. /** Create process table * Allocate memory for a new process table. Load the process * information from the simulation file into a table with the proc ess * information needed to perform the simulation. At the same ti me we * initialize other information in process table for use in the * simulation. Return the newly created ProcessTable * * @param processFilanem The name (char*) of the file to open and read * the process information from. * @param processTable This is actually a return parameter. Th is * should be a pointer to an already allocated array of * Process structure items. We will fill in this structure * and return the process information. * * @returns ProcessTable* The newly allocated and initialized P rocessTable * structure. */ ProcessTable* createProcessTable(char* processFilename) { ifstream simprocessfile(processFilename); ProcessTable* processTable; int pid; string processName; int arrivalTime; int serviceTime; // If we can't open file, abort and let the user know problem if(!simprocessfile.is_open()) {
  • 9. cout <<"Error: could not open process simulation file: " << processFilename << endl; exit(1); } // Format of file is // ProcessName1 ArrivalTime1 ServiceTime1 // ProcessName2 ArrivalTime2 ServiceTime2 // ... // ProcessNameN ArrivalTimeN ServiceTimeN // // Where the name is any arbitray string identifier, and ArrivalT ime // and ServiceTime are integer values pid =0; processTable =new(ProcessTable); while(simprocessfile >> processName >> arrivalTime >> servic eTime) { // allocate a new process to hold information Process* process =new(Process); processTable->process[pid]= process; // load information into process read from simulation file process->processName = processName; process->arrivalTime = arrivalTime; process->serviceTime = serviceTime; // initialize other process information for the simulaiton process->sliceTime =0; process->totalTime =0; process->finishTime =0; process->finished =false; pid++; }
  • 10. // Set the number of processes we need to simulate information i n // the process table processTable->numProcesses = pid; return processTable; } /** Display process table * Convenience method, dump all of the information about the p rocesses * in a process table to stdout. * * @param processTable The table, a pointer to type ProcessTab le * struct, with the information we are to display */ void displayProcessTable(ProcessTable* processTable) { cout <<"Process Table num = "<< processTable- >numProcesses << endl; cout <<"PID Name Arrv Srvc"<< endl; cout <<"------------------"<< endl; for(int pid=0; pid < processTable->numProcesses; pid++) { Process* p = processTable->process[pid]; cout << setw(2)<< right << pid <<") "; cout << setw(4)<< left << p->processName <<" "; cout << setw(4)<< right << p->arrivalTime <<" "; cout << setw(4)<< right << p->serviceTime <<" "; cout << endl; } }
  • 11. /** Round robin scheduler simulator * The main routine for performing the round robin preemptive * scheduler simulator. We expect the time quantum to already be * specified and given to us as the first parameter. The file nam e * with the process arrival and service time information is given as * the second parameter. We simulate preemptive round robin * scheduling of all of the processes until there are no longer an y * processes left in the system (all processes have exceeded thei r * service time and have exited). * * @param processTable A pointer to a ProcessTable structure h olding * information about the processes, arrival times and duratio ns * that we are simulating execution of. * @param quantum An integer value holding the time slice qua ntum we * are using for this simulation. */ void roundRobinScheduler(ProcessTable* processTable,int quan tum) { // Implement the round robin scheduler here cout <<"<roundRobinScheduler> entered, quantum: "<< quant um << endl; } /** shortest remaining time simulator * The main routine for performing the shortest remaining time
  • 12. * preemptive scheduler simulator. The file name with the proc ess * arrival and service time information is given as the first * parameter. We simulate preemptive shortest remaining time * scheduling of all of the processes until there are no longer an y * processes left in the system (all processes have exceeded thei r * service time and have exited). * * @param processTable A pointer to a ProcessTable structure h olding * information about the processes, arrival times and duratio ns * that we are simulating execution of. */ void shortestRemainingTime(ProcessTable* processTable) { // Implement the shortest remaining time policy here cout <<"<shortestRemainingTime> entered"<< endl; } /** Main entry point of round robin scheduler * The main entry point of the round robin scheduler simulator. The main funciton * checks the command line arguments, and calls the simulation function if correct * arguments were supplied. We expect two command line argu ments, which are the * time slice quantum value we are to use for this preemptive sc heduler simulation, * and the name of the simulation file holding the process arriva l and service * time information. *
  • 13. * @param argc The argument count * @param argv The command line argument values. We expect argv[1] to be the * time slice quantum parameter (int format) and argv[2 ] to be the * name of the process simulation file (charcter string) */ int main(int argc,char** argv) { string policy; ProcessTable* processTable; int quantum =0; // If not all parameters provides, abort and let user know of prob lem if(argc <3|| argc >4) { cout <<"Error: expecting process simulation file and scheduli ng policy as command line parameters" << endl; cout <<"Usage: "<< argv[0]<<" process- file.sim [rr|srt] [quantum]"<< endl; exit(1); } // load process table and parse command line arguments processTable = createProcessTable(argv[1]); // just to confirm that process table loaded correctly. You shoul d // comment out or remove this as it is not asked for as part of th e // output for the assignment simulation displayProcessTable(processTable); // determine policy to simulate policy.assign(argv[2]);
  • 14. // perform simulation of indicated scheduling policy if(policy =="rr") { if(argc !=4) { cout <<"Error: time quantum must be provided for round ro bin `rr` scheduling policy"<< endl; exit(1); } quantum = atoi(argv[3]); if((quantum <=0)||(quantum >1000)) { cout <<"Error: received bad time slice quantum parameter: "<< argv[1]<< endl; cout <<" valid values are integers in range from 1 to 10 00"<< endl; exit(1); } roundRobinScheduler(processTable, quantum); } elseif(policy =="srt") { shortestRemainingTime(processTable); } else { cout <<"Error: unknown process scheduling policy: "<< polic y << endl; } } prog-05.pdf
  • 15. Programming Assignment #5 CSci 430, Spring 2019 Dates: Assigned: Monday April 15, 2019 Due: Wednesday May 1, 2019 (before Midnight) Objectives: � Understand short-term process scheduling. � Work with data structures to implement a round-robin scheduler. � Look at e�ects of di�erent time slice quantum sizes on the round-robin scheduling algorithm. � Use C/C++ to implement vector and matrix data structures, get practice in creating and using such data structures in C/C++. Description: Our textbooks chapter 9 discusses several possible short-term process scheduling policies. In this programming assignment exercise we will implement two of the preemptive policies, the simple shortest remaining time policy (SRT) and the round-robin scheduler with preemptive time slicing. Your program will be given a simple input �le, indicating the process name, its arrival time and its total service time, the same as the process scheduling examples from our textbook in Table 9.4 and Figure 9.5. You will
  • 16. simulate the execution of the required schedulers. As in previous assignments, you program will need to work non-interactively and be callable from the command line. The program will be provided with the �le name of a �le with process information, in the format discussed below. Your program will also be given the time slicing quantum parameter it is to use for the simulation, if round-robin scheduling is selected. Your program will need to output the results of running the set of simulated processes using the selected scheduling policy with the indicated time slice for the round-robin scheduler. Your program will have to output its results exactly as shown below in the required output format. Your program will also need to calculate some summary statistics for the simulated processes, including the turnaround time and Tr/Ts ratio for each process, and the mean Tr and Tr/Ts values for the given simulation. Process simulation �le formats The �les with the information about the processes to be simulated are fairly simple, and have the same information that our textbook uses to illustrate the process scheduling examples. Each simulation �le contains multiple rows of data, where each row consists of the process name, its arrival time, and its service time. Here is an example: 1 A 0 3
  • 17. B 2 6 C 4 4 D 6 5 E 8 2 This �le is named process-01.sim in the zip archive of �les I have given you to get started on this assignment. This is also the same set of processes and start/service times used for all of the examples in table 9.4 and �gure 9.5. Running Simulations As with previous assignments you are required to support using your simulation from the command line. Your program will take the name of the �le containing the process information �rst. The next parameter will be either 'rr' to perform round-robin scheduling, or 'srt' if shortest remaining time policy is to be simulated. Finally, a 3rd parameter will be supplied for the round-robin scheduler, the time slice quantum to use. An example of running your �nished program should look like this: $ ./p3 process-01.sim rr 4 A A A B B B B C C C C D D D D B B E E D Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1
  • 18. B 17 15 2.5 C 11 7 1.75 D 20 14 2.8 E 19 11 5.5 Here we are running the simulation using the set of process information given in the previous section and with a time slice quantum of 4. Required Output As shown above, your program must generate 2 bits of output. First of all, while running the simulation of the selected scheduling policy, you should display the process names in the order they are run. In the previous example, the sequence of scheduled/run processes was: A A A B B B B C C C C D D D D B B E E D This indicates that process A ran �rst (times 0, 1 and 2), followed by B running 4 times (times 3 to 7), etc. You are required to output the sequence of process runs as the �rst line of output, with a single space in between each process name as shown. After the processes have run, you need to calculate and display the statistics for the processes that you just simulated. In our previous example, the statistics for our round-robin simulation with a time quantum of 4 time slices were:
  • 19. Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1 B 17 15 2.5 C 11 7 1.75 2 D 20 14 2.8 E 19 11 5.5 For each process, you need to output the time when it �nished, the turnaround time (Tr) and the ratio of the turnaround time to the service time (Tr/Ts). I have provided a zip �le with a �le named p3-start.cpp as a template to get you started. In addition, I have provided you with two process simulation �les, named process-01.sim and process-02.sim, with 2 sets of process information you can simulate. There are several examples of correct results generated for the two sets of inputs, named things like process-01-q1.res, process-01-q4.res, process-01-srt.res, etc. These are the correct results you should get for running your simulation with round-robin scheduling for various time quantums or for shortest remaining time scheduling. 3
  • 20. processtable-01.sim A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 processtable-02.sim A 0 4 B 1 7 C 4 5 D 4 5 E 7 2 F 8 5 G 10 1 H 10 4 I 12 6 processtable-03.sim A 0 3 B 2 4 C 3 5 D 3 8 E 3 2 F 5 6 G 7 9 H 7 4 I 8 3 J 8 5 K 8 4 L 10 6
  • 21. Makefile all: p5sol p5: p5-start.cpp g++ -g $< -o [email protected] p5sol: p5-solution.cpp g++ -g $< -o p5 debug: p5-solution.cpp g++ -DDEBUG_BUILD=1 -g $< -o p5 p5test: ./p5 processtable-01.sim rr 1 > sim-01-rr-1.tst @diff -s -q sim-01-rr-1.tst sim-01-rr-1.res ./p5 processtable-01.sim rr 4 > sim-01-rr-4.tst @diff -s -q sim-01-rr-4.tst sim-01-rr-4.res ./p5 processtable-01.sim srt > sim-01-srt.tst @diff -s -q sim-01-srt.tst sim-01-srt.res ./p5 processtable-02.sim rr 1 > sim-02-rr-1.tst @diff -s -q sim-02-rr-1.tst sim-02-rr-1.res ./p5 processtable-02.sim rr 4 > sim-02-rr-4.tst @diff -s -q sim-02-rr-4.tst sim-02-rr-4.res ./p5 processtable-02.sim srt > sim-02-srt.tst @diff -s -q sim-02-srt.tst sim-02-srt.res ./p5 processtable-03.sim rr 1 > sim-03-rr-1.tst @diff -s -q sim-03-rr-1.tst sim-03-rr-1.res ./p5 processtable-03.sim rr 5 > sim-03-rr-5.tst @diff -s -q sim-03-rr-5.tst sim-03-rr-5.res ./p5 processtable-03.sim srt > sim-03-srt.tst @diff -s -q sim-03-srt.tst sim-03-srt.res
  • 22. @rm sim-01-rr-1.tst sim-01-rr-4.tst sim-01-srt.tst sim-02- rr-1.tst sim-02-rr-4.tst sim-02-srt.tst sim-03-rr-1.tst sim-03-rr- 5.tst sim-03-srt.tst p5zip: zip ../prog-05.zip p5-start.cpp prog-05.pdf processtable- 01.sim processtable-02.sim processtable-03.sim Makefile *.res p5solzip: zip ../prog-05-sol.zip p5-solution.cpp processtable-*.sim sim-*.res clean: rm -f p5 sim-*.tst core* *~ sim-01-rr-1.res sim-01-rr-4.res sim-01-srt.res sim-02-rr-1.res sim-02-rr-4.res sim-02-srt.res sim-03-rr-1.res
  • 23. sim-03-rr-5.res sim-03-srt.res Programming Assignment #5 CSci 430, Spring 2019 Dates: Assigned: Monday April 15, 2019 Due: Wednesday May 1, 2019 (before Midnight) Objectives: � Understand short-term process scheduling. � Work with data structures to implement a round-robin scheduler. � Look at e�ects of di�erent time slice quantum sizes on the round-robin scheduling algorithm. � Use C/C++ to implement vector and matrix data structures, get practice in creating and using such data structures in C/C++. Description: Our textbooks chapter 9 discusses several possible short-term process scheduling policies. In this
  • 24. programming assignment exercise we will implement two of the preemptive policies, the simple shortest remaining time policy (SRT) and the round-robin scheduler with preemptive time slicing. Your program will be given a simple input �le, indicating the process name, its arrival time and its total service time, the same as the process scheduling examples from our textbook in Table 9.4 and Figure 9.5. You will simulate the execution of the required schedulers. As in previous assignments, you program will need to work non-interactively and be callable from the command line. The program will be provided with the �le name of a �le with process information, in the format discussed below. Your program will also be given the time slicing quantum parameter it is to use for the simulation, if round-robin scheduling is selected. Your program will need to output the results of running the set of simulated processes using the selected scheduling policy with the indicated time slice for the round-robin scheduler. Your program will have to output its results exactly as shown below in the required output format. Your program will also need to calculate some summary statistics for the simulated processes, including the turnaround time and Tr/Ts ratio for each process, and the mean Tr and Tr/Ts values for the given simulation. Process simulation �le formats The �les with the information about the processes to be simulated are fairly simple, and have the same information that our textbook uses to illustrate the process scheduling examples. Each simulation �le contains multiple rows of data, where each row consists of the process name, its arrival time, and its
  • 25. service time. Here is an example: 1 A 0 3 B 2 6 C 4 4 D 6 5 E 8 2 This �le is named process-01.sim in the zip archive of �les I have given you to get started on this assignment. This is also the same set of processes and start/service times used for all of the examples in table 9.4 and �gure 9.5. Running Simulations As with previous assignments you are required to support using your simulation from the command line. Your program will take the name of the �le containing the process information �rst. The next parameter will be either 'rr' to perform round-robin scheduling, or 'srt' if shortest remaining time policy is to be simulated. Finally, a 3rd parameter will be supplied for the round-robin scheduler, the time slice quantum to use. An example of running your �nished program should look like this: $ ./p3 process-01.sim rr 4
  • 26. A A A B B B B C C C C D D D D B B E E D Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1 B 17 15 2.5 C 11 7 1.75 D 20 14 2.8 E 19 11 5.5 Here we are running the simulation using the set of process information given in the previous section and with a time slice quantum of 4. Required Output As shown above, your program must generate 2 bits of output. First of all, while running the simulation of the selected scheduling policy, you should display the process names in the order they are run. In the previous example, the sequence of scheduled/run processes was: A A A B B B B C C C C D D D D B B E E D This indicates that process A ran �rst (times 0, 1 and 2), followed by B running 4 times (times 3 to 7), etc. You are required to output the sequence of process runs as the �rst line of output, with a
  • 27. single space in between each process name as shown. After the processes have run, you need to calculate and display the statistics for the processes that you just simulated. In our previous example, the statistics for our round-robin simulation with a time quantum of 4 time slices were: Name Fnsh T_r T_r/T_s ---------------------- A 3 3 1 B 17 15 2.5 C 11 7 1.75 2 D 20 14 2.8 E 19 11 5.5 For each process, you need to output the time when it �nished, the turnaround time (Tr) and the ratio of the turnaround time to the service time (Tr/Ts). I have provided a zip �le with a �le named p3-start.cpp as a template to get you started. In addition, I have provided you with two process simulation �les, named process-01.sim and process-02.sim, with 2 sets of process information you can simulate. There are several examples of correct results generated
  • 28. for the two sets of inputs, named things like process-01-q1.res, process-01-q4.res, process-01-srt.res, etc. These are the correct results you should get for running your simulation with round-robin scheduling for various time quantums or for shortest remaining time scheduling. 3