Changes between Version 45 and Version 46 of io_operations
- Timestamp:
- Jan 19, 2018, 1:13:21 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
io_operations
v45 v46 140 140 The target hardware architectures generally provide a variable - but bounded - number of text terminals (called TXT channels in ALMOS-MKH). This NB_TXT_CHANNELS number is an hardware parameter defined in the ''arch_info.bin'' file. We describe here how ALMOS-MKH uses these terminals: 141 141 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. 142 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 share the same TXT[i] terminal, and belong to the same group of process.143 1. The INIT process and the the KSH[i] processes should never be deleted.142 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 processes created by a KSH[i] process share the same TXT[i] terminal as the parent process, and belong to the same group of process. 143 1. In the present implementation, the INIT process and the the KSH[i] processes are never deleted : they do not call the exit() scale, and cannot be killed. 144 144 1. Regarding the WRITE accesses, all processes attached to the same TXT_TX[i] terminal can atomically display character strings. There is no guaranty on the order, when these strings are displayed by different processes, because these strings are simply sequentialized by the kernel thread associated to the shared TXT_TX[i] device. 145 145 1. Regarding the READ accesses, only one process in the group of process attached to the TXT[i] terminal (called ''foreground'' process) is the owner of the TXT_RX[i] terminal, and can read characters . The other processes (called ''background'' processes) should not try to read characters. If a background process P try to read, it receives a SIGSTOP signal, and will keep blocked until the user uses the ''fg'' shell command to give P the ownership of the TXT_RX[i] terminal. 146 1. The control characters (^C, ^Z, etc.) typed in a TXT_RX[i] terminal are only routed to the foreground process attached to this terminal. 146 1. The control characters (ctrlC , ctrlZ) typed in a TXT_RX[i] terminal are only routed to the foreground process attached to this terminal. 147 1. When a new process is launched in a KSH (using the ''load''command), it becomes the TXT terminal owner, and run in foreground, unless it is launched with the ''&'' attribute on command line. When a child process is directly created by a parent process (using the ''fork() sys call) tsys call), it does not get the the TXT terminal ownership, and run in background. 147 148 148 149 == I) Hardware Specific ==