Applications of Control Theory to Computer Systems Optimization

Computer systems complexity is growing rapidly, thus making the efficient use of their resources an increasingly challenging task. In many cases the optimization of the management in such systems has been developed with ad-hoc techniques and heuristics. In this thesis, a more general and flexible approach is explored to resource management, based on the powerful framework of stochastic optimal control. This approach requires a careful modeling of the system of interest as a dynamical system with appropriate cost functions and stochastic descriptions of the inputs that are imposed by the external environment. Then, the question of an optimal management policy that minimizes the expected cost becomes mathematically well posed and can be systematically investigated. Two cases studies illustrating the approach are developed, as summarized below. In Chapters 1–5, the classical replacement problem for memory hierarchies is cast within the framework of optimal control theory. Memory references are assumed to comply with the Least Recently Used Stack Model (LRUSM); arbitrary stack-distance distributions are considered. An optimal policy is derived to minimize the miss rate for an infinite trace (a control over an infinite horizon). We call it a K-L policy where K(C) and L(C) are parameters, whose value is a function of the buffer (cache) size C, determined by the stack-distance distribution. Then, the concept of Least Profit Rate (LPR) policy is introduced and it is shown that, for the LRUSM model, LPR is an optimal policy over an infinite horizon which, in steady state, coincides with the K-L policy. The LPR satisfies the inclusion property whereby the content of a given buffer is also contained in all larger buffers. This property is known to enable the efficient computation of the number of misses for a given address trace, simultaneously for all buffer sizes. Furthermore, the LPR formulation leads to a linear time computation of the values K(C) and L(C) for all relevant values of C, improving on the cubic bound that naturally arises within the K-L derivation. Furthermore, the properties of LPR are exploited to derive an efficient algorithm to optimally partition a buffer concurrently accessed by multiple processes. Finally, the miss rate of LPR is compared with that of OPT, the well-known optimal off-line policy, to investigate the difference between an exact and a statistical knowledge of the future of the trace. Obtaining a closed form characterization of the optimal replacement policy over a finite horizon has proved to be rather more difficult than over the infinite horizon. The problem has been solved for monotone stack-distance distributions. Separate arguments establish the optimality of the Least ReApplications of Control Theory to Computer Systems Optimization cently Used (LRU) policy for all nonincreasing distributions and of the Most Recently Used (MRU) policy for all nondecreasing distributions. Interestingly, LRU and MRU are special cases of LPR, within the LRUSM model, for nonincreasing and non decreasing distributions, respectively. The results have been obtained by introducing a significant variant of the standard Bellman’s equation, potentially useful for other control problems. In Chapters 6–7 it is studied the problem of processors allocation for the Galois System, a tool for automatically parallelizing, by means of speculative execution, algorithms that present data amorphous parallelism. The Galois System is modeled using graph-theoretic concepts and the optimization goal is identified in trying to maximize the parallelism, while keeping a constant conflict ratio. This is linked to a function for which we analytically derive some properties that are then used to design an algorithm that controls the number of processors in a quick and stable way. For this purpose an extension to the well known Turán’s theorem is developed.