CSE 7343/5343, Spring 2003
Prof. Jeff Tian, CSE/SoE/SMU, Dallas, TX 75275
tian@engr.smu.edu; www.engr.smu.edu/~tian/class/7343.03s
Project/Part II Testing
Two Basic Test Types
-
You need to show that your safety algorithm works,
by reading in the data files
"allocation", "max", and "available",
and finding and showing/displaying
1) a safe sequence if there is one,
or 2) the reason why it is unsafe.
-
You also need to show that your banker's algorithm works,
by reading in the data files "request_i"
(i=1, 2, ..., n, for all n processes),
in addition to the above data files.
Your program need to show the requests considered,
and actions taken (allocations or requests denied).
Data File Format
-
The input data files will in plain text (ASCII).
-
The format for the data files "allocation", "max", and "available"
will be the same as that given in p.259 of your textbook.
-
The format for data file "request_i" will be:
each line = "t_i r_i1 r_i2 ... r_im",
where t_i is the request time for the i_th request,
and r_ij is the specific request for resource j.
There are a few special cases:
-
The first request should be considered as absolute (clock) time,
while all subsequent requests will be considered
as relative time (time after the previous request has been satisfied).
-
The last line will be "t_l 0 0 ... 0".
-
A release of resource can be modeled as negative request,
which should be immediately granted.
-
See the online examples:
allocation,
max,
available.
request_i.
-
You can use the above guide and examples to make up your own
data files to test your safety and banker's algorithms.
Prepared by Jeff Tian
(tian@engr.smu.edu).
Last update April 2, 2003.