On-Line Software Version Change Using State. Transfer Between Processes. Deepak Gupta. Pankaj Jalote. Department of Computer Science and Engineering

Size: px
Start display at page:

Download "On-Line Software Version Change Using State. Transfer Between Processes. Deepak Gupta. Pankaj Jalote. Department of Computer Science and Engineering"

Transcription

1 On-Line Software Version Change Using State Transfer Between Processes Deepak Gupta Pankaj Jalote Department of Computer Science and Engineering Indian Institute of Technology Kanpur ; India Abstract The usual way of installing a new version of a software is to shut down the running program and then installing the new version. This necessitates a sometimes unacceptable delay during which service is denied to the users of the software. An on-line software replacement system replaces parts of the software while it is in execution, thus eliminating the shutdown. In this paper, we describe a system for on-line software version change for software written in the C language. When the change is initiated by the user, the system instantiates a new process with the new version of the software, transfers state from the old process to the new one at an appropriate time, and transfers the control to the new process. The user sees a minimal delay in this switchover. Keywords: Software enhancement, New version installation, Process state, On-line change, Continuously operating software. Introduction It is a well known fact in software engineering that programs undergo changes during their lifetime. These changes may be for bug correction, eciency improvement or functional enhancement. The change is usually eected by stopping the currently running program and installing the new version. This necessarily implies a denial of service to the users of the software while the switchover is being made. In critical applications, this delay is not acceptable. For such systems it is desirable to have an on-line software modication system which eliminates the system shutdown for installing a new version of the software, thus allowing continuous service to the users of the software.

2 This problem is dierent from the problem of conguration control [1] and version control [2], which are essentially means to manage the changes made during the development of software. The goal of these techniques is to prevent uncontrolled changes and extreme proliferation of program versions. On the other hand, on-line replacement deals with the problem of installing new software version after the development is complete. There are systems that allow exible interconnection of software components to form the complete system [3, 4, 5]. Though such systems allow exible interconnection of components, they frequently require interconnections to be specied before execution and do not usually permit changes to modules while the software is executing. Some systems allow the conguration of a distributed program to be changed dynamically by reassigning processes or modules to dierent nodes and by adding and deleting links, processes etc. dynamically[6, 7, 8, 9, 10]. A few approaches have been described for on-line software version change [11, 12, 13, 14]. The system described in reference [11] is restricted to dynamically changing the implementation of an abstract data type. The data representation within these data types is changed by appropriate conversion routines to suit a new code version, on demand. The DAS operating system [12] has the capability to modify procedures of a running program if the parameters and the return value of the procedures to be changed do not change across versions. DY- MOS [13] is a dynamic modication system comprising of a source code manager, an editor, a compiler and a run-time system to support on-line change. It requires a complicated locking protocol for every procedure invocation regardless of whether an update is being performed or not. PODUS [14, 15] is a dynamic updating system which has been shown to be scalable to the distributed case [16]. Most of these systems use indirect addressing tables to link the dierent modules. These tables are dynamically changed if a module has to be replaced by a new version. The changing of the table is done in a manner that it does not cause any inconsistencies. The major drawback of this approach is that the mechanisms used for dynamic updating are complicated and require new compilers and linkers to be written. In this paper, we describe a new approach for on-line software replacement and provide a theoretical framework for on-line modication of programs. We also describe a prototype implementation of our approach. Our basic approach to dynamic program version change is as follows. When a new version of the software is to be installed, a new process is created by the system with the new software. When none of the functions which have changed across 2

3 versions is on the run-time stack, the system transfers the state of the old process (running the old software) to the new process (running the new software) and kills the old process. The user sees no discontinuity in the service of the software and only a marginal time overhead is imposed by the system. The system has currently been implemented on a Sun 3/60 and has been designed for C programs. However, it can easily be extended for other procedural languages and can be ported to other systems running Unix. The major advantage of our approach is that it lends itself to a very simple and ecient implementation and no special compiler or linker is required. The current implementation is just about 1650 lines of C code. Valid and Complete Changes Clearly, arbitrary changes to the software cannot be allowed if we want to transfer state information from the old process to the new one. For example, on-line software replacement may not be feasible if the new version of the software is an entirely dierent program performing altogether dierent computations. In this section we study the requirements that must be satised if the change is to be installed on-line. Let the program consist of a set of functions F 1 ; : : :; F n : For explaining the underlying ideas and restrictions needed, we assume that during change no new functions are added and only existing functions are modied. Denition 1 A change to is dened as the set of ordered pairs of functions of that are to be changed and their new versions. Thus, def = f(f i ; F 0 ) j F i i 2 ; F 0 is the new version of F i i g Denition 2 The new version of under the change is dened as def = (? A) [ B where, and A = ff i j (F i ; F 0 i ) 2 g B = ff 0 j (F i i ; Fi) 0 2 g Let and be specied as P fg Q and P 0 f g Q 0 respectively, where Q (Q 0 ) is the desired post-condition of ( ) and P (P 0 ) is its required pre-condition. An on-line change 3

4 made to at time t(t > 0) is conceptually equivalent to the following sequence of steps. The execution of the program is started with the pre-condition P true. At time t, the execution is stopped and the program code is replaced by the code of (the state of the process executing the program remains the same). Then the execution is resumed from the existing state (but with new code). Suppose the execution of the program is started from an initial state satisfying I, such that I ) P, and I ) P 0. That is, from the initial state, either or could be successfully executed. An on-line replacement is considered valid if the nal state produced by the system is either the state that would be produced by executing completely, or the state that would be produced by executing completely. We now formally dene a valid change. Denition 3 An on-line change made to at some time t is said to be valid if either the post-condition Q 0 of or the post-condition Q of is true when the program terminates. Whether a change is valid or not depends on the nature of the change (i.e. what has been changed), and the time when the change is installed. While the former restricts the changes allowed to a program, the latter restricts when the transfer of state from the old process to the new process can occur. Since, a change in which Q holds on termination is a special case included in the denition for the sake of completeness (a change may be installed towards the very end of execution, and therefore may not have any eect on the nal system state), from now on we will focus on the change due to which Q 0 holds on termination. Since a change in one function without a corresponding change in some related functions may take the system to a state not satisfying Q 0, the change of a function might require a corresponding change in another function. In other words, the set of functions to be changed must be \complete". We now dene the notion of completeness of change and then relate it to the validity of an on-line change. Let Q i (Q 0 ) represent the post condition of the function i F i (F 0), and P i i(p 0 ) represent the weakest precondition [17] needed for the function to satisfy i the postcondition after execution. Let (F i ) denote the set of functions that may call the function F i in the program, i.e. (F i ) = ff j 2 j F j may call F i g Denition 4 A change to is said to be complete if the following two conditions hold for all (F i ; F 0 i ) 2 and for every F j 2 (F i ) such that F j has not changed across versions i.e. there is not a pair of the form (F j ; F 0 j ) in : 4

5 1. Let S be the post-condition that the function F j expects F i to satisfy. Then Q 0 i ) S. 2. Let R be the pre-condition with which F j calls F i. Then R ) P 0 i. The rst condition states that the functionality of the new version of a function must be a superset of what a caller expects. If this is not true, then the change is not transparent to the caller which must consequently be modied. The second condition requires that the new version should be able to perform its function under the conditions in which a caller calls the old version. If this is not true, then the caller must know about this and will have to be modied to call it under the new conditions. Let us now consider the second aspect of a valid change, namely the timing of the change. If is complete, then if the change is installed at a time when no function in is executing, the execution will eventually terminate in Q 0 (or Q), since the rest of the functions are unchanged. We now state a sucient condition to ensure that an on-line change is valid. Let rt (t) denote the set of procedures of that are on the run time stack of at time t. Proposition An on-line change made to at a time t is valid if : 1. is a complete change for. 2. 8(F i ; F 0 i ) 2 F i 62 rt (t): In this paper, we do not attempt a formal proof of the above proposition but its truth can be argued as follows. The second condition ensures that the functions in progress at time t are unchanged across versions. Any changed function called now will be called under the conditions that its old version would expect. Since this condition implies the pre-condition of the new version, it will work correctly and the condition that will hold after it returns will be stronger than the one that would have held had the change not been made. This will ensure that the future executions of any changed (or unchanged) functions will also work correctly. Note that the above conditions imply that the main function of the program can never be changed since it will always be on the run time stack during the execution of the program. However, in a well-structured program, most of the work is done by low level functions, and it will usually not be required to change the main function. So far, we have assumed that the set of functions remains the same for the two versions of the program but the analysis can readily be extended to deletion and addition of functions. 5

6 This can be done by adding dummy functions. In the case where new functions are added in the second version, dummy (empty) functions are added to the rst version. In the case where functions are deleted, dummy functions are added to the second version. Note that these dummy functions are needed only to specify valid and complete changes in our framework. As we will see, they are not needed in the implementation. If a function F has been added, then its rst version (the dummy) can never be on the run-time stack at any time and it also has no callers. Thus including or not including this function in the set of changes makes no dierence to either the validity or the completeness of the change. If a function F has been deleted, all its callers have to be modied and hence included in the set of changed functions. Clearly, F can not be on the run-time stack if none of its callers is. Again this implies that the completeness of the change is not aected by including or not including F in the set of changes. System Design Our approach to on-line version change is dierent from the traditional one of dynamic linking. The basic idea is to transfer state at an appropriate time, from a process running the old version of the software to a process running its new version. The user is responsible for developing, compiling, linking, and debugging both the versions of the program. They must also be linked with a run-time library supplied with the system. Development of the new version is assumed to be done o-line. That is, it does not form a part of the on-line replacement system. As discussed in the previous section, the set of functions being changed must be complete for the change to be valid. Since the system can not interpret the semantics of programs, the checks for completeness cannot be performed by the system. We assume that the completeness and correctness of the change has been veried by the user. However, the system does make sure that the change is installed at the right time such that the on-line change is valid. The major modules of the system are shown in gure 1. The system presents a modication shell to the user. This shell accepts some commands from the user and executes them. All commands related to on-line replacement go through this shell. The commands include those for running a program, replacing it with a new version etc. The list of the commands along with a summary of their functions is given in gure 2. The run module contains routines for running a user program and the replace module 6

7 Run Modication Shell J JJ J JJ Symbol Table J * HHY H JJ H H H H J H H JJ H H Process Handling??????? Run-time Library - Ordinary call - Interprocess call using ptrace Figure 1: Major Modules of the system 7

8 Command Function cd dir Change working directory to \dir". help Print this message. kill Kill the currently running process. quit Exit the modication shell. re new-prog routines [init] Replace the currently running program with \new-prog", functions to be changed specied in le \routines" and \init" as the initialization routine. run prog [arg1...] Run program \prog". tty [tty-name] Set I/O terminal to \tty-name".! cmd Shell escape. Figure 2: Commands of the Modication Shell contains routines to replace the currently running program with a new version. The executable le generated by the linker contains symbol table information for the program. The symbol table handling module contains routines to read this information from the le and store it in the form of an internal table. It also contains routines to search the symbol table etc. The symbol table of the program is required to nd the starting addresses of routines. These addresses are required to check if the stack contains any routine to be changed. These are also required later during actual state transfer so that the program counter and the return addresses on the stack can be mapped to their new values. The run module as well as the replace module create new processes. These processes run as child processes of the modication shell, and are managed by the process handling module. The process handling module controls the two processes by means of the ptrace system call [18]. The ptrace call allows a parent process to inspect or modify the address space and machine registers of its child. A running child process can be stopped by sending it a signal. The parent can resume the stopped child at any address. This mechanism is used to inspect the state of the process running the rst version to determine if state transfer can be done consistently and for actually performing the state transfer. It is also used to make a child process call some run-time library routine. To transfer state, the process running the rst version is made to call a library routine 1 which stores the limits of data and stack addresses in variables whose names are known to the replacement system. This is necessary because the user program may dynamically 1 This routine is linked with the user program and its address is obtained from the symbol table. 8

9 alter these limits. The system reads these values and writes them onto the corresponding variables of the process running the new version. The new process is then made to call a library routine which expands the data and stack space to the limits specied by these values. The replace module then copies the data and stack of the rst process onto the second. The machine registers are copied next. In the case of the program counter, a mapping needs to be made since the starting address of the currently executing routine might have changed. This is done by rst nding which routine is currently executing and what is the oset of the currently executing instruction from the starting address of this routine. To do this, the value of the program counter is compared with the addresses of the various routines as given by the symbol table which is kept sorted on the address. The new starting address of the routine is then found out from the symbol table for the new version of the program and this is added to the oset to get the new value for the program counter. A similar procedure is carried out for all the return addresses on the stack. After the state transfer is over, the old process is killed and the new one is continued. Implementation The system has been implemented on a Sun 3/60 workstation running SunOS. This section describes some of the implementation issues. Maintaining Consistency of Pointers When data is copied from the old to the new version, it is necessary to preserve the consistency of pointers. Our design ensures this in a very simple way. On MC68020 and other architectures using segment based addressing, the rst virtual data address of a process is always on a segment boundary after the text. We assume that the text in the two versions occupies the same number of segments 2. The shell checks if this condition holds and gives an error message if it does not. We also assume that no extra global or static variables have been added in the new version 3. Under these two assumptions, except for addresses of local variables of changed functions, the address of any data object remains invariant across the two versions. Since the change is installed at a time when no changed functions are on the stack, all pointers into data point at the right places after the change. Addresses of the 2 This is a reasonable assumption since the segment size is typically quite large (2MB in MC68020). 3 The system does provide a way to add new global data in an indirect manner. This is discussed later. 9

10 various routines may, however, change across versions and our system does not guarantee the consistency of pointers into text. Deciding when to Transfer State The criteria for deciding when to transfer state is based on the proposition given earlier. We assume that the change specied by the user is complete and if not, the user is willing to accept partially consistent results. For valid on-line replacement, the system has to ensure that the state is transferred at a time when none of the routines are on the stack. To check if state can be transferred at some point in time, the shell unravels the run time stack of the process running the older version of the user program to nd all the return addresses on the stack. These addresses and the value of the program counter are compared with addresses of various routines stored in the symbol table to determine the set of routines which are on the run-time stack. Immediately after the new process has been created and its symbol table built, the system rst checks if state transfer is possible. If state transfer is not possible at the time of the rst check, then the shell nds the lowermost frame on the stack which corresponds to a routine to be changed. The return address from this frame is modied to the address of an illegal instruction which is a part of the library linked with the user program. The original return address is saved in a variable. The user process is then continued. When the last routine on the stack which is to be changed returns, the process incurs an illegal instruction trap and the shell which has been waiting for this event to occur is notied. At this point in time, the stack is guaranteed to contain no routines which are to be changed. State transfer takes place at this time. Note that if a program receives an illegal instruction trap due to some other reason, state transfer gets initiated at a wrong instance in time. However, for programs compiled by a correct compiler, this can never happen. Handling Open Files When the state transfer takes place, the user program will typically have some les open for input and output. The same les must be opened for the process running the second version at the same osets for le I/O to work correctly. The shell process has no means of knowing which les a child process has opened. The run-time library of the system contains special versions of the open and close routines which do some book keeping also along with their normal functions. These versions have to be linked with the user program instead of the 10

11 normal C library ones. The special version of the open routine adds an entry consisting of le name and mode of opening (read, write, append etc.) in an array which is indexed by the le descriptors. At the time of state transfer, before copying the data of the old to the new process, the shell makes the old process execute a library routine which stores the current le osets of all open les in their respective entries in this array. When the data space is copied, this array also gets copied to the process running the new version. The shell then makes the new process call a library routine which opens les whose names are in this array with the specied opening modes and sets the current le osets to their respective values. The order of opening the les is such that the le descriptors are preserved. This ensures correct le I/O after the modication has been done. Handling Changes in Return Value and Parameter Format Frequently in programs, the parameter format and the type of the return value of a function also have to be changed. For example, consider a sort routine which sorts integers and which is required to be changed to a polymorphic sort routine so that other types of data can now be sorted. Assume further that a routine f called sort in the old version of the program. Now the polymorphic sort routine expects more parameters than f provides it. There are two possible ways to achieve modication without loss of consistency in such a scenario. One way is to simply write a new version of f which calls sort with the parameters that its new version expects and inform the shell that f has also changed across versions. The other way to do this is to write an interprocedure[14] called sort which is called with the old parameter format, maps them to the new format and then calls the polymorphic sort routine 4. Writing an interprocedure causes an extra overhead each time it is called. But the shell will have to wait for more time before state can be transferred, if f is modied. Further, if f represents the main loop of the program, then it will get o the run time stack only near the completion of execution of the program, thereby making on-line modication meaningless. It is therefore left to the user to decide which scheme he wants to use in case either the parameter or the return value format of a procedure is to be changed. 4 This routine must not be named sort. 11

12 Initialization Routine The programmer can provide an initialization routine in the new version of the program which will be called by the system at the time of the change. This routine can be used for data restructuring. For example, consider a program having functions which implement a stack using an array. If the new versions of these routines implement a stack using a linked list, then at the time of change, the stack must be \restructured" i.e. a linked list containing the values currently in the stack must be built. This can be done by the initialization routine. The initialization routine can also be used for other purposes. For example, many programs use an array containing pointers to functions and the array is unchanged during the execution of the program. In such a situation, the initialization routine can contain code to reinitialize these pointers since the system does not support automatic mapping of pointers to functions. Adding and Deleting Functions The capability to add new functions in a new version of a program is important for functional enhancement of the program. Deleting unused functions may be necessary because of space considerations. In our system no restrictions are imposed on adding and deleting functions. Adding and deleting functions is treated as an integral part of program modication, and no special actions are needed for this purpose. Furthermore, no dummy versions of functions being added or deleted are required in either version of the program. If a function is added or deleted, it need not appear in the change specication le as explained in an earlier section. However, if a function is deleted, all its callers obviously have to be modied and hence must be included in the change specication le. Similarly, if a new function is added, all the functions which call it in the new version have to be modied and included in the change specication. Adding and Deleting Global Data As explained earlier, any change in global variables of the program may destroy the consistency of pointers (local variables pose no such problems and can be added and deleted freely.) But new versions may require new data structures which may also need to be initialized with state information acquired so far. Our system provides the exibility to add new global data, though in an indirect manner. To add new data, the original program must 12

13 declare some extra pointer variables which are not used in the rst version. The initialization routine must have code which allocates space using malloc or calloc, initializes this space and places a pointer to it in one of these pointer variables which are unused in the rst version of the program. Since the initialization routine is called by the system after the data has been copied to the new process, it can use the values of other global variables to initialize the space allocated. The area can then be accessed in the new version through the pointer. The main drawback of this scheme is that it requires the programmer to declare some extra pointer variables in the rst version of the program so that new data can be added in future versions. Furthermore, when variables are added in the new version, they can not be given meaningful names. Though not very elegant, this scheme will suce for changes that require new data sparingly. Global data deletion is not allowed in our system, as it will destroy the consistency of pointers and other addresses. So, any data that becomes redundant in the new version still must be kept in the new version. Note that this requires careful handling of string constants, as the current C compilers typically treat string constants as global data for the purposes of memory allocation (i.e. they are assigned memory in the data segment of the process, rather than on the stack). If string constants within a function are treated as local variables (as, for example, is done in Pascal), this problem will cease to exist. For the existing C compilers, utility programs can easily be written to check if deletion of functions has inadvertently deleted any string constants or not. Another Approach to Adding Global Data Another scheme for adding data, which is supported in our system and which addresses some of the problems of the above approach, is by declaring an array which is unused in the rst version. All new variables in the second version are \assigned" addresses overlapping with the address range of this unused array, provided the total memory needed for the new variables is less than the size of the array. This scheme has the advantage that new variables can be accessed directly rather than through a pointer, as is done in the previous approach. Also, new variables can be given meaningful names. This scheme requires a translator to generate code for the new variables, to be linked with the second version, that \assigns" memory to variables from this \reserved" area. A translator for this purpose, though not yet implemented, can easily be written. 13

14 Other Restrictions The system imposes some restrictions on user programs. The rst restriction is that the change being made must be complete. In addition, the system imposes restrictions on the use of system calls by the user program. This is because besides the data and stack, a process has some other state information also which is kept in the kernel. Since a user-level implementation such as ours can not modify this information, the user program is prohibited from making system calls which modify such information. Most of these calls can be allowed if special versions for the system calls are written which store this information in some user variables before making the system call. The value of these variables will be copied to the new process at the time of state transfer. The new process can then be made to call a library routine which makes appropriate system calls to modify the kernel information in the same way as the old process. At present, this has been done only for read, write, open and close system calls as explained in an earlier section. This approach will not work in certain cases. For example, if the user program creates a child process and is then replaced by a new version, the new process running the second version will bear no relationship to the child process. However, these restriction can easily be overcome in a kernel implementation of the system. Instead of copying state from one process to another, code of a process itself can be modied in such an implementation and the replace operation can be implemented as a system call. An Example Client-server type of interaction is commonly used in computer systems. In this interaction model, there is a server process which performs certain tasks on request from the clients. The server is typically a non-terminating process while the clients run for short durations. In a client-server system, installing a new version of the server in the traditional manner will imply denial of service to all the clients for the duration of the installation. This can be avoided by on-line version change. Let us consider a simple print server that, on getting a command from the client, formats a le for printing on a particular type of printer and then prints it on the printer. We will use this example to illustrate how a new version of the server can be installed on-line. For simplicity, in the example the client-server communication is done through a named pipe [18] 14

15 char *extra1, *extra2, *extra3 ; /* Some extra pointer variables being declared for future use */ main() f char infile[maxfilenamelen] ; char outfile[maxfilenamelen] ; FILE *fp ; g Create command pipe fp ; for (;;) f read command(fp,infile,outfile) ; format(infile, outfile) ; print(outfile) ; g read command(fp,infile,outfile) FILE *fp ; char *infile ; char *outfile ; f char cmd[5] ; g fscanf(fp,"%s %s", cmd, infile) ; strcpy(outfile,"/tmp/server") ; Figure 3: Print server main loop (in an actual implementation, it is often done through Unix Sockets). In the rst version of the program, the server accepts only one command from the client on the pipe which is of the form: fp lename. On receiving the command the server formats the le lename, keeping the formatted output in a temporary le, and then prints this temporary le. If the executable code of the server program is in the le server, then the server has to be started through the modication shell, by giving the command run server [params]. The overall structure of parts of the server is given in gure 3. Note that variables extra1, extra2, extra3 have been declared, though not used in the server. These are to support addition of global data, if needed. In the second version, the client can give the server another command of the form: fpo 15

16 read command(fp,infile,outfile) FILE *fp ; char *infile ; char *outfile ; f char cmd[5] ; g fscanf(fp,"%s %s", cmd, infile) ; if (!strcmp(extra1,cmd)) fscanf(fp,extra2,outfile) ; else sprintf(outfile,"/tmp/server") ; Figure 4: Version 2 of read command function inle outle. On receiving this command the server formats and prints inle and also leaves a copy of the formatted le in outle. Clearly, for this version of the server the routine read command has to be modied. The formatting and printing routines will remain the same. The new version of the read command function is given in gure 4. In this new version, if fpo command is given, the read command function assigns to outle, the name of the le specied in the command, otherwise the temporary le in the /tmp area is assigned, as in the rst version. The user (the person who will install the new version) has to specify the change conguration le and the initialization routine for doing an on-line version change. Since only the read command function has been modied, the change conguration le just contains: read command: The initialization routine is necessary due to the use of extra variables. The initialization routine init change initializes the value of these variables, and is shown in gure 5. The use of this routine by the system is explained earlier. To transfer control properly, the init change routine calls a system provided cause trap function before exiting. If the executable version of the new server program is kept in the le server.new and the, the change conguration le is named change cong, then the new version is installed by giving the command re server.new change cong init change: 16

17 init change() f extra1 = malloc(4*sizeof(char)) ; extra2 = malloc(3*sizeof(char)) ; extra1[0] = 'f' ; extra1[1] = 'p' ; extra1[2] = 'o' ; extra1[3] = '\0' ; extra2[0] = '%' ; extra2[1] = 's' ; extra2[2] = '\0' ; cause trap() ; g System Performance Figure 5: Change initialization routine for print server We have conducted some experiments to determine the overhead incurred due to on-line replacement. The overhead can be divided into two parts - one is the overhead during normal execution when some extra activities are performed to help the replacement when required. The other is the overhead that is incurred during replacement. In our experiments, we found that the overhead during normal execution is minimal. A program executed through our modication shell (but with no modication done) takes approximately the same time as it does if it were executed through the Unix Shell. This is to be expected since minimal bookkeeping activities are being performed during normal execution. The overhead during the actual replacement comes largely due to the transfer of state information, changing the addresses, and searching the stack. All of these depend on the program and the size of the stack. In our experiments we found the overhead due to these to be very small. For the example given in the previous section, where the function read command was replaced with a new version, we found that on a moderately loaded Sun 3/60 system, the change takes about 200 ms (CPU time). To test the eect of on-line version change on the performance of a running software, another experiment was conducted along the lines of the experiment described in reference [14]. The server code was modied to send a message to a performance monitoring program after processing each request received. The performance monitoring program records the 17

18 number of messages received every second. The server was then run through the modication shell and heavily loaded by running a client which continuously sends it requests. The change to the second version of the server was then made at a random time and the performance of the system during the change was observed. The following was observed. Rate of performing requests before the change Duration of change Rate of performing requests during the 2 second interval containing the change 3.83 per second 1.04 seconds 1.5 per second The change duration of 1.04 seconds was spread over two one second intervals. During these 2 seconds, the number of requests processed was found to be 1 and 2 respectively. This clearly shows that the installation of the change did not cause a signicant deterioration in the performance of the server. The rate of performing requests after the change, may in general, increase or decrease and will depend on the dierence between the old and the new versions. In this case, however, it remained the same, as there was only a minor dierence between the two versions. Conclusion It is now known that a software undergoes many changes during its life time. Changes take place to remove latent errors that are detected during operation, or to enhance the system. In either case, a software in operation has to be replaced by a new version. The most common approach to performing this version change is to shut down the system and then install the new change. This necessitates a sometimes unacceptable delay during which service is denied to the users of the software. In this paper we have considered the problem of on-line version change, in which the version is changed while the software is executing, without shutting down the system. We have dened what it means for on-line replacement to be valid and have developed conditions that must be satised by the change for performing a valid on-line replacement. We have also described a system that allows version change for C programs. The approach followed by our system is to create a new process with the new version. When the conditions 18

19 for valid replacement are met, the state is transferred from the process running the old version to the process running the new version, and then the process for the old version is killed. The system can handle a wide variety of C programs, though it does impose some restrictions. The overhead of performing this replacement is very small. Though currently implemented on a single node system, our system can easily be extended for on-line modication of a distributed program communicating via the remote procedure call (RPC) [19, 20] mechanism. RPC supports a client-server type of interaction (similar to our chosen example). In a RPC implementation, typically the client and the server are two independent processes executing on dierent machines. If only one of them needs to be changed, then the change is like the change in a single process system, and nothing extra needs to be done. If both the client and the server are to be changed, then the server must be modied before the client so that a new version of the client does not send any requests to the old version of the server, which may be unable to accept requests from new clients. To enforce this, the client update must wait till the server update is nished. This information can be given by the updating system running on the server site to the updating system running on the client side. To handle the case of an old version of the client calling a newer version of the server, interprocedures can be used, as was done for handling the change in return value and parameter format in the single process case. More work needs to be done to investigate the possibility of making on-line changes to distributed programs using more exible methods of inter-process communication such as message passing. References [1] E. H. Berso. \Elements of software conguration management". IEEE Trans. on Software Engg., 10(1):79{87, [2] W. F. Tichy. \Design, implementation and evaluation of a revision control system". In Proc. 6th Int. Conf. Software Engg., pages 58{67, Tokyo, [3] J. Magee, J. Kramer, and M. Sloman. \Constructing distributed systems in Conic". IEEE Trans. on Software Engg., 15:663{675, June [4] D. Perry. \The Inscape environment". In Proc. 11th Int. Conf. on Software Engg., pages 2{12,

20 [5] J. Purtillo. \The polylith software bus". Tech. report no. 2469, Univ. of Maryland, Also to appear in ACM Transactions on Programming Languages and Systems. [6] C. Hofmeister, E. White, and J. Purtillo. \Surgeon: a package for dynamically recon- gurable distributed applications". In Proc. IEEE International Conference on Congurable Distributed Systems, March [7] J. Purtillo and C. Hofmeister. \Dynamic reconguration of distributed programs". In IEEE International Conference on Distributed Computing Systems, pages 560{571, May [8] J. Kramer and J. Magee. \Dynamic conguration for distributed systems". IEEE Trans. on Software Engg., SE-11(4):424{436, April [9] J. Kramer and J. Magee. \The evolving philosophers problem: dynamic change management". IEEE Trans. on Software Engg., 16(11):1293{1306, November [10] M. R. Barbacci, D. L. Doubleday, and C. B. Weinstock. \Application-level programming". In IEEE International Conference on Distributed Computing Systems, pages 458{465, [11] R. S. Fabry. \How to design systems in which modules can be changed on the y". In Proc. 2nd Int. Conf. Software Engg., [12] H. Goullon, R. Isle, and K. Lohr. \Dynamic restructuring in an experimental operating system". IEEE Trans. Software Engg., SE-4(4), July [13] I. Lee. \DYMOS: a dynamic modication system". PhD thesis, University of Wisconsin, [14] M. E. Segal and O. Frieder. \Dynamic program updating: a software maintenance technique for minimizing software downtime". Software Maintenance: Research and Practice, 1(1):59{79, September [15] O. Frieder and M. E. Segal. \On dynamically updating a computer program: from concept to prototype". J. System Software, 14(2):111{128, September

21 [16] M. E. Segal and O. Frieder. \Dynamically updating distributed software: supporting change in uncertain and mistrustful environments". In Proc. IEEE Conference on Software Maintenance, October [17] E. W. Dijkstra. \Guarded commands, non-determinism and formal derivation of programs". Communications of the ACM, 18(8):453{457, [18] Sun Microsystems Inc., Mountain View, CA. \Sun OS reference manual", [19] A. Birell and B. Nelson. \Implementing remote procedure calls". ACM Trans. on Computer Systems, 2(1), February [20] A. D. Birell. \Secure communication using remote procedure calls. ACM Trans. on Computer Systems, 3(1), February

Consistent Logical Checkpointing. Nitin H. Vaidya. Texas A&M University. Phone: Fax:

Consistent Logical Checkpointing. Nitin H. Vaidya. Texas A&M University. Phone: Fax: Consistent Logical Checkpointing Nitin H. Vaidya Department of Computer Science Texas A&M University College Station, TX 77843-3112 hone: 409-845-0512 Fax: 409-847-8578 E-mail: vaidya@cs.tamu.edu Technical

More information

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano

THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL. Jun Sun, Yasushi Shinjo and Kozo Itano THE IMPLEMENTATION OF A DISTRIBUTED FILE SYSTEM SUPPORTING THE PARALLEL WORLD MODEL Jun Sun, Yasushi Shinjo and Kozo Itano Institute of Information Sciences and Electronics University of Tsukuba Tsukuba,

More information

CS 6353 Compiler Construction Project Assignments

CS 6353 Compiler Construction Project Assignments CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the

More information

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations

Outline. Computer Science 331. Information Hiding. What This Lecture is About. Data Structures, Abstract Data Types, and Their Implementations Outline Computer Science 331 Data Structures, Abstract Data Types, and Their Implementations Mike Jacobson 1 Overview 2 ADTs as Interfaces Department of Computer Science University of Calgary Lecture #8

More information

Dewayne E. Perry. Abstract. An important ingredient in meeting today's market demands

Dewayne E. Perry. Abstract. An important ingredient in meeting today's market demands Maintaining Consistent, Minimal Congurations Dewayne E. Perry Software Production Research, Bell Laboratories 600 Mountain Avenue, Murray Hill, NJ 07974 USA dep@research.bell-labs.com Abstract. An important

More information

Availability of Coding Based Replication Schemes. Gagan Agrawal. University of Maryland. College Park, MD 20742

Availability of Coding Based Replication Schemes. Gagan Agrawal. University of Maryland. College Park, MD 20742 Availability of Coding Based Replication Schemes Gagan Agrawal Department of Computer Science University of Maryland College Park, MD 20742 Abstract Data is often replicated in distributed systems to improve

More information

RECONFIGURATION OF HIERARCHICAL TUPLE-SPACES: EXPERIMENTS WITH LINDA-POLYLITH. Computer Science Department and Institute. University of Maryland

RECONFIGURATION OF HIERARCHICAL TUPLE-SPACES: EXPERIMENTS WITH LINDA-POLYLITH. Computer Science Department and Institute. University of Maryland RECONFIGURATION OF HIERARCHICAL TUPLE-SPACES: EXPERIMENTS WITH LINDA-POLYLITH Gilberto Matos James Purtilo Computer Science Department and Institute for Advanced Computer Studies University of Maryland

More information

and easily tailor it for use within the multicast system. [9] J. Purtilo, C. Hofmeister. Dynamic Reconguration of Distributed Programs.

and easily tailor it for use within the multicast system. [9] J. Purtilo, C. Hofmeister. Dynamic Reconguration of Distributed Programs. and easily tailor it for use within the multicast system. After expressing an initial application design in terms of MIL specications, the application code and speci- cations may be compiled and executed.

More information

Technische Universitat Munchen. Institut fur Informatik. D Munchen.

Technische Universitat Munchen. Institut fur Informatik. D Munchen. Developing Applications for Multicomputer Systems on Workstation Clusters Georg Stellner, Arndt Bode, Stefan Lamberts and Thomas Ludwig? Technische Universitat Munchen Institut fur Informatik Lehrstuhl

More information

Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines

Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines Zhou B. B., Brent R. P. and Tridgell A. y Computer Sciences Laboratory The Australian National University Canberra,

More information

residual residual program final result

residual residual program final result C-Mix: Making Easily Maintainable C-Programs run FAST The C-Mix Group, DIKU, University of Copenhagen Abstract C-Mix is a tool based on state-of-the-art technology that solves the dilemma of whether to

More information

Run-time Environments. Lecture 13. Prof. Alex Aiken Original Slides (Modified by Prof. Vijay Ganesh) Lecture 13

Run-time Environments. Lecture 13. Prof. Alex Aiken Original Slides (Modified by Prof. Vijay Ganesh) Lecture 13 Run-time Environments Lecture 13 by Prof. Vijay Ganesh) Lecture 13 1 What have we covered so far? We have covered the front-end phases Lexical analysis (Lexer, regular expressions,...) Parsing (CFG, Top-down,

More information

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the

Heap-on-Top Priority Queues. March Abstract. We introduce the heap-on-top (hot) priority queue data structure that combines the Heap-on-Top Priority Queues Boris V. Cherkassky Central Economics and Mathematics Institute Krasikova St. 32 117418, Moscow, Russia cher@cemi.msk.su Andrew V. Goldberg NEC Research Institute 4 Independence

More information

Khoral Research, Inc. Khoros is a powerful, integrated system which allows users to perform a variety

Khoral Research, Inc. Khoros is a powerful, integrated system which allows users to perform a variety Data Parallel Programming with the Khoros Data Services Library Steve Kubica, Thomas Robey, Chris Moorman Khoral Research, Inc. 6200 Indian School Rd. NE Suite 200 Albuquerque, NM 87110 USA E-mail: info@khoral.com

More information

Breakpoints and Halting in Distributed Programs

Breakpoints and Halting in Distributed Programs 1 Breakpoints and Halting in Distributed Programs Barton P. Miller Jong-Deok Choi Computer Sciences Department University of Wisconsin-Madison 1210 W. Dayton Street Madison, Wisconsin 53706 Abstract Interactive

More information

On Checkpoint Latency. Nitin H. Vaidya. In the past, a large number of researchers have analyzed. the checkpointing and rollback recovery scheme

On Checkpoint Latency. Nitin H. Vaidya. In the past, a large number of researchers have analyzed. the checkpointing and rollback recovery scheme On Checkpoint Latency Nitin H. Vaidya Department of Computer Science Texas A&M University College Station, TX 77843-3112 E-mail: vaidya@cs.tamu.edu Web: http://www.cs.tamu.edu/faculty/vaidya/ Abstract

More information

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA A taxonomy of race conditions. D. P. Helmbold, C. E. McDowell UCSC-CRL-94-34 September 28, 1994 Board of Studies in Computer and Information Sciences University of California, Santa Cruz Santa Cruz, CA

More information

3. Process Management in xv6

3. Process Management in xv6 Lecture Notes for CS347: Operating Systems Mythili Vutukuru, Department of Computer Science and Engineering, IIT Bombay 3. Process Management in xv6 We begin understanding xv6 process management by looking

More information

Java Virtual Machine

Java Virtual Machine Evaluation of Java Thread Performance on Two Dierent Multithreaded Kernels Yan Gu B. S. Lee Wentong Cai School of Applied Science Nanyang Technological University Singapore 639798 guyan@cais.ntu.edu.sg,

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 4 Thomas Wies New York University Review Last week Control Structures Selection Loops Adding Invariants Outline Subprograms Calling Sequences Parameter

More information

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group

SAMOS: an Active Object{Oriented Database System. Stella Gatziu, Klaus R. Dittrich. Database Technology Research Group SAMOS: an Active Object{Oriented Database System Stella Gatziu, Klaus R. Dittrich Database Technology Research Group Institut fur Informatik, Universitat Zurich fgatziu, dittrichg@ifi.unizh.ch to appear

More information

Network. Department of Statistics. University of California, Berkeley. January, Abstract

Network. Department of Statistics. University of California, Berkeley. January, Abstract Parallelizing CART Using a Workstation Network Phil Spector Leo Breiman Department of Statistics University of California, Berkeley January, 1995 Abstract The CART (Classication and Regression Trees) program,

More information

(Preliminary Version 2 ) Jai-Hoon Kim Nitin H. Vaidya. Department of Computer Science. Texas A&M University. College Station, TX

(Preliminary Version 2 ) Jai-Hoon Kim Nitin H. Vaidya. Department of Computer Science. Texas A&M University. College Station, TX Towards an Adaptive Distributed Shared Memory (Preliminary Version ) Jai-Hoon Kim Nitin H. Vaidya Department of Computer Science Texas A&M University College Station, TX 77843-3 E-mail: fjhkim,vaidyag@cs.tamu.edu

More information

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t

1 Introduction One of the contributions of Java is in its bytecode verier, which checks type safety of bytecode for JVM (Java Virtual Machine) prior t On a New Method for Dataow Analysis of Java Virtual Machine Subroutines Masami Hagiya Department of Information Science, Graduate School of Science, University of Tokyo hagiyais.s.u-tokyo.ac.jp Abstract

More information

CS 326: Operating Systems. Process Execution. Lecture 5

CS 326: Operating Systems. Process Execution. Lecture 5 CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation

More information

gateways to order processing in electronic commerce. In fact, the generic Web page access can be considered as a special type of CGIs that are built i

gateways to order processing in electronic commerce. In fact, the generic Web page access can be considered as a special type of CGIs that are built i High-Performance Common Gateway Interface Invocation Ganesh Venkitachalam Tzi-cker Chiueh Computer Science Department State University of New York at Stony Brook Stony Brook, NY 11794-4400 fganesh, chiuehg@cs.sunysb.edu

More information

Implementing Sequential Consistency In Cache-Based Systems

Implementing Sequential Consistency In Cache-Based Systems To appear in the Proceedings of the 1990 International Conference on Parallel Processing Implementing Sequential Consistency In Cache-Based Systems Sarita V. Adve Mark D. Hill Computer Sciences Department

More information

Garbage Collection (2) Advanced Operating Systems Lecture 9

Garbage Collection (2) Advanced Operating Systems Lecture 9 Garbage Collection (2) Advanced Operating Systems Lecture 9 Lecture Outline Garbage collection Generational algorithms Incremental algorithms Real-time garbage collection Practical factors 2 Object Lifetimes

More information

Real-Time Scalability of Nested Spin Locks. Hiroaki Takada and Ken Sakamura. Faculty of Science, University of Tokyo

Real-Time Scalability of Nested Spin Locks. Hiroaki Takada and Ken Sakamura. Faculty of Science, University of Tokyo Real-Time Scalability of Nested Spin Locks Hiroaki Takada and Ken Sakamura Department of Information Science, Faculty of Science, University of Tokyo 7-3-1, Hongo, Bunkyo-ku, Tokyo 113, Japan Abstract

More information

APPLICATION OF THE FUZZY MIN-MAX NEURAL NETWORK CLASSIFIER TO PROBLEMS WITH CONTINUOUS AND DISCRETE ATTRIBUTES

APPLICATION OF THE FUZZY MIN-MAX NEURAL NETWORK CLASSIFIER TO PROBLEMS WITH CONTINUOUS AND DISCRETE ATTRIBUTES APPLICATION OF THE FUZZY MIN-MAX NEURAL NETWORK CLASSIFIER TO PROBLEMS WITH CONTINUOUS AND DISCRETE ATTRIBUTES A. Likas, K. Blekas and A. Stafylopatis National Technical University of Athens Department

More information

les are not generally available by NFS or AFS, with a mechanism called \remote system calls". These are discussed in section 4.1. Our general method f

les are not generally available by NFS or AFS, with a mechanism called \remote system calls. These are discussed in section 4.1. Our general method f Checkpoint and Migration of UNIX Processes in the Condor Distributed Processing System Michael Litzkow, Todd Tannenbaum, Jim Basney, and Miron Livny Computer Sciences Department University of Wisconsin-Madison

More information

Compiler and Runtime Support for Programming in Adaptive. Parallel Environments 1. Guy Edjlali, Gagan Agrawal, and Joel Saltz

Compiler and Runtime Support for Programming in Adaptive. Parallel Environments 1. Guy Edjlali, Gagan Agrawal, and Joel Saltz Compiler and Runtime Support for Programming in Adaptive Parallel Environments 1 Guy Edjlali, Gagan Agrawal, Alan Sussman, Jim Humphries, and Joel Saltz UMIACS and Dept. of Computer Science University

More information

Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines

Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines Ecient Implementation of Sorting Algorithms on Asynchronous Distributed-Memory Machines B. B. Zhou, R. P. Brent and A. Tridgell Computer Sciences Laboratory The Australian National University Canberra,

More information

Module 1. Introduction:

Module 1. Introduction: Module 1 Introduction: Operating system is the most fundamental of all the system programs. It is a layer of software on top of the hardware which constitutes the system and manages all parts of the system.

More information

GAS Tutorial - 7. Directives (3)

GAS Tutorial - 7. Directives (3) GAS Tutorial - 7. Directives (3) Young W. Lim 2016-07-13 Thr Young W. Lim GAS Tutorial - 7. Directives (3) 2016-07-13 Thr 1 / 48 Outline 1 Section Related Directivqes Young W. Lim GAS Tutorial - 7. Directives

More information

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract

C. E. McDowell August 25, Baskin Center for. University of California, Santa Cruz. Santa Cruz, CA USA. abstract Unloading Java Classes That Contain Static Fields C. E. McDowell E. A. Baldwin 97-18 August 25, 1997 Baskin Center for Computer Engineering & Information Sciences University of California, Santa Cruz Santa

More information

CS OPERATING SYSTEMS Fall Notes on Virtual Machines

CS OPERATING SYSTEMS Fall Notes on Virtual Machines CS 471 -- OPERATING SYSTEMS Fall 1999 Notes on Virtual Machines P. J. Denning 10/23/98 11/27/98 (revised) 11/1/99 (newly revised) 1/12/01 (more newly revised) Virtual Machine Models for OS Levels A virtual

More information

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process

More information

A.java class A f void f() f... g g - Java - - class file Compiler > B.class network class file A.class Java Virtual Machine Loa

A.java class A f void f() f... g g - Java - - class file Compiler > B.class network class file A.class Java Virtual Machine Loa A Type System for Object Initialization In the Java TM Bytecode Language Stephen N. Freund John C. Mitchell Department of Computer Science Stanford University Stanford, CA 94305-9045 ffreunds, mitchellg@cs.stanford.edu

More information

Course: Operating Systems Instructor: M Umair. M Umair

Course: Operating Systems Instructor: M Umair. M Umair Course: Operating Systems Instructor: M Umair Process The Process A process is a program in execution. A program is a passive entity, such as a file containing a list of instructions stored on disk (often

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Turing Machines CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario, Canada janicki@mcmaster.ca Ryszard Janicki Computability

More information

* What are the different states for a task in an OS?

* What are the different states for a task in an OS? * Kernel, Services, Libraries, Application: define the 4 terms, and their roles. The kernel is a computer program that manages input/output requests from software, and translates them into data processing

More information

CS 6353 Compiler Construction Project Assignments

CS 6353 Compiler Construction Project Assignments CS 6353 Compiler Construction Project Assignments In this project, you need to implement a compiler for a language defined in this handout. The programming language you need to use is C or C++ (and the

More information

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018

CSCE Operating Systems Interrupts, Exceptions, and Signals. Qiang Zeng, Ph.D. Fall 2018 CSCE 311 - Operating Systems Interrupts, Exceptions, and Signals Qiang Zeng, Ph.D. Fall 2018 Previous Class Process state transition Ready, blocked, running Call Stack Execution Context Process switch

More information

SORT INFERENCE \coregular" signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp

SORT INFERENCE \coregular signatures, they derive an algorithm for computing a most general typing for expressions e which is only slightly more comp Haskell Overloading is DEXPTIME{complete Helmut Seidl Fachbereich Informatik Universitat des Saarlandes Postfach 151150 D{66041 Saarbrucken Germany seidl@cs.uni-sb.de Febr., 1994 Keywords: Haskell type

More information

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001 K42 Team modified October 2001 This paper discusses how K42 uses Linux-kernel components to support a wide range of hardware, a full-featured TCP/IP stack and Linux file-systems. An examination of the

More information

under Timing Constraints David Filo David Ku Claudionor N. Coelho, Jr. Giovanni De Micheli

under Timing Constraints David Filo David Ku Claudionor N. Coelho, Jr. Giovanni De Micheli Interface Optimization for Concurrent Systems under Timing Constraints David Filo David Ku Claudionor N. Coelho, Jr. Giovanni De Micheli Abstract The scope of most high-level synthesis eorts to date has

More information

1.Define signal? NOV DEC 2011 MAY JUNE 2011

1.Define signal? NOV DEC 2011 MAY JUNE 2011 SEM/ YEAR : VI / III CS2028 UNIX INTERNALS UNIT IV THE STRUCTURE OF PROCESSES PART A 1.Define signal? NOV DEC 2011 MAY JUNE 2011 A signal is an asynchronous event which is delivered to a process. 2. Define

More information

Implementations of Dijkstra's Algorithm. Based on Multi-Level Buckets. November Abstract

Implementations of Dijkstra's Algorithm. Based on Multi-Level Buckets. November Abstract Implementations of Dijkstra's Algorithm Based on Multi-Level Buckets Andrew V. Goldberg NEC Research Institute 4 Independence Way Princeton, NJ 08540 avg@research.nj.nec.com Craig Silverstein Computer

More information

2 Data Reduction Techniques The granularity of reducible information is one of the main criteria for classifying the reduction techniques. While the t

2 Data Reduction Techniques The granularity of reducible information is one of the main criteria for classifying the reduction techniques. While the t Data Reduction - an Adaptation Technique for Mobile Environments A. Heuer, A. Lubinski Computer Science Dept., University of Rostock, Germany Keywords. Reduction. Mobile Database Systems, Data Abstract.

More information

Kevin Skadron. 18 April Abstract. higher rate of failure requires eective fault-tolerance. Asynchronous consistent checkpointing oers a

Kevin Skadron. 18 April Abstract. higher rate of failure requires eective fault-tolerance. Asynchronous consistent checkpointing oers a Asynchronous Checkpointing for PVM Requires Message-Logging Kevin Skadron 18 April 1994 Abstract Distributed computing using networked workstations oers cost-ecient parallel computing, but the higher rate

More information

director executor user program user program signal, breakpoint function call communication channel client library directing server

director executor user program user program signal, breakpoint function call communication channel client library directing server (appeared in Computing Systems, Vol. 8, 2, pp.107-134, MIT Press, Spring 1995.) The Dynascope Directing Server: Design and Implementation 1 Rok Sosic School of Computing and Information Technology Grith

More information

PROCESS STATES AND TRANSITIONS:

PROCESS STATES AND TRANSITIONS: The kernel contains a process table with an entry that describes the state of every active process in the system. The u area contains additional information that controls the operation of a process. The

More information

CMa simple C Abstract Machine

CMa simple C Abstract Machine CMa simple C Abstract Machine CMa architecture An abstract machine has set of instructions which can be executed in an abstract hardware. The abstract hardware may be seen as a collection of certain data

More information

Transport protocols are of practical. login, le transfer, and remote procedure. calls. will operate on and therefore are generally

Transport protocols are of practical. login, le transfer, and remote procedure. calls. will operate on and therefore are generally Hazard-Free Connection Release Jennifer E. Walter Department of Computer Science Texas A&M University College Station, TX 77843-3112, U.S.A. Jennifer L. Welch Department of Computer Science Texas A&M University

More information

Rowena Cole and Luigi Barone. Department of Computer Science, The University of Western Australia, Western Australia, 6907

Rowena Cole and Luigi Barone. Department of Computer Science, The University of Western Australia, Western Australia, 6907 The Game of Clustering Rowena Cole and Luigi Barone Department of Computer Science, The University of Western Australia, Western Australia, 697 frowena, luigig@cs.uwa.edu.au Abstract Clustering is a technique

More information

1 Recursion. 2 Recursive Algorithms. 2.1 Example: The Dictionary Search Problem. CSci 235 Software Design and Analysis II Introduction to Recursion

1 Recursion. 2 Recursive Algorithms. 2.1 Example: The Dictionary Search Problem. CSci 235 Software Design and Analysis II Introduction to Recursion 1 Recursion Recursion is a powerful tool for solving certain kinds of problems. Recursion breaks a problem into smaller problems that are identical to the original, in such a way that solving the smaller

More information

information is saved on a history stack, and Reverse, which runs back through a previous conservative execution and undoes its eect. We extend Forth's

information is saved on a history stack, and Reverse, which runs back through a previous conservative execution and undoes its eect. We extend Forth's A Virtual Machine Architecture for Constraint Based Programming Bill Stoddart October 25, 2000 Abstract We present a Forth style virtual machine architecture designed to provide for constriant based programming.

More information

Assignment 4. Overview. Prof. Stewart Weiss. CSci 335 Software Design and Analysis III Assignment 4

Assignment 4. Overview. Prof. Stewart Weiss. CSci 335 Software Design and Analysis III Assignment 4 Overview This assignment combines several dierent data abstractions and algorithms that we have covered in class, including priority queues, on-line disjoint set operations, hashing, and sorting. The project

More information

Midterm Exam CPS 210: Operating Systems Spring 2013

Midterm Exam CPS 210: Operating Systems Spring 2013 Your name: Sign for your honor: Midterm Exam CPS 210: Operating Systems Spring 2013 The last page of this exam is a list of terms used in this class, and whose meanings you should know. You may detach

More information

Copyright (C) 1997, 1998 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for

Copyright (C) 1997, 1998 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for Copyright (C) 1997, 1998 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided

More information

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions 1. What are the different parts of UNIX system? i. Programs

More information

Worst-case running time for RANDOMIZED-SELECT

Worst-case running time for RANDOMIZED-SELECT Worst-case running time for RANDOMIZED-SELECT is ), even to nd the minimum The algorithm has a linear expected running time, though, and because it is randomized, no particular input elicits the worst-case

More information

Lecture Notes on Contracts

Lecture Notes on Contracts Lecture Notes on Contracts 15-122: Principles of Imperative Computation Frank Pfenning Lecture 2 August 30, 2012 1 Introduction For an overview the course goals and the mechanics and schedule of the course,

More information

ABCDE. HP Part No Printed in U.S.A U0989

ABCDE. HP Part No Printed in U.S.A U0989 Switch Programing Guide HP 3000 Computer Systems ABCDE HP Part No. 32650-90014 Printed in U.S.A. 19890901 U0989 The information contained in this document is subject to change without notice. HEWLETT-PACKARD

More information

Segmentation. Multiple Segments. Lecture Notes Week 6

Segmentation. Multiple Segments. Lecture Notes Week 6 At this point, we have the concept of virtual memory. The CPU emits virtual memory addresses instead of physical memory addresses. The MMU translates between virtual and physical addresses. Don't forget,

More information

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD

OPERATING SYSTEMS. After A.S.Tanenbaum, Modern Operating Systems, 3rd edition. Uses content with permission from Assoc. Prof. Florin Fortis, PhD OPERATING SYSTEMS #2 After A.S.Tanenbaum, Modern Operating Systems, 3rd edition Uses content with permission from Assoc. Prof. Florin Fortis, PhD INTRODUCTION Operating systems structure OPERATING SYSTEM

More information

. The problem: ynamic ata Warehouse esign Ws are dynamic entities that evolve continuously over time. As time passes, new queries need to be answered

. The problem: ynamic ata Warehouse esign Ws are dynamic entities that evolve continuously over time. As time passes, new queries need to be answered ynamic ata Warehouse esign? imitri Theodoratos Timos Sellis epartment of Electrical and Computer Engineering Computer Science ivision National Technical University of Athens Zographou 57 73, Athens, Greece

More information

Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of C

Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of C Optimum Alphabetic Binary Trees T. C. Hu and J. D. Morgenthaler Department of Computer Science and Engineering, School of Engineering, University of California, San Diego CA 92093{0114, USA Abstract. We

More information

(MCQZ-CS604 Operating Systems)

(MCQZ-CS604 Operating Systems) command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process

More information

Interprocess Communication By: Kaushik Vaghani

Interprocess Communication By: Kaushik Vaghani Interprocess Communication By: Kaushik Vaghani Background Race Condition: A situation where several processes access and manipulate the same data concurrently and the outcome of execution depends on the

More information

Testing Exceptions with Enforcer

Testing Exceptions with Enforcer Testing Exceptions with Enforcer Cyrille Artho February 23, 2010 National Institute of Advanced Industrial Science and Technology (AIST), Research Center for Information Security (RCIS) Abstract Java library

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Lecture 2 Thomas Wies New York University Review Last week Programming Languages Overview Syntax and Semantics Grammars and Regular Expressions High-level

More information

In the International Journal of Parallel Programming, vol.28, no. 1, Enhanced Co-Scheduling: A Software Pipelining Method

In the International Journal of Parallel Programming, vol.28, no. 1, Enhanced Co-Scheduling: A Software Pipelining Method In the International Journal of Parallel Programming, vol.28, no. 1, pages 1{46, Feb. 2000. Enhanced Co-Scheduling: A Software Pipelining Method using Modulo-Scheduled Pipeline Theory R. Govindarajan N.S.S.

More information

Y. Han* B. Narahari** H-A. Choi** University of Kentucky. The George Washington University

Y. Han* B. Narahari** H-A. Choi** University of Kentucky. The George Washington University Mapping a Chain Task to Chained Processors Y. Han* B. Narahari** H-A. Choi** *Department of Computer Science University of Kentucky Lexington, KY 40506 **Department of Electrical Engineering and Computer

More information

V850 Calling Convention

V850 Calling Convention IAR Application Note V850 Calling Convention SUMMARY This application note describes the calling convention used by IAR Systems V850 compiler for C and Embedded C++. The intended audience is developers

More information

Project 3 Due October 21, 2015, 11:59:59pm

Project 3 Due October 21, 2015, 11:59:59pm Project 3 Due October 21, 2015, 11:59:59pm 1 Introduction In this project, you will implement RubeVM, a virtual machine for a simple bytecode language. Later in the semester, you will compile Rube (a simplified

More information

CSC209 Review. Yeah! We made it!

CSC209 Review. Yeah! We made it! CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions

More information

Introduction to Linux

Introduction to Linux Introduction to Linux The command-line interface A command-line interface (CLI) is a type of interface, that is, a way to interact with a computer. Window systems, punched cards or a bunch of dials, buttons

More information

Mon Sep 17, 2007 Lecture 3: Process Management

Mon Sep 17, 2007 Lecture 3: Process Management Mon Sep 17, 2007 Lecture 3: Process Management September 19, 2007 1 Review OS mediates between hardware and user software QUIZ: Q: Name three layers of a computer system where the OS is one of these layers.

More information

CPS221 Lecture: Operating System Protection

CPS221 Lecture: Operating System Protection Objectives CPS221 Lecture: Operating System Protection last revised 9/5/12 1. To explain the use of two CPU modes as the basis for protecting privileged instructions and memory 2. To introduce basic protection

More information

Compiler Theory. (Semantic Analysis and Run-Time Environments)

Compiler Theory. (Semantic Analysis and Run-Time Environments) Compiler Theory (Semantic Analysis and Run-Time Environments) 005 Semantic Actions A compiler must do more than recognise whether a sentence belongs to the language of a grammar it must do something useful

More information

Storage System. Distributor. Network. Drive. Drive. Storage System. Controller. Controller. Disk. Disk

Storage System. Distributor. Network. Drive. Drive. Storage System. Controller. Controller. Disk. Disk HRaid: a Flexible Storage-system Simulator Toni Cortes Jesus Labarta Universitat Politecnica de Catalunya - Barcelona ftoni, jesusg@ac.upc.es - http://www.ac.upc.es/hpc Abstract Clusters of workstations

More information

G Programming Languages Spring 2010 Lecture 4. Robert Grimm, New York University

G Programming Languages Spring 2010 Lecture 4. Robert Grimm, New York University G22.2110-001 Programming Languages Spring 2010 Lecture 4 Robert Grimm, New York University 1 Review Last week Control Structures Selection Loops 2 Outline Subprograms Calling Sequences Parameter Passing

More information

Run-time Environments

Run-time Environments Run-time Environments Status We have so far covered the front-end phases Lexical analysis Parsing Semantic analysis Next come the back-end phases Code generation Optimization Register allocation Instruction

More information

Compilers and Code Optimization EDOARDO FUSELLA

Compilers and Code Optimization EDOARDO FUSELLA Compilers and Code Optimization EDOARDO FUSELLA Contents Data memory layout Instruction selection Register allocation Data memory layout Memory Hierarchy Capacity vs access speed Main memory Classes of

More information

Run-time Environments

Run-time Environments Run-time Environments Status We have so far covered the front-end phases Lexical analysis Parsing Semantic analysis Next come the back-end phases Code generation Optimization Register allocation Instruction

More information

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2. [03] PROCESSES 1. 1 OUTLINE Process Concept Relationship to a Program What is a Process? Process Lifecycle Creation Termination Blocking Process Management Process Control Blocks Context Switching Threads

More information

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008

Distributed Systems Theory 4. Remote Procedure Call. October 17, 2008 Distributed Systems Theory 4. Remote Procedure Call October 17, 2008 Client-server model vs. RPC Client-server: building everything around I/O all communication built in send/receive distributed computing

More information

Disks and I/O Hakan Uraz - File Organization 1

Disks and I/O Hakan Uraz - File Organization 1 Disks and I/O 2006 Hakan Uraz - File Organization 1 Disk Drive 2006 Hakan Uraz - File Organization 2 Tracks and Sectors on Disk Surface 2006 Hakan Uraz - File Organization 3 A Set of Cylinders on Disk

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs. CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs

More information

The basic operations defined on a symbol table include: free to remove all entries and free the storage of a symbol table

The basic operations defined on a symbol table include: free to remove all entries and free the storage of a symbol table SYMBOL TABLE: A symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier in a program's source code is associated with information relating

More information

INTERNAL REPRESENTATION OF FILES:

INTERNAL REPRESENTATION OF FILES: INTERNAL REPRESENTATION OF FILES: Every file on a UNIX system has a unique inode. The inode contains the information necessary for a process to access a file, such as file ownership, access rights, file

More information

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements Programming Languages Third Edition Chapter 9 Control I Expressions and Statements Objectives Understand expressions Understand conditional statements and guards Understand loops and variation on WHILE

More information

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Midterm Exam October 23, 2012, Duration: 80 Minutes (10 pages, 12 questions, 100 Marks) Instructor: Dr. Kamran Sartipi Question 1 (Computer Systgem)

More information

On Checkpoint Latency. Nitin H. Vaidya. Texas A&M University. Phone: (409) Technical Report

On Checkpoint Latency. Nitin H. Vaidya. Texas A&M University.   Phone: (409) Technical Report On Checkpoint Latency Nitin H. Vaidya Department of Computer Science Texas A&M University College Station, TX 77843-3112 E-mail: vaidya@cs.tamu.edu Phone: (409) 845-0512 FAX: (409) 847-8578 Technical Report

More information

Abstract. Programs written in languages of the Oberon family usually. contain runtime tests on the dynamic type of variables.

Abstract. Programs written in languages of the Oberon family usually. contain runtime tests on the dynamic type of variables. Type Test Elimination using Typeow Analysis Diane Corney and John Gough Queensland University of Technology, Brisbane, Australia Abstract. Programs written in languages of the Oberon family usually contain

More information

Bisection Debugging. 1 Introduction. Thomas Gross. Carnegie Mellon University. Preliminary version

Bisection Debugging. 1 Introduction. Thomas Gross. Carnegie Mellon University. Preliminary version Bisection Debugging Thomas Gross School of Computer Science Carnegie Mellon University Pittsburgh, PA 15213 Institut für Computer Systeme ETH Zürich CH 8092 Zürich Preliminary version Abstract This paper

More information

An On-line Variable Length Binary. Institute for Systems Research and. Institute for Advanced Computer Studies. University of Maryland

An On-line Variable Length Binary. Institute for Systems Research and. Institute for Advanced Computer Studies. University of Maryland An On-line Variable Length inary Encoding Tinku Acharya Joseph F. Ja Ja Institute for Systems Research and Institute for Advanced Computer Studies University of Maryland College Park, MD 242 facharya,

More information