Transcript Slide
The MT-Evaluator Virtual
Machine
Kristine Joy Apon, Kai H. Fan, Joanie
Feeney, Peter Laurina, Steve O’Brien,
Gregory Van De Moere
Advisor: Dr. Marco Morazán
Functional Programming
Describing processes such as mathematical notations
and procedures
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1))) ) )
Functional Programming
Benefits
More intuitive than imperative languages such
as C and Java
Easy to prove correctness of functions
Truly machine independent
Fast prototyping
Disadvantages
Poor virtual memory interaction can make
them slow.
Excessive paging can profoundly affect
performance.
Distributed Virtual Memory System
Tailored for functional languages
implemented completely in software.
Parallelize the engine that evaluates
programs and not individual user code.
Parallelize memory management.
MT Architecture
Virtual Machines
Software that emulates a real machine by
keeping track of state.
Can port software from one machine to
another.
Can execute software designed for a machine
never physically implemented.
The MT evaluator is a switch-based virtual
machine.
MT Evaluator Virtual Machine
Implementation
Heap, stack, symbol table, and code are
objects implemented in C++
Instance variables
For data
For virtual memory implementation
Public and private methods
Public methods: constructor, data access methods.
Private Methods: memory management routines.
Paging occurs within these discretized
memory spaces.
No shared memory (either pages or frames)
between spaces.
Paging Policy Considerations
Paging behavior of distributed spaces
Heap
FIFO ≈ LRU (FIFO has less overhead).
Stack
LRU superior to FIFO.
Uses a special version of LRU without timestamps.
Code
DLL-LRU: LRU employing a circular double-linked
list.
Test 1: Creating a list of 10000
random numbers using FIFO
Empirical Measurements for performance
Heap
40000 accesses
20000 allocations
60 faults (.0015 fault rate)
Stack
270013 accesses
120006 allocations
99 faults (.0004 fault rate)
Future Work
Comparing FIFO & LRU, other paging
algorithms for code space and garbage
collection.
Implementation of 1st-class functions.
Development of an MT Compiler for
different functional languages.
Design and implementation of a GC
algorithm that exploits the MT
architecture.