/* 
 * ProgramStruct.java (Implements structures for Programs DS.)
 *
 * Written by : Nitin  Motgi (nmotgi@cs.ucf.edu)
 *
 * Portions copyright(c) 2001 to School of Electrical Engineering and 
 * Computer Science, UCF, Orlando.                   
 *                                    
 * Use and distribution of this source code are strictly governed by 
 * terms and conditions set by the authors.
 * 
 * $Id : ProgramStruct.java, v1.0.0 03/24/2001. $
 *            
 * Revision History:
 *
 * 1. Created basic structure           Nitin,        v1.0.0  02/24/2001.
 * 2. Added Documentation.              Nitin,        v1.0.1  02/24/2001.
 * 3. Final Documentation Check.        Nitin,        v1.4.3  03/26/2001.  
 * 4. Final Variable Name Check.        Nitin,        v1.4.4  03/26/2001.          
 * 5. Final Functionality Check.        Nitin,        v1.4.5  03/26/2001.          
*/

/* Import some of the libraries.*/
import java.lang.*;
import java.util.*;
import java.io.*;


public class ProgramStruct extends Object{
 public int nProgName;                 /* Name of the Program.*/
 public int nTotSize;                  /* Total Size in Memory.*/
 public int nPageSize;                 /* Size of each page.*/ 
 public int nNoOfPages;                /* Number of Pages required by this pg.*/
 public int[] WorkingSet;              /* Current Working set for pg.*/
 public int nWorkingSetCount;          /* Number of pages in working set.*/
 public int[] nDirtySet;               /* Pages which were written by the prog.*/
 public int nDirtySetCount;            /* Number of pages in dirty set.*/

 ProgramStruct(){
 }/* End of default constructor.*/

 /* Constructor #1.*/
 ProgramStruct(int nProgName, int nTotSize, int nPageSize){
  this.nProgName = nProgName;
  this.nTotSize  = nTotSize;
  this.nPageSize = nPageSize;
  nNoOfPages = nTotSize/nPageSize;
  WorkingSet = new int[nNoOfPages];
  nDirtySet  = new int[nNoOfPages];
  nWorkingSetCount = 0;
  nDirtySetCount   = 0;
 }/* End of Constructor.*/}/* End of ProgramsStruct.*/

