145 | 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 | 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 |
147 | 147 | share the same TXT[i] terminal, and belong to the same ''group'' of process. |
148 | 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 |
150 | | by 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 |
152 | | until the user uses the fg shell command to put it in foreground mode. |
| 149 | 1. Regarding the WRITE accesses, all processes attached to the same TXT_TX[i] terminal can atomically display character strings without any guaranty on the order, when these strings are displayed by different process. The strings providing from various processes are simply sequentialized by the kernel thread associated to the shared TXT_TX[i] device. |
| 150 | 1. Regarding the READ accesses, only one process 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. |