1 / 9

pobj “objects that last”

pobj “objects that last”. Course Project, CS262a, Fall ‘04 Amir Kamil and Gilad Arnold. overview. Persistent dynamic memory management library memory manager independent support for garbage collector Implemented over ARIES storage management ( lladd ) but is generally storage independent

brooklyn
Download Presentation

pobj “objects that last”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. pobj“objects that last” Course Project, CS262a, Fall ‘04 Amir Kamil and Gilad Arnold

  2. overview • Persistent dynamic memory management library • memory manager independent • support for garbage collector • Implemented over ARIES storage management (lladd) • but is generally storage independent • Atomicity through transaction semantics • logical consistency in the presence of failure • Automatic reconstruction and crash recovery • physical / binary compatibility of memory blocks (intra-object) • topological reconstruction of references (inter-object) • Emphasis on flexibility and usability • support for legacy code / library processing • mixed persistent / transient object management • logical consistency factored out

  3. programming with pobj Node *list = NULL; voidadd_line (char *line) { int len = strlen (line); pobj_start (); Node *node = (Node *)pobj_malloc (sizeof (Node)); char *str = (char *) pobj_malloc (sizeof (char) * (len + 1)); pobj_ref_typify (node, node_ref_fields); strcpy (str, line); pobj_update (str); POBJ_SET_REF (node, str, str); POBJ_SET_REF (node, next, list); pobj_static_set_ref (&list, node); pobj_end (); } intmain (int argc, char **argv) { pobj_init (); while (get_line (line, sizeof (line))) add_line (line); print_list (); } Don’t mess with… • files and I/O • representation conversions • reconstruction • atomicity and crash recovery • storage management and garbage collection • dumping recursive data structures

  4. persistent memory objects memory backing store static variables static references repository list str next str next • persistency header • link to repository • object size • object data • native layout str next ref non-ref persistent objects repository • type info (optional) • reference fields • transient fields

  5. architecture The obvious case (below) but also more interesting ones (right)… PersistentTitanium compiler application C program pobj lladd pobj lladd libc MM/GC VM I/O libc VM I/O

  6. language supported persistency • Persistent objects implemented in Titanium, an SPMD Java dialect • Persistency statically known through separate type hierarchy • Persistent operations compiled to use pobj functions Persistent p = new PersistentString(); temp_6 = (T11nc_2R74ac *) pobj_calloc(1, sizeof (T11nc_2R74ac)); • Safe operation aggregation through transaction blocks • Support for persistent arrays through qualifiers int[] persistent x = newint[4] persistent; • pobj integrated with Titanium’s Boehm-Weiser garbage collector java.lang.Object ti.lang.Persistent java.lang.String user.PersistentString user.Foo user.Bar tcbuild

  7. Persistent Titanium static classNodeextendsPersistent { ... } staticNode head, tail; static voidaddLine (Strings) { transaction { Node node = newNode(s); if (head == null) head = tail = node; else { tail.next = node; // Crash in the middle of a transaction. if (node.num == 4) thrownew Error(); tail = node; } } } // List only built on first run. public static voidmain (String[] args) { Stringline; if (head == null) // Check if first run. while ((line = getLine ()) != null) addLine (line); printList (); } Use… • persistent objects that extend Persistent • static variables to point to roots of data structures • transaction blocks to maintain consistency

  8. evaluation • Different approach than RDS/RVM • topological storage and reconstruction • nice abstraction for objects • recursive operations: update, mark-and-sweep • independent of memory and store managers • persistent / transient allocated on a single region • possibly improves spatial cache locality • but probably not as efficient (benchmarks are future work!) • Some numbers…

  9. future work Short term • dynamic persistency • type descriptors • generalized statics • transient fields • fast checksum comparison Long term • flexible pointers • on-the-fly rollback • delayed recovery (static initializers) Sci-Fi • object synchronization • automatic lock management (deadlock resolution) • persistency semantics for Titanium/Java • persistify predefined types through qualifiers • runtime detection of persistent operations • transaction block optimization (reduce number of updates)

More Related