/ Resources / Design / Transitions

RCOS.java Home PageClass DefinitionsMessages

The following table explains the various numbered transitions contained in the RCOS.java overview diagram

Number Cause
1 Memory access (read/write).
2 The disk device calls CPU.GenerateInterrupt to add an interrupt to the CPU Interrupt Queue. The interrupt signifies that a disk request has completed or generated an error. CPU Interrupt handling takes over.
3 A number of possibilities:
  • CPU calls Kernel.HandleInterrupt for processing of an interrupt, handles I/O, software, error, and clock interrupts.
  • Kennel.ReadContext reads values of current context
  • Kernel.WriteContext writes new values of current context
4 Interrupt generated because of a terminal I/O completion or error condition
5 DiskScheduler executes Disk.HandleRequest( DiskXferRequest theRequest ) equivalent to disk driver asking physical disk to perform a task
6 Memory read by MemoryManager in response to request by other process, in combination with CPU read may mean that we do need a seperate RAM object so that both can access it
7 ??KernelMemory read?? will it need to do it, can this be restricted to just reading CPU registers, probably should
8 ??KernelMemory read?? will it need to do it, can this be restricted to just reading CPU registers, probably should
9 MemoryManager receiving and sending messages will include
  • recieiving
    AllocateBlock, DeAllocateBlock, CodeExist?? used by ProcessScheduler to check if a program is already loaded? maybe this could be done as part of AllocateBlock when it is passed the name of the program?
  • sending
    MemoryFull, BlockAllocated
10 Kernel sending and receiving messages including
  • sending
    SystemCalls( MessageHandler destination, SystemCall sc )
    Interrupts( MessageHandler destiantion, Interrupt int )
  • receiving
    NewRunningProcess( ProcessScheduler, ProcessContext )
11 Tty sending and receiving messages including
  • sending
    CharacterReady, WriteCharacterDone, CursorMoveDone
    BlockProcess( ProcessScheduler, PID ) ??
  • receiving
    GetCharacter, PutCharacter, GoToXY?
12 DiskScheduler reciving and sending messages including
  • sending
    TransferComplete( DiskTransfer ), TransferError( DiskTransfer )
  • receiving
    DoTransfer( DiskTransfer theTransfer )
13 ProcessScheduler receiving and sending messages including
  • sending
    NewRunningProces( kernel, ProcessContext )
    ProcessForkError( kernel, Pid )??
    ProcessExecError( kernel, Pid )
    AllocateBlock( MemoryManager, ProcessName ) for CreateProcess
    DeAllocateBlock( MemoryManager ) for KillProcess
  • receiving
    ForkProcess
    ExecProcess
    SchedulerNewProcess
    BlockProcess - for other OS components to block processes e.g. DiskScheduler when they request I/O, IPCManager P( 0 )
14 Messages to the Animator, ??Animator doesn't send (to PostOffice) just receive, at least it doesn't send to "real" OS components, it may send to other Animator components but that probably won't use the PostOffice. PostOffices sends the Animator all messages (asyncrhonously??) BEFORE sending them to proper destination. Animator decides whether it wants to do anything withit.
15 FileSystem sending and receiving messages including
  • receiving
    OpenFile, CloseFile, OpenDir, FindNext, FindFirst, Read, Write, Delete, GetFileAttribute, SetFileAttribute, GetFileLock??, ReleaseFileLock
  • sending
    completion or error messages indicating result of the above
    BlockProcess( MemoryManager, PID ) - block process request I/O
16 IPCManager sending and receiving messages including
  • receiving
    Open(Sem|Shm), Create(Sem|Shm), Close(Sem|Shm), Read|WriteShm, Wait, Signal, GetShmSize..
  • sending
    return results for the above
    BlockProcess( MemoryManager, PID ) - block process P(0)
17 IPCManager sending and receiving messages including
  • receiving
    Open(Sem|Shm), Create(Sem|Shm), Close(Sem|Shm), Read|WriteShm, Wait, Signal, GetShmSize..
  • sending
    return results for the above
    BlockProcess( MemoryManager, PID ) - block process P(0)