@SCJAllowed(value=INFRASTRUCTURE) class SleepingQueue extends java.lang.Object
SleepingQueue class holds the sleeping processes
in the PriorityScheduler. insert and
extractMin are O(log n).| Modifier and Type | Field and Description |
|---|---|
(package private) int |
heapSize |
protected int[] |
tree |
| Constructor and Description |
|---|
SleepingQueue(int size) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
exchange(int a,
int b) |
ScjProcess |
extractMin() |
(package private) void |
heapify(int i) |
void |
insert(ScjProcess obj) |
(package private) int |
left(int i) |
static void |
main(java.lang.String[] args) |
ScjProcess |
minimum() |
(package private) int |
parent(int i) |
void |
print()
Print out the contents of the priority queue.
|
(package private) int |
right(int i) |
int parent(int i)
int left(int i)
int right(int i)
void exchange(int a,
int b)
void heapify(int i)
public void insert(ScjProcess obj)
public ScjProcess minimum()
public ScjProcess extractMin()
public void print()
public static void main(java.lang.String[] args)