Changes between Version 37 and Version 38 of io_operations


Ignore:
Timestamp:
Jan 16, 2018, 6:16:16 PM (6 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • io_operations

    v37 v38  
    9393The ''device'' argument is the extended pointer on the device descriptor.
    9494
    95 == F) I/O operation ==
     95== F) Global I/O operation scenario ==
    9696
    97 The I/O operation mechanism involves generally three clusters : client cluster / server cluster / IO cluster. It does not use any RPC:
     97The I/O operation mechanism involves generally three clusters : client cluster / server cluster / IO cluster. It does not use any RPC, but uses only remote accesses to to execute the three steps implied by any I/O operation:
    9898 * To post a new command in the waiting queue of a given (remote) device descriptor, the client thread uses only few remote accesses to be registered in the distributed XLIST rooted in the server cluster.
    9999 * To launch the I/O operation on the (remote) peripheral, the server thread uses only remote accesses to the physical registers located in the I/O cluster.
     
    140140To reduce various synchronisation mechanisms, ALMOS-MKH uses IPIs (Inter Processor Interrupt) : Any kernel instance, running on any corein any cluster can send an IPI to any other core in the architecture, using a remote write access to the relevant register in the PIC infrastructure. An IPI is handled as a special interrupt by the target core, and simply forces a scheduling on the target core.
    141141
    142 == H) Implementations ==
     142== H) Text terminals ==
     143
     144The target hardware architectures generally provide a variable - but bounded - number of text terminals (called TXT channels). This NB_TXT_CHANNELS is an hardware parameter defined in the ''arch_info.bin file. We describe here how ALMOS-MKH uses these resources:
     145 1. The TXT[0] terminal is reserved for the kernel. It is normally used by the kernel to display log and/or debug messages. It can only be used by the user processes for debug, through some specific system calls such as the panic() or display_xxx() functions, that should not be used in normal exploitation.
     146 1. The other (NB_TXT_CHANNELS - 1) terminals TXT[i] are shared resources used by all user processes. During kernel initialization,  ALMOS-MKH creates the first ''INIT'' user process, that creates itself (NB_TXT_CHANNELS -1) ''KSH'' user processes (one shell per user text terminal). All user process created by the KSH[i] process
     147share the same TXT[i] terminal, and belong to the same ''group'' of process. 
     148 1. In normal use, the ''KSH[i]'' processes should not be destroyed. If a ''KSH[i]'' process is killed, it is automatically recreated by the ''INIT'' process, to guaranty that there is always one ''KSH[i]'' for each TXT_i terminal.
     149 1. Regarding the WRITE accesses, all processes attached to the same TXT[i] terminal can atomically display character strings without any guaranty on the order.mutual exclusion mechanism. The strings providing from various processes will be simply sequentialized
     150by the kernel thread associated to the shared TXT[i] device.
     151 1. Regarding the READ accesses, only one process the group of process attached to the TXT[i] terminal (called  ''foreground'' process) can read characters. The other processes (called s ''background'' processes) should not try to read characters. If a background process try to read, it receives a SIGSTOP signal, and will keep blocked
     152until the user uses the fg shell command to put it in foreground mode.
     153 
     154== I) Implementations ==
    143155
    144156=== 1. TSAR_MIPS32 architecture ===