Difference: CSC458Spring2008 (32 vs. 33)

Revision 332008-03-19 - LukeDalessandro

Line: 1 to 1
META TOPICPARENT name="TongxinBai"
This class wiki serves as both a blackboard for technical discussions and a billboard for information sharing. The organization of this wiki is made as simple as possible but hopefully also effective enough for discussion and Q&A. In general, postings go to one of the four sections below. The Announcements is basically used for reminding students of the class schedule and homework due dates. The on Administration is where you put questions about class administration, for instance, about grading criteria. The other two sections are the places for technical discussions. All the specific questions and issues about the assignments go to on Assignments. The other general questions and comments about the course content go to on Technical Content.
Line: 252 to 252
  -- LukeDalessandro - 28 Feb 2008


RSTM can be confusing and frustrating to use at first. Here are a few points that may help.

  • The transactional system only protects objects that inherit from the stm::Object class, that are accessed through smart pointers. Your implementation needs to be object-oriented, at least to the first approximation.
  • Shared class definitions shouldn't define any non-static-constant fields. All fields need to be generated using the GENERATE_FIELD/GENERATE_ARRAY macros, and accessed through the resulting accessors as defined in the "Programming with RSTM" documentation.
  • Shared arrays are currently considered to be one block object, so a thread reading an element of an array that is disjoint from an element that a different thread is writing will be considered a read-write conflict and will (most likely) result in an abort of the reader.
  • If you throw an exception from inside a transaction that is not handled within the transaction it will abort the transaction and then continue to propagate. This seems like the obvious implementation, but you need to remember that anything you did to shared data during the transaction has been "undone" by the abort mechanism. Do not embed any transactionally shared information inside an exception, or you could wind up segfaulting if you try and use it.
  • Be really careful with constructors, and the "this" pointer. Read the relevant sections in the "Programming with RSTM" documentation about them.

I'm sure there will be other issues that you run into. The point of the assignment (I think) isn't for us to struggle with the vagaries of the RSTM package, but to try and come up with an interesting transactional solution to TSP. As such, feel free to email me if you find yourself struggling with something that you think is RSTM specific.

-- LukeDalessandro - 19 Mar 2008


on Technical Content

\ No newline at end of file
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback