Explain the OS/2 Operating System
Like NetWare, OS/2 manage resources at three levels, as shown in Figure 4.5 Resources may be maintained at the session, process, and thread level. Session is the topmost level of the OS/2hierarchy and manages virtual devices such as screen, keyboard, and mouse. Most commonly, one application runs per session. The process contains the applications resources such a memory, semaphores, files, pipes, and others. Processes may create child processes or threads. Each process created contains one thread (the Main Thread) just as is the case with Windows NT. With OS/2, the only contextual data owned by a thread is a stack and a user-defined data area.
OS/2 allows the application developer to store per-thread information via the DosGetInfoBlocks( ) call. The DosGetInfoBlocks functional call returns a pointer to a Thread Information Block(TIB).In the TIB , a 4-byte user-defined field, is available to the programmer. As with NetWare, this field may be used as a pointer or an index to per-thread data items.
Is summery, application architects must evaluate each target operating system and its capabilities for variable scoping. Obvious design and architecture modifications may be required for each operating system port. If threads or thread scoping are not available to the application developer, an index into a client structure must be passed as a parameter to be used for thread scope data access. This index will need to be passed to each and every function in the thread accessing the data items on a per-client basis. Proper architecture of data item access may ease excessive recording during an application port. Indexes passed to functions, for example, may be used for every OS, whether thread scoping is available or not.