public abstract class OperatingSystem
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static OperatingSystem |
OS
The single instance of the operating system
|
Constructor and Description |
---|
OperatingSystem() |
Modifier and Type | Method and Description |
---|---|
void |
decreaseNumberProcesses() |
abstract DeviceDriver |
getDriver(DeviceId deviceId)
Returns the driver of the device with the given identifier
|
static OperatingSystem |
getInstance()
Obtain the instance of the operating system
|
abstract InterruptHandler[] |
getInterruptVector()
Retrieve the interrupt vector
|
int |
getNumberRunningProcess() |
java.lang.Object |
getRunningProcess()
Returns the Control Block of the process running in core 0
|
ProcessControlBlock |
getRunningProcess(CPUCore cpuCore)
Returns the Control Block of the process running in the given cpu core
|
abstract Scheduler |
getScheduler()
Returns the Operating System's scheduler
|
void |
increaseNumberProcesses() |
abstract void |
load()
Load the operating system
|
<S> void |
setRunningProcess(CPUCore cpuCore,
ProcessControlBlock<S> pcb)
Set the info that process with the given control block is running
on CPU core \"cpuCore\"
|
public static final OperatingSystem OS
public static final OperatingSystem getInstance()
public abstract void load()
public abstract InterruptHandler[] getInterruptVector()
public abstract Scheduler getScheduler()
public abstract DeviceDriver getDriver(DeviceId deviceId)
deviceId
- public ProcessControlBlock getRunningProcess(CPUCore cpuCore)
cpuCore
- The cpu corepublic java.lang.Object getRunningProcess()
public <S> void setRunningProcess(CPUCore cpuCore, ProcessControlBlock<S> pcb)
cpuCore
- The CPU corepcb
- The Control Block of the process running in cpuCorepublic int getNumberRunningProcess()
public void increaseNumberProcesses()
public void decreaseNumberProcesses()