Class SwapSys

java.lang.Object
  |
  +--SwapSys

public class SwapSys
extends java.lang.Object

The SwapSys class represents the swap subsystem of an operating system.


Method Summary
static void createSwapSpace(PCB proc)
          SwapSys.createSwapSpace(proc) allocates and initializes a swap space structure for proc.
static Page read(PCB proc, int pgNum)
          SwapSys.read(proc, pgNum) returns page number pgNum from the swap space structure for proc.
static void releaseSwapSpace(PCB proc)
          SwapSys.releaseSwapSpace(pid) deallocates the swap space structure for proc.
static void write(PCB proc, int pgNum, Page pg)
          SwapSys.write(proc, pgNum, pg) writes pg into page number pgNum of the swap space structure for proc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSwapSpace

public static void createSwapSpace(PCB proc)
SwapSys.createSwapSpace(proc) allocates and initializes a swap space structure for proc.


releaseSwapSpace

public static void releaseSwapSpace(PCB proc)
SwapSys.releaseSwapSpace(pid) deallocates the swap space structure for proc.


read

public static Page read(PCB proc,
                        int pgNum)
SwapSys.read(proc, pgNum) returns page number pgNum from the swap space structure for proc.


write

public static void write(PCB proc,
                         int pgNum,
                         Page pg)
SwapSys.write(proc, pgNum, pg) writes pg into page number pgNum of the swap space structure for proc.