--------------- UPDATE 28/11/00 -------------------- 1 Here is an interesting suggestion by one of the groups: "We think 'allocb' and 'freeb' alone are not informative enough to let the users (you and us) see what is going on in the simulation. So we decided to introduce three more action types: request: BS is the memory size requested by some process; release: BS is the memory size released by some process and coalesce: BS is the final block size after coalescing." It's an interesting suggestion that eases things for you and for me. This is a soft requirement, meaning that if you're already done than ignore it. 2. As for the output, submit something that is not too large and that may fit into 6 pages at most (one page for each method). 3. For timing, consider counting the number of linked list node accesses when you don't get noticeable times. --------------- UPDATE 22/11/00 -------------------- 1. Output should be the size after rounding up to a power of 2; not the size that was given in the input file. It makes more sense. 2. Display the simulation data like in the handout, for each of the algorithms involved. 3. To record the time to execute the allocation and deallocation, use real times. 4. Take 2^0 as the smallest possible hole. 5. There are no failure rates for deallocations! --------------- ORIGINAL DOCUMENT ------------------- CSC 468F00 --- Marking scheme and Requirements for assignment 3 --------------------------------------------------------------- This small document summarizes some general and specific requirements for A3. Notice that, in most cases, I will follow marking schemes laid down by my predecessors Anna and Tristan. THIS DOCUMENT MAY BE UPDATED AS SOON AS NEEDED; THUS READ IT AS OFTEN AS YOU CAN. I. GENERAL REQUIREMENTS AND MARKING SCHEME ------------------------------------------ SUBMISSION Electronic submission is due by 12 noon, Thursday, November 30. In fact you have just one problem in 6 versions. So do have just one directory containing source files (i.e. no precompiled files), data files, output files, documentation files, and some script (called "compile") for building the program. A README file must be included, and this file is where I will start checking your files. Documentation should be either ASCII text files or Postscript files. Please don't submit WORD files, unless really necessary. You must have a paper submission of A3, due in the beginning of class on Thursday, November 30. The paper submission must be stapled together and contain the names and student numbers of the group members; it must clearly mentions the login name of the group member who submitted. For the ease of my poor eyes, use at least 10pt font when printing. The 6 versions of the dynamic allocation solution should be printed in the order given in the A3 statement. MARK DISTRIBUTION The whole A3 will be marked out of 100. Each of the 6 versions has equal weight. The programs will be judged according to correctness, documentation, and style and clarity. Here is the break down in the marking: 60% for CORRECTNESS, 20% for DOCUMENTATION, and 20% for STYLE AND CLARITY. As already required in earlier assignments, your programs must compile and run on JDK1.2 without modifications. Programs that do not compile/run/take right arguments won't have more than half of the correctness marks. STYLE AND CLARITY Your code must be easily readable and understandable. You must do the following - the header of each file you submit must contain your name, student number, name of assignment - all classes, methods, and data members must have java style brief comments - your code must be written according to OOP paradigm (no single, big main method) - use proper indentation and comment intricate blocks of code. - Be concise and precise in commenting and avoid verbosity. - Be accurate by explaining the internals of your methods. - Keep the obvious unexplained and explain the less obvious. DOCUMENTATION Your README file should briefly describe the overall design of your solution. DETAILLED MARKING SCHEME To follow ... . II. SPECIFIC A3 REQUIREMENTS ---------------------------- Notice that A2 has been a good training for the kind of simulations that you will run in A3. Your main class name should be called "dmalloc". The unique command-line parameter must be called "param", where "param" is the local file containing the parameters of your simulations as specified in the A3 statement. Notice that the only delay algorithm relevant to the completion of this assignment is the one sketched in the statement of the assignment: do any coalescing only when the allocator is unable to allocate the requested size initially. Your program output should have the following format (a reminiscence of A2 !): ---------------------------------------------------------------------------------- -------- START OF BBS SIMULATION ---------- AI BS (bytes) HT (ms) service success 1 16 54 allocb y 3 128 654 allocb y 12 1024 17 allocb y 15 128 654 allocb y 17 2048 275 allocb y 29 1024 -- freeb -- 55 16 -- freeb -- 280 1024 17 allocb n 292 2048 -- freeb -- etc ... 669 256 -- freeb -- <--- Note: This results from coalescing etc ... -------- END OF BBS SIMULATION ---------- . . . . Report of mean and variance: ------------------------------------------------------------------------------- allocb() ------------------------------------------------------------------------------- Allocation Algorithm Means Standard Deviation Failure Rate ------------------------------------------------------------------------------- | Binary Buddy S. | Lazy Binary Buddy S. | Fibonacci Buddy S. | Lazy Fibonacci Buddy S. | Best-Fit S. | Lazy Best-Fit S. | ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- freeb() ------------------------------------------------------------------------------- Allocation Algorithm Means Standard Deviation Failure Rate ------------------------------------------------------------------------------- | Binary Buddy S. | Lazy Binary Buddy S. | Fibonacci Buddy S. | Lazy Fibonacci Buddy S. | Best-Fit S. | Lazy Best-Fit S. | ------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- Anything that has not been specified and that has been done in A2 should be done like in A2. Submit typescript files (see "man script" for instructions) for a fairly large parameters file. Hand in a summary of your "research" in the form of a report containing an output table of the form above (similar to Table 2 in Barkley and Lee). The report should discuss the relative strengths and weaknesses of the various dynamic memory allocation algorithms; look at Barkley and Lee, p. 173, to get inspired.