Next: Related and future work
Up: Operating System I/O Speculation:
Previous: Evaluation of memory control
Comparison to previous design
This paper describes an in-kernel design for applying the speculative
execution approach to arbitrary, unmodified executables. In contrast,
the previous design [3,9], called SpecHint,
specifies an automatable procedure for modifying application binaries
to apply the speculative execution approach.
The SpecHint design has two advantages compared with an in-kernel
design. First, SpecHint requires no operating
system support specific to speculative execution, allowing deployment
on systems where OS modifications are not feasible. Second, SpecHint
can exploit static analyses and transformations to specialize the
application code for speculative execution.
For example, calls to expensive library functions, such as printf,
can be removed to speed up speculative execution. More complex analysis
might remove loops with data-dependent bounds which could trap
speculative execution and prevent it from generating further I/O
hints.
However, in addition to increasing
the accessibility of speculative execution by providing it as an operating
system service, an in-kernel design has four major advantages relative to
the SpecHint design.
- Unlike SpecHint, our design can be applied to
applications that implicitly generate I/O via page faults to
swap space or mapped files.
- While SpecHint assumed that systems always have abundant
spare memory, our design can estimate its effect on the memory performance
of non-speculative executions.
- As discussed in a previous report [9], SpecHint
makes some assumptions in its attempts to ensure that the modified binary
will not produce different results than the original binary. While these
assumptions will hold in most cases, an in-kernel design can guarantee that
adding speculative executions will not introduce errors in normal execution.
- Binary modification tools are difficult to
implement correctly and in a compiler-independent manner.
Chang [9] reports that an implementation of SpecHint required 19,000
lines of C code and 6,000 lines of assembly code. That implementation
transformed only statically-linked, single-process Alpha
binaries produced using the native cc compiler for Digital Unix 3.2.
In contrast, our implementation required only 5,000 lines of C code and 50 lines of
assembly code, of which 90% is
confined to two new files and memory management modifications,
and it can be applied to
arbitrary Linux x86 executables. Moreover, since our implementation
contains fewer than 100 lines of x86-specific code, it should easily
extend to handle arbitrary Linux executables on other platforms as well.
Next: Related and future work
Up: Operating System I/O Speculation:
Previous: Evaluation of memory control