SYSTEM AND METHOD FOR ALTERING THE ENVIRONMENTAL NAMESPACES IN THE MICROSOFT MS-DOS AND WINDOWS OPERATING SYSTEMS

Abstract: A computer system processes applications programs under control of an operating system program. The operating system program provides an applications program processing area each applications program processed by the computer system. An environmental namespace (21) established at initialization (20) for each applications program processing area includes environmental namespace information which defines the operating environment under which the applications program is to be run. An environmental namespace update module (40) updates the environmental namespace information in response to environmental namespace update information, so that, if an applications program is initialized after the update, the operating system program after modification uses the environmental namespace as updated in establishing the applications program processing areas (30).

Description: SYSTEM AND METHOD FOR ALTERING THE ENVIRONMENTAL NAMESPACES IN THE MICROSOFT MS-DOS AND WINDOWS OPERATING SYSTEMS FIELD OF THE INVENTION The invention relates generally to the field of computer systems, and more specifically to operating system programs for use in controlling operations of computer systems and providing operating environments and services to applications programs In particular, the invention provides an arrangement for facilitating the alteration of a global environmental namespace provided by, for example, the Microsoft MS-DOS and Windows ™ operating system programs after the operating system program has been initialized BACKGROUND OF THE INVENTION In performing processing operations, computer systems make use of applications programs to perform such operations as database management, word processing, accounting, process control - and numerous other functions in an office or industrial environment. The applications programs generally make uses of operating system programs both to provide an environment in which they can be conveniently executed and to provide system services such as low-level control of various hardware elements One popular operating system program, namely, Microsoft Windows ™ operates in conjunction with Microsoft's MS-DOS operating system program to provide an environment in which applications programs written for Windows can be executed The Windows operating system program provides, among other things, a graphical user interface ("GUT") as well as a multi-tasking operating environment in which a plurality of Windows programs can be executing contemporaneously Since Windows operates in conjunction with MS-DOS, it also provides an environment in which other applications programs written for MS-DOS can be executed Since MS- DOS applications programs are typically designed on the assumption that only services provided by MS-DOS will be provided, such as low-level control of he computer system hardware, but not those services provided by Windows, MS-DOS programs will not take advantage of the additional services, such as the GUI and multi-tasking, provided by Windows In providing the operating environments for both Windows and MS-DOS applications programs, Windows makes use of vanous control programs which are loaded into the computer system's memory when W r ιndows is iniualized Windows also makes use of information from a global environmental namespace, which includes information defining the global operating environment for the computer system processing the programs The specific information in the global environmental namespace will depend on certain environmental parameters which are established when the computer system is initialized Default environmental parameters may be provided, which may be changed by appropπate commands in, for example, an AUTOEXEC BAT batch file which the computer system will execute when it is initialized One problem anses in that the maximum sizes of environmental namespaces allocated to the control programs by Windows is fixed to the size of the information contain in the computer system's global environmental namespace when Windows itself is initialized Accordingly, Windows does not permit increasing the size of the environmental namespaces to accommodate changes which may be desired while the computer system is operating SUMMARY OF THE INVENTION The invention provides a new and improved system and method for altcnng the environmental namespaces in the Microsoft MS-DOS and Windows operating systems In bnef summary, in one aspect a computer system processes applications programs under control of an operating system program The operating system program provides an applications program processing area for each applications program processed by the computer system An environmental namespace established at initialization for each applications program processing area includes environmental namespace information which defines the operating environment under which the applications program is to be run An environmental namespace update module updates the environmental namespace information in response to environmental namespace update information, so that, if an applications program is initialized after the update, the operating system program after modification uses the environmental namespace as updated in establishing the applications program processing areas. In one particular embodiment, the environmental namespace comprises a plurality of namespace parameter entries each including a namespace parameter name and associated namespace parameter value, and the update information includes an update namespace parameter name and associated update namespace parameter value The environmental namespace update module searches through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name corresponds to the update namespace parameter name. If a namespace parameter entry is located whose namespace parameter name corresponds to the update namespace parameter name, the update namespace parameter value is used to update the namespace parameter value associated with the located namespace parameter entry On the other hand, if a namespace parameter entry whose namespace parameter name corresponds to the update namespace parameter name is located, the update namespace parameter name and associated update namespace parameter value are used to generate a new entry having a namespace parameter name and associated namespace parameter value corresponding to the update namespace parameter name and associated update namespace parameter value. In that embodiment, the environmental namespace has a maximum size which is determined on initialization of the operating system program In that case, when the environmental namespace is updated, it is updated so that its size is no larger than the maximum size The environmental namespace is provided with at least one spare entry, whose space is used when generating the new entry BRIEF DESCRIPTION OF THE DRAWINGS This invention is pointed out with particularity in the appended claims The above and further advantages of this invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which FIG 1 depicts an illustrative computer system incorporating an arrangement in accordance with the invention for modifying environmental namespaces in the MS-DOS and Windows operating system program, FIG 2 schematically depicts vaπous data structures useful in understanding the invention, and FIGs 3 A through 4D compπse flow charts depicting the operations performed by the computer system in connection with the invention DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT FIG 1 depicts an illustrative computer system 10 incorporating a graphical user interface, in accordance with the invention, for displaying information to an operator With reference to FIG 1 , the computer system 10 in one embodiment includes a processor module 1 1 and operator interface elements compnsmg operator input components such as a keyboard 12A and/or a mouse 12B (generally idenufied as operator input element(s) 12) and an operator output element such as a video display device 13 The illustrative computer system 10 is of the conventional stored-program computer architecture The processor module 1 1 includes, for example, processor, memory and mass storage devices such as disk and/or tape storage elements (not separately shown) which perform processing and storage operations in connection with digital data provided thereto The operator input element(s) 12 are provided to permit an operator to input information for processing The video display device 13 is provided to display output information generated by the processor module 1 1 on a screen 14 to the operator, including data that the operator may input for processing, information that the operator may input to control processing, as well as information generated duπng processing The processor module 1 1 generates information for display by the video display device 13 using a so-called "graphical user interface" ("GUI"), in which information for vaπous applications programs is displayed using vanous "windows," one embodiment of which will be descπbed in greater detail below in connection with FIG 2 Although the computer system 10 is shown as compnsing panicular components, such as the keyboard 12A and mouse 12B for receiving input information from an operator, and a video display device 13 for displaying output information to the operator, it will be appreciated that the computer system 10 may include a vaπety of components in addition to or instead of those depicted in FIG 1 The invention provides a system and method for facilitating alterations to the "global environmental namespace," specifically in connection with the Microsoft Windows ™ operating system program, including, for example, Versions 3 1 , 3 1 1 and Wmdows95 (collectively hereinafter "Windows") By way of background, a computer system 10 will run Microsoft Windows in conjunction with Microsoft's MS-DOS operating system program (hereinafter "MS-DOS") Windows provides an environment in which applications programs wntten for it (hereinafter "Windows application programs") can be executed and provides, among other things, a graphical user interface ("GUI") as well as a multi-tasking operating environment in which a plurality of Windows programs can be executing contemporaneously Windows further provides an environment in which other apphcations programs wntten for MS-DOS (hereinafter "MS-DOS applications programs") can be executed, since MS-DOS applications programs are typically designed on the assumption that GUI and multi-tasking are not provided, Windows typically does not provide a GUI or multi-tasking operating environment when executing MS-DOS applications programs In providing the operating environments for both Windows and MS-DOS applications programs, Windows (specifically, Windows Version 3 1 ) makes use of two programs, namely, a "WIN386" program (identified by filename "WIN386 EXE") and a " RNL386" program (identified by filename "KRNL386 EXE"), which Windows loads into memory and initializes when it (Windows itself) is initialized Windows associates with each program information from a global environmental namespace, which is established by the MS-DOS operating system program when it is initialized pπor to im alization of Windows The global environmental namespace contains information which defines the global operating environment for the operating system program under which the applications programs are bang run The specific infoπnation in the global environmental namespace will depend on certain environmental parameters which are established when the computer system 10 is initialized, and may include such information as the path(s) which may be defined (the MS-DOS "PATH=" command), locations for temporary files (the MS-DOS "SET TEMP=" command), and the like Default environmental parameters may be provided by MS-DOS, which may be changed by appropπate commands in, for example, an AUTOEXEC BAT batch file which the computer system will execute when it is initialized As a specific example, a global environmental namespace which may be established from an AUTOEXEC BAT batch file may compπse, for example, the following PATH = C VC \DOS,C YWINDOWS.C \MOUSE LMOUSE=C \MOUSE PROMPT=$P$G TEMP=C \WINDOWS\TEMP MOUSE=C VMSMOUSE with each line compnsing an entry in the global environmental namespace, and being stored in ASCII text form Each entry represents the name of a namespace vanable and its value, with the vaπable name being to the left ofthe equals ("=") sign and the vaπable's value being to the πght ofthe equals sign When the MS-DOS operating system program is initialized and the global environmental namespace is established, the names and values ofthe namespace vambles are loaded into the global environmental namespace, with the values of the vaπables being separated by a selected character selected to identify vaπable separation character, and the end of the global environment namespace being indicated by a selected termination character In one embodiment the vaπable separation character compnses a single ASCII "null" character, and the termination character compnses two consecutive ASCII "null" characters When Windows is initialized, it associates each of the WIN386 EXE and KRNL386 EXE programs an environmental namespace containing the above text, including the ASCII "null" characters used in the global environmental namespace When an applications program is initialized, Windows generates a clone of the environmental namespace for each applications program so initialized More specifically, when Windows initializes a Windows applications program, it generates a clone of the environmental namespace that it associated with the KRNL386 program which it generated when the KRNL386 program was initialized Similarly, when Windows initializes an MS- DOS applications program, it generates a clone ofthe environmental namespace it associated with the WIN386 program which it generated when the WIN386 program was initialized. In the cloning operation, Windows essentially generates a copy ofthe environmental namespace associated with the respective KRNL386 or WTN386 program for each of the applications programs. Thus, each Windows or MS-DOS applications program which is initialized will inherit the environmental namespace that exists when the applications program is initialized This is shown in more detail in FIG. 2. FIG. 2 specifically depicts a functional block diagram representing operations performed during Windows initialization and further of initialization of Windows applications programs and MS-DOS applications programs under Windows, and shows environmental and other data structures generated by Windows in connection with program initialization. With reference to FIG. 2, during Windows initialization an initialization module 20 receives a global environmental namespace 21 generated by MS-DOS when it (the MS-DOS operating system program) is initialized. In addition, the Windows initialization module 20 will load and execute the KRNL386.EXE and WIN386.EXE programs, which are generally stored on the - computer system's disk storage device, and generate in response thereto a Windows prototype environment "KRNL386" 24 (in the case ofthe KRNL386.EXE program) and an MS-DOS virtual machine prototype environment "WI 386" 25 (in the case of the WTN386.EXE program). The Windows initialization module 20 will provide a Windows environmental namespace 26 for the Windows prototype environment 24 and an MS-DOS environmental namespace 27 for the MS-E>OS virtual machine prototype environment 25, both of which will include information from the global environmental namespace 21. Following initialization of Windows, Windows itself will be in condition to load, initialize and run applications programs. In initializing a Windows applications program, Windows will clone the Windows prototype environment 24, including the Windows environmental namespace 26, in creating an environment for the Windows applications program. FIG. 2 depicts a plurality of applications program environments 30(1) through 30(W) (generally identified by reference numeral 30(w)) created by Windows, with each applications program environment 30(w) being associated with a Windows applications program. Similarly, in initializing an MS-DOS applications program, Windows will clone the MS-DOS prototype environment 25, including the MS-DOS environmental namespace 27, in αeating a virtual machine for the MS-DOS applications program. FIG. 2 also depicts a plurality of virtual machines 31(1) through 31(M) (generally identified by reference numeral 31(m)) that is created by Windows, with each virtual machine 3 l(m) being associated with an MS-DOS applications program. Thus, it will be appreciated that each Windows applications program environment 30(w) created by Windows includes an environmental namespace 32(w) for the respective environment 30(w), with the contents ofthe environmental namespace 32(w) conesponding to the contents ofthe Windows environmental namespace 26 at the time the environment 30(w) is established. Similarly, each MS-DOS virtual machine 31(m) created by Windows includes an environmental namespace 33(m) for the respective virtual machine 3 l(m), with the contents of the environmental namespace 33(m) corresponding to the contents of the Windows environmental namespace 26 at the time the environment 3 l(m) is established. As indicated above, Windows, when it establishes the Windows and MS-DOS environmental namespaces 32(w) and 33(m) for the respective Windows applications program environment 30(w) and MS-DOS virtual machine 3 l(m), uses the respective Windows environmental namespace 26 from the Windows prototype environment 24 or MS-DOS environmental namespace 27 from the MS-DOS prototype virtual machine 25 when it establishes an environment 30(w) or virtual machine 3 l (m). When Windows is initialized, in establishing the Windows and MS-DOS environmental namespaces 26 and 27, it provides the Windows and MS-DOS environmental namespaces 26 and 27 with the minimum amount of space required to contain the respective namespaces. Accordingly, even if the global environmental namespace 21 or other construct allocates a buffer size that is larger than the minimum size required to accommodate the global environmental namespace 21 , Windows will only allocate the minimum amount of space to namespaces 26 and 27 which will accommodate the namespace variable name and value information. In accordance with the invention, a namespace modification module 40 is provided to facilitate altering of the contents of the global environmental namespace 21 and the Windows and MS-DOS environmental namespaces 26 and 27 after the respective namespaces 21 , 26 and 27 are created, without re-irutializing (so-called "re-booting") the computer system 10 Thus, after the contents of the global environmental namespace 21 and the respective namespaces 26 and 27 are altered, Windows will use the updated contents of namespaces 26 and 27 when subsequently establishing Windows applications program environments 30(w) or new MS-DOS virtual machines 31(m) for applications programs initialized after the update To provide space in the global environmental namespace 21 and the Windows and MS-DOS environmental namespaces 26 and 27 which can be used by the namespace modification module 40 duπng an update, the global environmental namespace 21 is provided with a number of dummy "spare" entπes which may be overwritten by the updated namespace information With reference to the above-noted illustrative environmental namespace, the namespace with spare entπes may compnse, for example, the following text, in ASCII form PATH = C \,C \DOS,C \WINDOWS.C VMOUSE LMOUSE=C VMOUSE PROMPT=$P$G TEMP=C \WINDOWS\TEMP MOUSE=C VMSMOUSE SP 1 =XXXXXXXXXXXXXXXX-X-XXXXXXXXXXX C ^^ SP2=XXXXXXXXX OCXXXXXXXXXXXXXXXXXDCOCXXXXX^ SP3=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX-XCOCXXXXXX SPN=XXXXXXXXXxDCXXXXXXXXXXXXXXXXX where "SPl " through "SPN" (generally identified by reference numeral "SPn") identifies the entry as being a spare entry, and "X" is a space holder (The identifier "SPn" is selected in one embodiment since it does not identify a variable that is actually used by either the MS-DOS or Windows operating system program, and to mnemonically identify it as a "spare ") As with the illustrative global environmental namespace descπbed above, each entry, except for the spare entnes (that is, those entries beginning with "SP=") represents the name of a namespace variable and its value, with the variable name being to the left ofthe equals ("=") sign and its value being to the right ofthe equals sign. When the MS-DOS operating system program is initialized and the global environmental namespace 21 including the spare entries is established, the names and values of the namespace variables, including the spare entries, are loaded into the global environmental namespace, with the values of the variables being separated by an ASCII null character selected to identify variable separation character, and the end of the global environment namespace being indicated by a termination character comprising two consecutive ASCII "null" characters In one embodiment, in which each entry in the global environmental namespace 21 and environmental namespaces 26 and 27 may have a selected maximum number of ASCII characters, the number the number of "X's" in each entry is sufficient with the number of characters in the "SP=" portion of the line to correspond to the selected maximum ASCII character number. By providing one or more spare entries, space is available in the global environmental namespace 21 and environmental namespaces 26 and 27 in which may be overwritten with updated environmental information The namespace modification module 40 in one embodiment performs two general operations In one general operation, identified as a "GET ENV" get environment operation, the namespace modification module 40 operates to retπeve the contents of a namespace, in particular retrieving the value of a specific element or variable in the namespace In a second general operation, identified as a "PUT ENV" put environment operation, the namespace modification module 40 operates to update the contents of both the Windows environmental namespace 26 and the MS-DOS environmental namespace 27. An operator or system manager may enable the namespace modification module 40 to perform the GET ENV get environment operation to retrieve the current value of a selected variable from an environmental namespace. In one embodiment, if the Windows operating system program is running, the namespace modification module 40 will retum the value of the variable from the Windows environmental namespace 26, but, if the Windows operating system program is not running, the namespace modification module will return the value ofthe variable from the global environmental namespace 21. It will be appreciated that, if the Windows operating system program is running, the value of the variables in the global environmental namespace 21 and the MS-DOS environmental namespace 27 will correspond to the value ofthe variables in the Windows environmental namespace 26, and so by retrieving the value of a variable in the Windows environmental namespace 26 will provide the value of the corresponding variable in the global environmental namespace 21 and the MS-DOS environmental namespace 27. An operator or system manager may also enable the namespace modification module 40 to perform the PUT ENV put environment operation to update the values in the global environmental namespace 21 and the Windows and MS-DOS environmental namespaces 26 and 27. Generally, during an update operation, the namespace modification module 40 will update both the Windows environmental namespace 26 and the MS-DOS environmental namespace 27 so that subsequently- initialized Windows and MS-DOS applications programs will both be provided with the same environmental namespace. In addition, the namespace modification module 40 will update the global , environmental namespace during an update operation so that, if the current Windows session is subsequendy ended, the updated environmental namespace will be preserved and used for subsequent operations by the computer system 10. It will be appreciated that, if it is desired to be able to provide Windows and MS-DOS applications programs with different updated environmental namespaces, the namespace modification module 40 may update the Windows and MS-DOS environmental namespaces 26 and 27 separately. In addition, if it is desired to permit a return the environmental namespace to the original environmental namespace at the end of a Windows session, it will be appreciated that the namespace modification module 40 need not update the global environmental namespace 21 during an update operation. The operations performed by the namespace modification module 40 during a GET ENV get environment operation will be described in connection with FIGs. 3 A through 3C, and the operations performed by the namespace modification module 40 during a PUT ENV put environment operation will be described in connection with FIGs. 4A through 4D. In initiating a GET EΝV get environment operaϋon, an operator or system manager will provide a vanable name identifying the vanable whose value is to be obtained With reference to FIG 3, in connection with a GET ENV get environment operation, the namespace modification module 40 will lniually obtain the vaπable name ofthe vanable whose value is to be obtained (step 100) Thereafter, the namespace modification module 40 will perform a seπes of steps 101 through 103 to locate the Windows and MS-DOS environmental namespaces 26 and 27 and the global environmental namespace 21 In those operations, the namespace modification module 40 will first determine whether it has previously generated and cached pointers to the Windows and MS-DOS environmental namespaces 26 and 27 (step 101 ) or the global environmental namespace 21 in a namespace descπptor cache 41 (FIG 2) If so, the namespace modification module 40 will sequence to step 104 (descnbed below) to use those pointers, along with previously-cached size information identifying the sizes of the vaπous namespaces 21 , 26 and 27, in retπev g the value ofthe vanable whose name was provided in step 100 On the other hand, if the namespace modification module 40 determines in step 101 that it has not previously generated the pointers to namespaces 21 , 26 and 27 and cached them in its namespace descnptor cache 41 , it will sequence to step 102 to locate the namespaces 21 , 26 and 27 (step 102) and generate namespace descnptors, each of which compnses a pointer and a size value, for each of the namespaces 21 , 26 and 27, and load them into the namespace descnptor cache 41 (step 103) Each pointer identifies the base address, in the computer system's memory, of the respective namespace 21, 26 or 27, and the size value identifies the size (in, for example, bytes or words) ofthe respective namespace 21, 26 or 27 Each environmental namespace 21 , 26 and 27 is headed by a selected ASCII text stπng, and the base address of the respective namespace 21 , 26 and 27 can be located by scanning through the computer system's memory from the base ofthe program segment for the namespace's associated programs (the MS-DOS program COMMAND COM for the global environmental namespace 21, RΝL386 EXE for the Windows environmental namespace 26 and WIN386 EXE for the MS-DOS environmental namespace 27) in a conventional manner to locate the appropπate ASCII text stπng It will be appreciated that, if the namespace modification module 40 executes the operations descnbed above in connection with steps 102 and 103 pπor to iniUalization ofthe Windows operating system program, the prototype environments 24 and 25 and namespaces 26 and 27 will not exist, in which case it need only perform the operations to generate a descnptor for the global environmental namespace 21 In that case, if the namespace modification module 40 later repeats step 101 and determines that it has already cached a descnptor for the global environmental namespace 21 , it need only perform steps 102 and 103 to generate and cache descπptors for the Windows and MS-DOS namespaces 26 and 27 In any case, after generating and caching the required descπptor(s) in steps 102 and 103, the namespace modification module 40 sequences to a seπes of steps in which it uses one of the descnptors to retπeve the value of the vaπable whose name was provided by the operator or system manager As descπbed above, if the computer system 10 is running Windows, the namespace modification module 40 will retπeve the value of the vanable from the Windows environmental namespace 26, but if the computer system 10 is not running Windows, the namespace modification module 40 will retneve the value of the vaπable from the global environment namespace 21 Accordingly, in step 104 the namespace modification module 40 will initially determine if the computer system 10 is running Windows, and, f so, select the namespace descnptor for the Windows environmental namespace 26 as a "selected namespace descnptor" (step 105) On the other hand, if the namespace modification module 40 determines in step 104 that the computer system 10 is not running Windows, it sequences to step 106 to select the namespace descnptor for the global environment namespace 21 as the "selected namespace descnptor " Following either step 105 or 106, the namespace modificauon module 40 will use the selected namespace descnptor to attempt to locate the vanable whose name corresponds to the vaπable name that it received in step 100 (step 107) It will be appreciated that the portion of computer system's memory beginning with the memory location identified by the pointer of the selected namespace descnptor, to the memory location determined by the pointer and the selected namespace descnptor's size value, corresponds to the portion ofthe memory in which the respective namespace 21 or 26 will be stored Accordingly, in performing step 107, the namespace modification module 40 searches through the portion of computer system's memory beginning with the memory location identified by the pointer ofthe selected namespace descnptor, to the memory location determined by the pointer and the selected namespace descπptor's size value, to attempt to locate an entry that corresponds to the vaπable name As noted above, the vaπables are stored in the respective namespaces in ASCII text format, and the namespace modification module 40 can perform a text search through that portion ofthe memory to locate an ASCII text stπng conesponding to the vanable name and ending in the ASCII code for the "equals" sign ("=") If die namespace modificaUon module 40 finds the vaπable name in the respective namespace 21 or 26 in step 107, it will retneve the value associated with the vaπable name and provide it to the operator or system manager (step 109) In retπeving the value associated by the vanable name, the namespace modification module 40 will retneve the ASCII sequence in the locations in the computer system's memory following the vaπable name up to the first ASCII "null" value, which identifies the end of the entry associated with the vaπable in the namespace On the other hand, if the namespace modification module does not find the vaπable name in the respective namespace 21 or 26 in step 106, it can return an ASCII "null" value, or an error indication, to the operator or system manager to indicate that the vaπable was not found (step 1 10) As noted above, the operator or system manager may also enable the namespace modification module 40 to perform the PUT ENV put environment operation to update the values in the global environmental namespace 21 and the Windows and MS-DOS environmental namespaces 26 and 27, which operation will be descπbed in connection with FIGs 4A through 4D In initiating a PUT ENV put environment operation, an operator or system manager will provide a vanable name identifying the vaπable whose value is to be obtained With reference to FIG 4 A, in connection with a PUT ENV put environment operation, the namespace modification module 40 will initially obtain the vaπable name ofthe vaπable whose value is to be updated and its update value (step 120) Thereafter, the namespace modification module 40 will perform a seπes of steps 121 through 123, which are similar to steps 101 through 103 described above, to determine whether descriptors locating the Windows and MS-DOS environmental namespaces 26 and 27 and the global environmental namespace 21 have previously been generated and, if not, to generate the descriptors and store them in the namespace descriptor cache 41. Following step 121 (if the descriptors were previously generated) or step 123, if all three namespaces exist, the namespace modification module 40 will iteratively update the identified variable in the namespaces 21, 26 and 27 . As noted above, if the Windows operating system program is not currently running, then namespaces 26 and 27 do not exist, and so the namespace modification module 40 will not attempt to update them Accordingly, following step 123, the namespace modification module 40 will determine whether the Windows operating system program is running (step 124) and if so it will sequence to series of steps to update the identified variable in the MS-DOS environmental namespace 27 (steps 125 through 135), the Windows environmental namespace 26 (generally, step 136) and finally the global environment namespace 21 (generally, step 137) On the other hand, if the namespace modification module 40 determines in step 124 that the Windows operating system program is not running, it will sequence directly to update the global environment namespace 21 (generally, step 137). Referring first to the update in connection with the MS-DOS environmental namespace 27, the namespace modification module 40 will initially determine whether the variable to be updated currently has a value in the namespace 27 (step 125) The operations performed by the namespace modification module 40 in connection with step 125 may be similar to those described above in connection with step 106 If the namespace modification module 40 makes a positive determination in step 125, it will copy the namespace entries of the MS-DOS environmental namespace 27, up to the entry to be updated, to a temporary buffer (step 126) Thereafter, the namespace modification module 40 will determine whether the number of characters in the namespace entries copied in step 126, plus the number of characters in the updated variable, plus the number of characters in the portion ofthe environmental namespace 26 (the portion not copied in step 126) is greater than the size ofthe MS-DOS environmental namespace 21 as determined from the namespace descriptor (step 127). If the determination in step 127 is positive, the size of the MS-DOS environmental namespace 27, if it were updated, would be too large to be accommodated in the portion of the computer system's memory allocated to namespace 27, and so the namespace modification module 40 provides an error indication (step 128). On the other hand, if the namespace modification module 40 makes a negative determination in step 127, the size ofthe MS-DOS environmental namespace 27, if it were updated, would not be too large to be accommodated in the portion of the computer system's memory allocated to namespace 27. In that case, the namespace modification module 40 copies the updated variable value and the remaining entries from the MS-DOS environmental namespace 27 (including the terminating ASCII "null" indication) into the temporary buffer (steps 129 and 130, respectively), and thereafter copies the contents of the temporary buffer into the MS-DOS environmental namespace 27 (step 131 ), thereby to finish the update ofthe environmental namespace 27. Returning to step 125, if the namespace modification module 40 determines in that step that the variable to be updated does not currendy have an entry in the MS-DOS environmental namespace 27, it sequences to step 132 to determine whether the namespace, if updated, would be too large to be accommodated in the portion of the computer system's memory allocated to namespace 27, and so the namespace modification module 40 provides an enor indication (step 133) On the other hand, if the namespace modification module 40 in step 132 determines that the namespace, if updated, would not be too large to be accommodated in the portion of the computer system's memory allocated to namespace 27, sequences to a series of steps to store the new variable name and value in the MS-DOS environmental namespace 27. In those operations, the namespace modification module 40 will initially generate a pointer to identify the memory location containing the end ofthe last entry in the MS-DOS environmental namespace 27 and increment it to point to a memory location in which it store the beginning ofthe new variable (step 134), and use the pointer so generated to store the new variable (step 135). As described above, the namespace modification module 40 will perform operations similar to those described above in connection with steps 125 through 135 to update the identified variable in the Windows environmental namespace 26 (generally, step 136) and the global environmental namespace 21 (generally, step 137). Since the operations performed by the namespace modification module 40 to update the namespaces 26 and 21 are similar to those performed to update the namespace 27, they will not be described in detail. In any case, unless an update would result in an error as described above, following step 137 the namespace modification module 40 will have updated the environmental namespaces 21 , 26 and 27 so that, when Windows subsequently initializes a Windows or MS-DOS applications program, the updated values in the respective namespaces 26 and 27 will be used in generating the namespace 32(w) and 33(m) for the respective program environment 30(w) or virtual machine 3 l (m). It will be appreciated that numerous changes may be made to the namespace modification module 40 as described above. For example, in the embodiment described above, the contents ofthe environmental namespaces 21 , 26 and 27 will all have the same contents; that is, the Windows and MS-DOS namespaces 26 and 27 are both initialized to have the same contents as the global environmental namespace 21 when Windows is initialized, and the namespace modification module 40 updates all three environmental namespaces 21 , 26 and 27 during any PUT ENV put environment operation. It will be appreciated, however, that the namespace modification module 40 may be enabled to selectively update fewer than all of the environmental namespaces 21 , 26 and 27, in which case only environmental namespaces 21, 26 and 27 as selected by the operator or system manager will be updated. In such an embodiment, the operator or system manager will, in step 120 (FIG. 4 A) provide, in addition to the name ofthe variable to be updated and the update value, the identification ofthe environmental namespace(s) to be updated. In addition, it will be appreciated that, since the variables and their values may differ as among the various environmental namespaces in such an embodiment, doing a GET ENV get environment operation, the namespace modification module 40 may perform the operations described above in connection v/ith FIGs. 3 A through 3C to retrieve the values ofthe variable from all three of the environmental namespaces 21 , 26 and 27, or alternatively the operator or system manager may in step 100 (FIG. 3 A) provide the identification of one or more of the environmental namespaces 21 , 26 and 27 from which the valuers) ofthe identified vaπable are to be retrieved In addition, it will be appreciated that details of certain aspects of the structure and operation ofthe invention, which have been descnbed above in connection with specific attnbutes ofthe MS- EKDS and Windows operating system programs, may differ in connection with use of the invention in connection with other operating system programs, as will be readily apparent to those sblled in the art Tbe foregoing descnption has been limited to a specific embodiment of this invention It will be apparent, however, that vanous vanations and modifications may be made to the invention, with the attainment of some or all of the advantages of the invention It is the object of the appended claims to cover these and such other vanations and modifications as come withm the true spiπt and scope of the invention

Claims: CLAIMS What is claimed is : 1. A computer system for processing at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the computer system comprising: A. an environmental namespace which contains environmental namespace information which defines an operating environment for the operating system program under which at least one applications program is to be run, the operating system program, during initialization of at least one applications program, using the environmental namespace in establishing an applications program processing area for the applications program being initialized; and B. an environmental namespace update module for updating the environmental namespace information in response to environmental namespace update information, so that, if an applications program is initialized after the update, the operating system program after modification uses the environmental namespace as updated in establishing at least one applications program processing area. 2. A computer system as defined in claim 1 in which the environmental namespace update information is provided by an operator. 3. A computer system as defined in claim 1 in which the operating system program, in using the environmental namespace in establishing an applications program processing area for an applications program, replicates the environmental namespace in the applications program processing area 4. A computer system as defined in claim 3 in which the operating system program replicates the environmental namespace in each applications program processing area established thereby 5 A computer system as defined in claim 1 in which the operating system program uses the environmental namespace in establishing an applications program processing area for the applications program initialized thereby 6 A computer system as defined in claim 1 in which environmental namespace comprises a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information includes an update namespace parameter name and associated update namespace parameter value and the environmental namespace update module includes A a search element for searching through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name conesponds to the update namespace parameter name; B an existing entry update element, responsive to the search element locating a namespace parameter entry whose namespace parameter name corresponds to the update namespace parameter name, for using the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry; and C. a new entry generation element, responsive to the search element not locating a namespace parameter entry whose namespace parameter name corresponds to the update namespace parameter name, for using the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value 7. A computer system as defined in claim 6 in which the environmental namespace has a maximum size determined on initialization of the operating system program, the environmental namespace update module, when updating the environmental namespace providing that the environmental namespace has a size no larger than said maximum size 8 A computer system as defined in claim 7 in which the environmental namespace further includes at least one spare entry, the new entry generation element using the spare entry's space when generating said new entry 9. An environmental namespace update module for use in connection with a computer system for processing at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the computer system comprising an environmental namespace comprising a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information comprising an update namespace parameter name and associated update namespace parameter value which defines an operating environment for the operating system program under which at least one applications program is to be run, the environmental namespace update module comprising A. a search element for searching through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, B an existing entry update element, responsive to the search element locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, for using the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry; and C a new entry generation element, responsive to the search element not locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, for using the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value. 10. An environmental namespace update moduie as defined in claim 9 in which the environmental namespace update information is provided by an operator 1 1.An environmental namespace update module as defined in claim 9 in which the environmental namespace has a maximum size determined on initialization of the operating system program, the environmental namespace update module, when updating the environmental namespace providing that the environmental namespace has a size no larger than said maximum size 12 An environmental namespace update module as defined in claim 1 1 in which the environmental namespace further includes at least one spare entry, the new entry generation element using the spare entry's space to when generating said new entry. 13. A method of operating a computer system which processes at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the method comprising the steps of: A. establishing an environmental namespace which contains environmental namespace information which defines an operating environment for the operating system program under which at least one applications program is to be run, the operating system program, during initialization of at least one applications program, using the environmental namespace in establishing an applications program processing area for the applications program being initialized; and B. updating the environmental namespace information in response to environmental namespace update information, so that, if an applications program is initialized after the update, the operating system program after modification using the environmental namespace as updated in establishing at least one applications program processing area. 1 . A method as defined in claim 13 in which the environmental namespace update information is provided by an operator. 15. A method as defined in claim 13 in which the operating system program, in using the environmental namespace in establishing an applications program processing area for an applications program, replicates the environmental namespace in the applications program processing area. 16. A method as defined in claim 15 in which the operating system program replicates the environmental namespace in each applications program processing area established thereby. 17 A method as defined in claim 13 in which the operating system program uses the environmental namespace in establishing an applications program processing area for the applications program initialized thereby 18 A method as defined in claim 13 in which environmental namespace compnses a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information includes an update namespace parameter name and associated update namespace parameter value and the environmental namespace update step compnsing the steps of A searching through the namespace parameter entπes to locate a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, B in response to the search element locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, using the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry, and C in response to the search element not locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, using the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value 19. A method as defined in claim 18 in which the environmental namespace has a maximum size deteπnined on initialization ofthe operating system program, the environmental namespace update step providing that the environmental namespace has a size no larger than said maximum size when the environmental namespace is updated. 20 A method as defined in claim 19 in which the environmental namespace further includes at least one spare entry, the new entry generation step using the spare entry's space when generating said new entry 21 An method of operating a computer system to update an environmental namespace used in connection with a computer system for processing at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the computer system comprising an environmental namespace comprising a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information comprising an update namespace parameter name and associated update namespace parameter value which defines an operating environment for the operating system program under which at least one applications program is to be run, the method comprising the steps of A. searching through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, B. in response to the search element locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, using the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry; and C. in response to the search dement not locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, using the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value. 22. A method as defined in claim 21 in which the environmental namespace update information is provided by an operator. 23. A method as defined in claim 21 in which the environmental namespace has a maximum size determined on initialization of the operating system program, the environmental namespace update step providing that the environmental namespace has a size no larger than said maximum size. 24. A method as defined in 23 in which the environmental namespace further includes at least one spare entry, the new entry generation step using the spare entry's space when generating said new entry. 25. A computer program product comprising a computer system usable medium having computer system readable code embodied therein for causing a computer system to process at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the computer program product comprising: A. computer readable program code devices configured to cause the computer system to establish an environmental namespace which contains environmental namespace information which defines an operating environment for the operating system program under which at least one applications program is to be run, the operating system program, during initialization of at least one applications program, using the environmental namespace in establishing an applications program processing area for the applications program being initialized; and B. computer readable program code devices configured to cause the computer system to update the environmental namespace information in response to environmental namespace update information, so that, if an applications program is initialized after the update, the operating system program after modification uses the environmental namespace as updated in establishing at least one applications program processing area. 26. A computer program product as defined in claim 25 in which the environmental namespace update information is provided by an operator. 27. A computer program product as defined in claim 25 in which the operating system program, in enabling the computer system to use the environmental namespace in establishing an applications program processing area for an applications program, enables the computer system to replicate the environmental namespace in the applications program processing area. 28. A computer program product as defined in claim 27 in which the operating system program enables the computer system to replicate the environmental namespace in each applications program processing area established thereby. 29. A computer program product as defined in claim 25 in which the operating system program enables the computer system to use the environmental namespace in establishing an applications program processing area for the applications program initialized thereby 30. A computer program produα as defined in claim 25 in which environmental namespace comprises a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information includes an update namespace parameter name and associated update namespace parameter value, the computer readable program code devices configured to cause the computer system to update the environmental namespace information comprising A computer readable program code devices configured to cause the computer system to search through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, B. computer readable program code devices configured to cause the computer system to, in response to the search element locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, use the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry, and C computer readable program code devices configured to cause the computer system to, in response to the search element not locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, use the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value 31. A computer program product as defined in claim 30 in which the environmental namespace has a maximum size determined on initialization of the operating system program, computer readable program code devices configured to cause the computer system to update the environmental namespace information, when enabling the computer system to update the environmental namespace, providing that the environmental namespace has a size no larger than said maximum size. 32. A computer program product as defined in claim 31 in which the environmental namespace further includes at least one spare entry, the computer readable program code devices configured to cause the computer system to generate a new entry enabling the computer system to use the spare entry's space when generating said new entry. 33. A computer program produα for use in connection with a computer system for processing at least one applications program under control of an operating system program, the operating system program providing an applications program processing area for at least one applications program processed by the computer system, the computer system comprising an environmental namespace comprising a plurality of namespace parameter entries each comprising a namespace parameter name and associated namespace parameter value, and the update information comprising an update namespace parameter name and associated update namespace parameter value which defines an operating environment for the operating system program under which at least one applications program is to be run, the computer program product comprising computer readable program code devices configured to cause the computer system to update the environmental namespace information comprising: A computer readable program code devices configured to cause the computer system to search through the namespace parameter entries to locate a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, B computer readable program code devices configured to cause the computer system to, in response to the search element locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, use the update namespace parameter value to update the namespace parameter value associated with the located namespace parameter entry, and C computer readable program code devices configured to cause the computer system to, in response to the search element not locating a namespace parameter entry whose namespace parameter name coπesponds to the update namespace parameter name, use the update namespace parameter name and associated update namespace parameter value to generate a new entry having a namespace parameter name and associated namespace parameter value coπesponding to the update namespace parameter name and associated update namespace parameter value 34 A computer program product as defined in claim 33 in which the environmental namespace update information is provided by an operator 35 A computer program product as defined in claim 33 in which the environmental namespace has a maximum size determined on initialization of the operating system program, computer readable program code devices configured to cause the computer system to update the environmental namespace infoimation, when enabling the computer system to update the environmental namespace, providing that the environmental namespace has a size no larger than said maximum size 36. A computer program product as defined in claim 35 in which the environmental namespace further includes at least one spare entry, the computer readable program code devices configured to cause the computer system to generate a new entry enabling the computer system to use the spare entry's space when generating said new entry.

Inventors: CARNEY MICHAEL W, CARNEY, MICHAEL, W.
Applicants: SUN MICROSYSTEMS INC, SUN MICROSYSTEMS, INC.
Application year: 1996
Main classification: G06F15
IPC codes: G06F9