Skip to main content

Home/ Coders/ Group items tagged stm

Rss Feed Group items tagged

Joel Bennett

Software Transactional Memory (MSDN Blog: Developing for Developers) - 0 views

  •  
    A great article explaining Software Transactional Memory for programmers who've never heard of it.
Matteo Spreafico

Joe Duffy's Weblog - OnBeingStateful - 0 views

  • The biggest question left unanswered in my mind is the role state will play in software of the future.
  • The biggest question left unanswered in my mind is the role state will play in software of the future. That seems like an absurd statement, or a naïve one at the very least.  State is everywhere: The values held in memory. Data locally on disk. Data in-flight that is being sent over a network. Data stored in the cloud, including on a database, remote filesystem, etc. Certainly all of these kinds of state will continue to exist far into the future.  Data is king, and is one major factor that will drive the shift to parallel computing.  The question then is how will concurrent programs interact with this state, read and mutate it, and what isolation and synchronization mechanisms are necessary to do so?
  • Many programs have ample gratuitous dependencies, simply because of the habits we’ve grown accustomed to over 30 odd years of imperative programming.  Our education, mental models, books, best-of-breed algorithms, libraries, and languages all push us in this direction.  We like to scribble intermediary state into shared variables because it’s simple to do so and because it maps to our von Neumann model of how the computer works.
  • ...3 more annotations...
  • We need to get rid of these gratuitous dependencies.  Merely papering over them with a transaction—making them “safe”—doesn’t do anything to improve the natural parallelism that a program contains.  It just ensures it doesn’t crash.  Sure, that’s plenty important, but providing programming models and patterns to eliminate the gratuitous dependencies also achieves the goal of not crashing but with the added benefit of actually improving scalability too.  Transactions have worked so well in enabling automatic parallelism in databases because the basic model itself (without transactions) already implies natural isolation among queries.  Transactions break down and scalability suffers for programs that aren’t architected in this way.  We should learn from the experience of the database community in this regard
  • There will always be hidden mutation of shared state inside lower level system components.  These are often called “benevolent side-effects,” thanks to Hoare, and apply to things like lazy initialization and memorization caches.  These will be done by concurrency ninjas who understand locks.  And their effects will be isolated by convention.
  • Even with all of this support, we’d be left with an ecosystem of libraries like the .NET Framework itself which have been built atop a fundamentally mutable and imperative system.  The path forward here is less clear to me, although having the ability to retain a mutable model within pockets of guaranteed isolation certainly makes me think the libraries are salvageable.  Thankfully, the shift will likely be very gradual, and the pieces that pose substantial problems can be rewritten in place incrementally over time.  But we need the fundamental language and type system support first.
Fabien Cadet

utf 8 nbsp - RE: nbsp is not that hard, folks ; reply by: Américo Albuquerque... - 0 views

  • " " " " and "\u00A0" have nothing, NOTHING to do with UTF-8.
  • There is a character -- an abstract unit in a "script" (a writing system; we are using Latin right now) -- called NO-BREAK SPACE by the Unicode Standard and ISO/IEC 10646. Unicode and ISO/IEC 10646 assign this character an integer number, 160, which is A0 in hex.
  • UTF-8 is an encoding scheme that provides a way of representing any of the approximately 1.1 million possible abstract characters in Unicode as a sequence of 1 to 4 bytes.
  • ...8 more annotations...
  • The UTF-8 representation of the Unicode character 160 (no-break space), is the pair of bytes C2 A0, in that order.
  • This thing: \u00A0
  • the no-break space character
  • This thing:   or this thing:  
  • is to SGML applications like HTML and XML what \u00A0 is to Java & Python;
  • is called a character reference (or "numeric character reference").
  • This thing:  
  • is to SGML applications like HTML and XML an "entity reference";
  •  
    « [...] " " " " and "\u00A0" have nothing, NOTHING to do with UTF-8 [...] Unicode and ISO/IEC 10646 assign this character an integer number, 160, which is A0 in hex [...] UTF-8 is an encoding scheme [...] The UTF-8 representation of the Unicode character 160 (no-break space), is the pair of bytes C2 A0. »
1 - 3 of 3
Showing 20 items per page