Search Results (1 - 4 of 4 Results)

Sort By  
Sort Dir
 
Results per page  

KUHN, BRADLEY M.CONSIDERATIONS ON PORTING PERL TO THE JAVA VIRTUAL MACHINE
MS, University of Cincinnati, 2001, Engineering : Computer Science
The Java Virtual Machine (JVM) is perhaps the most interesting aspect of the Java programming environment. Much attention has been placed on porting non-Java languages to the JVM. Such ports are useful since JVMs are now embedded in hardware devices, as well as in software applications such as web browsers. In addition, well designed JVM ports can utilize the JVM as a common object model for multiple languages, allowing larger applications to easily be written in and scripted with multiple programming languages. This thesis presents a survey of possible approaches for porting non-Java languages to the JVM. The advantages and disadvantages of each approach are considered. Examples of JVM ports of other programming languages,such as Python, Scheme, and Tcl are presented and considered. The focus, however, is a port of Perl to the JVM. The internals of the existing Perl implementation are discussed at length with examples. The perl front-end parser, lexer and intermediate representation (IR) are described in detail. The default Perl compiler back-end, called the Perl Virtual Machine (PVM), is considered and described. Two approaches for porting Perl to the JVM are presented. The first approach reuses the existing perl front-end via Perl's B module to compile directly to JVM assembler (using Jasmin syntax). This approach is described and examples are given. The problems of mapping the PVM onto the JVM, the lack of generalization of the existing perl IR, and complications caused by the JVM bytecode verifier are introduced and explained. The second approach massages the existing perl IR into the Kawa system's more generalized IR. This approach is much more successful than direct compilation, and reasons are given to make that case. Kawa's IR is presented, and an example of a Perl program compiled to Kawa's IR is given. Finally, conclusions and lessons learned from this work are presented. A framework for the future work required to complete a Perl port to the JVM (via Kawa) is given. A brief comparison between the Kawa/JVM infrastructureand Microsoft's .NET/C# system is presented.

Committee:

Dr. John Franco (Advisor)

Subjects:

Computer Science

Keywords:

JVM Ports; Java Virtual Machine; KAWA; infrastructure

Gruesen, Michael GTowards an Ideal Execution Environment for Programmable Network Switches
Master of Science, University of Akron, 2016, Computer Science
Software Defined Networking (SDN) aims to create more powerful, intelligent networks that are managed using programmed switching devices. Applications for these SDN switches should be target independent, while being efficiently translated to the platform's native machine code. However network switch vendors do not conform to any standard, and contain different capabilities and features that vary between manufacturers. The Freeflow Virtual Machine (FFVM) is a modular, fully programmable virtual switch that can host compiled network applications. Applications are compiled to native object libraries and dynamically loaded at run time. The FFVM provides the necessary data and computing resources required by applications to process packets. This work details the many implementation approaches investigated and evaluated in order to define a suitable execution environment for hosted network applications.

Committee:

Andrew Sutton, Dr. (Advisor)

Subjects:

Computer Science

Keywords:

Software Defined Networking; SDN; Execution environment; Virtual machine; Programmable network switch

Kalappuraikal Sivadas, NivedYAVM: Yet Another Virtual Machine
Master of Science, The Ohio State University, 2011, Computer Science and Engineering

Developments in the semiconductor industry have ushered in a new generation of sensor platforms with larger memory and better processing capabilities than their older counterparts. An instance of this newer generation is the Imote2 which is capable of running at clock rates between 13 - 416 Mhz and having nearly 256KB of SRAM and 32 MB of Flash memory. This improved processing capability has meant that managed languages like C# and Java requiring larger memory footprints both in volatile memory and Flash can now be used to program wireless sensor networks (WSNs). The .NET Micro Framework is an open source version of the .NET framework scaled down for resource constrained environments. In addition to providing program- ming capability in C#, the framework also provides operating system level features like threading support, synchronization prmitives and garbage collection. Because it is provided with an open source license, the .NET Micro Framework has seen a lot of interest within the WSN community in recent years. However, a major stumbling block in the large scale acceptance of this program- ming paradigm is that the majority of the research and development in the sensing domain has been in TinyOS with nesC as the programming language. This has meant that before the community begins to bear the fruits of this new programming style, signicant eorts have to be made in rewriting libraries in .NET and bringing them up to speed with the state of the art in TinyOS.

This thesis evaluates the alternative approach of leveraging libraries already de- veloped for TinyOS and making them available as .NET libraries to the user by using the "interoperation" feature in the .NET framework. This feature, which was made available in version 3.0 allows people porting the .NET Micro Framework to dierent platforms to extend the capabilities of the framework by writing native libraries which utilize special features of the platform on which they are building.

Committee:

Rajiv Ramnath, PhD (Advisor); Jay Ramnathan, PhD (Committee Member)

Subjects:

Computer Science

Keywords:

Virtual Machine; .NET; TinyOS

Xu, GuoqingAnalyzing Large-Scale Object-Oriented Software to Find and Remove Runtime Bloat
Doctor of Philosophy, The Ohio State University, 2011, Computer Science and Engineering

Over the past decade, the pervasive use of object-oriented languages and the increasing complexity of problems solved by computer software have led to the proliferation of large-scale framework-intensive applications. These applications are typically built by combining standard packages (e.g., J2EE application server frameworks), third-party layers for domain-specific functionality, and in-house solutions. While employing libraries and frameworks eases the development effort, it can be expensive to invoke the general APIs provided by these libraries, especially when they are used for simple tasks. As a result, many applications suffer from excessive memory footprint caused by chronic runtime bloat that significantly impacts scalability and performance. In addition, programmers are taught to pay more attention to abstractions and models, and to leave the performance optimization to the runtime system. While a few redundant objects, calls, and field copies may seem insignificant, the problem quickly gets exacerbated due to nesting and layering. At some point, these inefficiencies accumulate, and compilers (e.g., the JIT in a JVM) can no longer eliminate them, since layers of abstractions grow to be deep, dynamic, and well beyond the capabilities of compiler analysis. In this dissertation, the term bloat is used to refer to the general phenomenon of using excessive work and memory to achieve seemingly simple tasks. Bloat exists commonly in large-scale object-oriented programs and it is a major challenge that stands in the way of bridging the productivity-performance gap between managed and unmanaged languages. The overarching goal of our work is to find large bloat-related optimization opportunities, with a small amount of developer time. As a fundamental methodology to achieve this goal, we advocate tool-assisted manual optimization, in order to combine developer insight with the automated tool support. In particular, we have designed, implemented, and evaluated code checking techniques accomplished by bytecode-level static analysis, and runtime optimization techniques achieved by VM-level dynamic analysis, for detecting and removing runtime bloat in large framework-intensive Java applications. These techniques can be used to (1) help a programmer detect the root cause if a problem is seen; (2) remove frequently-occurring bloat patterns; and (3) prevent bloat from occurring in an early stage of development.

Incorporating these techniques in an existing Java compiler or virtual machine will lead to increased developer productivity by helping programmers quickly locate bloat-related performance bottlenecks, as well as improved scalability of large programs by optimizing away bloat at run time. In addition, it is possible to generalize these approaches to handle similar problems in programs written in other object-oriented languages (e.g., C#), so that non-Java communities would also benefit from them. While these techniques are designed specifically to solve the bloat problem, many of them are applications of more general (theoretical) frameworks developed in the dissertation that can be instantiated to solve other problems.

Bloat contains wasteful operations that, while not strictly necessary for the forward progress, are executed nevertheless. We propose novel dynamic analysis techniques to detect such wasteful operations and to produce information that is necessary for the programmer to pinpoint the performance bottlenecks. One such analysis, as the first contribution of this dissertation, is copy profiling. This analysis is designed based on an important observation that the wasteful operations often consist of data copy activities that move data among heap locations without any useful computation. By profiling copies, this analysis looks for program regions containing large volumes of copies and data structures whose construction involves data copied frequently from other data structures.

Different from this “from-symptom-to-cause” approach that finds bloat from the symptoms through which it manifests, the second dynamic analysis this dissertation advocates attempts to capture directly the center of bloat, which is the set of operations that, while expensive to execute, produce values of little benefit. Detecting the operations that have high cost-benefit rates is, thus, an important step towards tracking down the causes of performance problems. In order to compute cost and benefit efficiently, we propose a novel technique, called abstract dynamic thin slicing, that performs dynamic thin slicing over bounded abstract domains. We demonstrate, using real-world examples, that this technique can also be adopted to solve a range of backward data flow problems efficiently. With the help of a variety of data aggregation approaches, these analyses can help a programmer quickly find potential performance problems.

The accumulation of bloat effects may result in memory leaks, which occur when object references that are no longer needed are unnecessarily maintained. Existing dynamic analyses for leak detection track fine-grained information about individual objects, producing results that are hard to interpret and lack precision. The third contribution of the dissertation is a novel container-based heap-tracking technique, based on the observation that many memory leaks in Java programs occur due to containers that keep references to unused data entries. By profiling containers and understanding their semantics, it is much easier to track down the causes of memory leak problems, compared to existing leak detection approaches based on the tracking of arbitrary objects.

Although container profiling is effective in detecting container-induced memory leaks, it has difficulties dealing with leaks that are caused by general unnecessary references instead of containers. In order to help programmers identify the root causes of these general leaks, we propose a specification-based dynamic technique called LeakChaser, as the fourth contribution of this dissertation. LeakChaser brings high-level application semantics into low-level leak detection by allowing programmers to specify and infer object liveness properties. This new technique exploits object lifetime relationships and uses varying levels of abstraction to help both experts and novices quickly explore the leaky behavior to pinpoint the leak cause.

Using these four dynamic analyses, we have found many interesting bloat patterns that can be regularly observed in the execution of large Java programs. A further step to avoid bloat is to develop static analyses that can find and remove such patterns during application development, so that small performance issues can be prevented before they accumulate and become significant.

One interesting pattern is the inefficient use of Java containers. The fifth contribution of this dissertation is a static analysis that identifies inefficiencies in the use of containers, regardless of inputs and runs. Specifically, this static analysis detects underutilized and overpopulated containers by employing a context-free-language (CFL)-reachability formulation of container operations, and by exploiting container-specific properties. The analysis is client-driven and demand-driven. It always generates highly-precise reports, but trades soundness for scalability. We show that this analysis exhibits small false positive rates, and large optimization opportunities can be found by inspecting the generated reports.

Another bloat pattern that we have regularly observed is constructing and initializing data structures that are invariant across loop iterations. As the sixth contribution of this dissertation, we develop a static analysis that uses a type and effect system to help programmers find such loop-invariant data structures. Instead of transforming a program to hoist these data structures automatically (which must be over-conservative and thus becomes ineffective in practice), we advocate a semi-automated approach that uses the static analysis to compute hoistability measurements. These measurements indicate how likely it is that these data structures can be hoisted, and are presented to the user for manual inspection. Our experimental results indicate that the proposed technique can be useful both in the development phase (for finding small performance issues before they accumulate) and in performance tuning (for identifying significant performance bottlenecks).

In conclusion, despite the existence of a number of profiling tools, this dissertation attempts to establish more systematic ways of identifying run-time inefficiencies. The dynamic analyses presented in the dissertation are implemented in J9 (a commercial JVM developed by IBM) and Jikes RVM (an open-source JVM written in Java). The static analyses are implemented in Soot, a popular Java program analysis framework. All of the proposed analyses have been shown to scale to real-world Java applications. Our experimental results strongly suggest that these techniques can be used in practice to find and remove bloat in large-scale applications, leading to performance gains. We hope that with the help of the analyses we have developed, performance tuning could be made much easier and will no longer be a daunting task that requires special skills and experience. Developers should be able to easily understand performance and perform optimizations, when they are assisted by good tools and do not need to focus on every low-level detail of the execution behavior and the analysis process. The productivity-performance gap between managed languages and unmanaged languages could be further reduced by using these techniques and tools so that performance would no longer be an issue that stands in the way of using object-oriented languages to implement performance-critical systems. Furthermore, we hope that the examples and patterns discovered by this dissertation can be used to raise the awareness of bloat in real-world software development—developers should understand the performance impact of their decisions and should try to avoid these bloat patterns in order to have high-performance implementations.

Committee:

Atanas Rountev (Advisor); Feng Qin (Committee Member); Michael Bond (Committee Member)

Subjects:

Computer Science

Keywords:

Runtime bloat; dynamic analysis; static analysis; Java virtual machine; compiler optimization