<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Observations from Uppsala &#187; review</title>
	<atom:link href="http://jakob.engbloms.se/archives/category/review/feed" rel="self" type="application/rss+xml" />
	<link>http://jakob.engbloms.se</link>
	<description>Computer Technology: Simulation, Virtualization, Virtual Platforms, Embedded, Multicore and Multiprocessing (by Jakob Engblom)</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
    <title>Observations from Uppsala</title>
    <url>http://jakob.engbloms.se/favicon.png</url>
    <link>http://jakob.engbloms.se</link>
    <width>32</width>
    <height>32</height>
    <description>Observations from Uppsala - http://jakob.engbloms.se</description>
    </image>		<item>
		<title>25 Microchips that &#8220;Shook the World&#8221;</title>
		<link>http://jakob.engbloms.se/archives/778?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/778#comments</comments>
		<pubDate>Mon, 18 May 2009 20:01:05 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[history of computing]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[chips]]></category>
		<category><![CDATA[IEEE Spectrum]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=778</guid>
		<description><![CDATA[IEEE Spectrum has an article in its May 2009 issue called &#8220;25 Microchips that shook the world&#8220;. Not long or deep, but an interesting mix of chips from the 1970s, 80s, 90s, and the 2000s. Recommended as light reading. Tweet]]></description>
			<content:encoded><![CDATA[<p>IEEE Spectrum has an article in its May 2009 issue called &#8220;<a href="http://spectrum.ieee.org/may09/8747">25 Microchips that shook the world</a>&#8220;. Not long or deep, but an interesting mix of chips from the 1970s, 80s, 90s, and the 2000s. Recommended as light reading.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/778"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/778" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/778" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/778/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FLOSS Weekly on Xen: Some Background Missing</title>
		<link>http://jakob.engbloms.se/archives/775?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/775#comments</comments>
		<pubDate>Sun, 17 May 2009 19:41:05 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[review]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[FLOSS Weekly]]></category>
		<category><![CDATA[Ian Pratt]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=775</guid>
		<description><![CDATA[FLOSS Weekly recently ran an interview with the creator of the Xen project, Ian Pratt from the University of Cambridge (and now working for Citrix since they bought Xensource). Since I happen to like virtual things, even the so-much-talked-about-it-hurts IT/server/desktop virtualization world this was a must-listen. It was a good show, but lacking some in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.twit.tv/floss"><img class="alignleft size-full wp-image-214" style="margin: 5px 10px;" title="flossweekly" src="http://jakob.engbloms.se/wp-content/uploads/2008/08/flossweekly.jpg" alt="flossweekly" width="70" height="70" />FLOSS Weekly </a>recently ran <a href="http://www.twit.tv/floss67">an interview </a>with the creator of the <a href="http://www.xen.org/">Xen </a>project, Ian Pratt from the <a href="http://en.wikipedia.org/wiki/University_of_Cambridge_Computer_Laboratory">University of Cambridge</a> (and now working for <a href="http://www.citrix.com">Citrix </a>since they bought Xensource). Since I happen to like virtual things, even the so-much-talked-about-it-hurts IT/server/desktop virtualization world this was a must-listen. It was a good show, but lacking some in the humble background department.</p>
<p><span id="more-775"></span>I was a bit disappointed that they did not discuss paravirtualization, the concept that at least I think is the main contribution of Xen. Paravirtualization is the idea of modifying the hardware interface of an operating system just slightly to make it much more convenient and efficient to run it on top of a hypervisor. This is really not that different from the architecture in the classic heavy-duty server world, with the programming interface of the Sun Niagara, IBM POWER, and IBM zSeries machines all being not bare-metal but rather a more structured API to a layer partially implemented in software.</p>
<p>Xen is shaping up nicely to be a lot of things to a lot of people. I liked their work on live migration (done in the same way as I think I read IBM doing it in POWER). The discussion on snapshotting was also good, even if I felt he introduced it as something completely new, which it is not. VMWare has had it for ages. And my favorite simulator, <a href="http://www.virtutech.com">Simics</a>, also has it in an even more powerful way. Another interesting aspect is the use of Xen on ARM-based mobile devices, even where no real hardware support exists for virtualization (incidentally, this was the starting point for Xen on the x86 back in 2001 and the reason I understand for going with a paravirtual solution rather than a VmWare-style binary rewrite solution). Busy field, with lots of contenders.</p>
<p>The open-source nature of Xen is also very important to the project (and the reason for Ian Pratt being interviewed by FLOSS Weekly, as that show is all about open-source projects). In addition to enabling the exploration of new additions to the core &#8220;product&#8221;, it also means that Xen is  a great research tool. With Xen, researchers can implement virtualization-related ideas in a real industrial-strength product, which makes it much easier to do applicable and realistic research. Indeed, one of the greatest thing with the current strong open-source trend in the world is that research institutions have a complete system and application software stack that can be modified at any point to try new ideas. From the hypervisor to operating systems, compilers, middleware, language virtual machines, and lots of server and desktop application software.</p>
<p>Pratt was not exactly overly humble, but I think he is correct in taking some credit for having put virtualization front-and-center in the x86 market. Before Xen, it was not at all as hot as a topic. Or it might just be coincidence. I was a bit annoyed at his lack of painting a bigger picture: I would have liked more credits and more comparisons to previous work, especially the IBM classic architectures and what VmWare and others have been doing on the PC. If you had no context and listened to this show, you could well come away with the impression that Xen invented virtualization, which is not really the case at all.</p>
<p>Note that FLOSS weekly is still one of my regular podcasts, despite the <a href="http://jakob.engbloms.se/archives/586">occasional episode </a>that I take issue with.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/775"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/775" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/775" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/775/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When does Hardware Acceleration make Sense in Networking?</title>
		<link>http://jakob.engbloms.se/archives/770?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/770#comments</comments>
		<pubDate>Sat, 16 May 2009 06:45:47 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[history of computing]]></category>
		<category><![CDATA[multicore computer architecture]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[accelerators]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[hardware-software interface]]></category>
		<category><![CDATA[Mike Odell]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[tcp]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=770</guid>
		<description><![CDATA[Yes, when does hardware acceleration make sense in networking? Hardware acceleration in the common sense of &#8220;TCP offload&#8221;. This question was answered by a very nicely reasoned &#8220;no&#8221; in an article by Mike Odell in ACM Queue called &#8220;Network Front-End Processors, Yet Again&#8220;. The article is highly recommended for its long historical look at network [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-771" style="margin: 0px 15px;" title="q_stamp" src="http://jakob.engbloms.se/wp-content/uploads/2009/05/q_stamp.gif" alt="q_stamp" width="38" height="65" />Yes, when does hardware acceleration make sense in networking? Hardware acceleration in the common sense of &#8220;TCP offload&#8221;. This question was answered by a very nicely reasoned &#8220;no&#8221; in an article by Mike Odell in <a href="http://queue.acm.org/">ACM Queue </a>called &#8220;<a href="http://queue.acm.org/detail.cfm?id=1530828">Network Front-End Processors, Yet Again</a>&#8220;.</p>
<p><span id="more-770"></span></p>
<p>The article is highly recommended for its long historical look at network processing and network processing offload. As the balance  between speeds of networks, processors, memory, and interconnects between network cards and the rest of the system has changed over the years, it is an idea that occasionally (four or five times since the 1970s) has made sense. However, in the end, Mike thinks that it usually does not, and for a machine with multiple cores and a modern fast interconnect, it is hard to see how a hardware accelerator can actually help speed things up much when the coordination between the hardware and the software is accounted for. Even if there would appear to be a big bottleneck somewhere today, we can be sure that it wil be removed in the next generation of hardware, rendering the market window for an accelerator quite short.</p>
<p>I read this article as another great motivation for the need to carefully consider the functional design of the hardware-software interface for acceleration devices. For simple data-pumping or media-processing units, this looks easy. For something as complex as TCP/IP processing, it is not. I think the key is that for TCP, we have something that is much more like control-plane processing than data-plane processing, and that is harder to efficiently integrate between hardware and software. Also, there is not really that much work left to offload once data copies have been architected in the right way (and I read Mike&#8217;s article to say that we now know how to do this in a sufficently few-copies way that software is close to optimal in architecture).</p>
<p>From a market perspective, it would also indicate that the acceleration circuits that are in common use today are by definition those that make sense. Having hardware-accelerated graphics and video decoders does seem to help build more efficient and attractive computer systems, as do cryptography accelerators. With this view, it will be interesting to see which of all the accelerators found in modern networking SoCs like those from Freescale and Cavium will survive the test of time. I am willing to put a small bet that pattern-matching engines for traffic inspection is one of them. Apart from that, hard to say.</p>
<p>So go read that article before you start designing your next brilliant accelerator for a common expensive operation.</p>
<p>It also reminds me of a <a href="http://www.virtutech.com/whitepapers/wp-system_arch_spec.html">whitepaper I wrote early this year </a>on how to evaluate performance of a hardware accelerator in the context of a full system with a full software stack, considering the details of the hardware-software interface.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/770"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/770" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/770" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/770/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Book review: ZX Spectrum BASIC</title>
		<link>http://jakob.engbloms.se/archives/758?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/758#comments</comments>
		<pubDate>Tue, 05 May 2009 20:10:33 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[history of computing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[BASIC]]></category>
		<category><![CDATA[ZX Spectrum]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=758</guid>
		<description><![CDATA[I just rediscovered my first computer, a Sinclair ZX Spectrum (good picture) which I bought back in 1983 or 1984 (I have no trace of the exact date, unfortunately). The machine was a perfect machine to learn programming on in my opinion, consisting of little more than a Z80 processor with memory, bit-mapped display (with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-767" style="margin: 5px 10px;" title="sinclairspectrum-pre" src="http://jakob.engbloms.se/wp-content/uploads/2009/05/sinclairspectrum-pre.jpg" alt="sinclairspectrum-pre" width="100" height="70" />I just rediscovered my first computer, a <a href="http://en.wikipedia.org/wiki/Zx_spectrum">Sinclair ZX Spectrum </a>(<a href="http://www.old-computers.com/museum/computer.asp?c=223">good picture</a>) which I bought back in 1983 or 1984 (I have no trace of the exact date, unfortunately). The machine was a perfect machine to learn programming on in my opinion, consisting of little more than a Z80 processor with memory, bit-mapped display (with a famously odd-ball addressing scheme and color handling) and ultra-simple sound output and input. Most of my friends in the end bought Commodore C64 machines, which had more powerful graphics and sound hardware, but a processor that was much less fun to program.</p>
<p>The Spectrum came with a built-in BASIC interpreter that are up the bottom 16kB of the 64kB addressing space. The BASIC was actually fairly powerful and easy-to-use, and included a very fun programming textbook. I just reread that textbook, and it is quite strikingly well-written and manages to cover both basic computer-science-style programming and deep close-to-the-machine and real-time programming in a compact 150 pages. There is no credit to a particular author in the book I have (Swedish translation by a group of people at Ord &amp; Form here in Uppsala), but an <a href="http://www.1000bit.net/support/manuali/zxspectrum/start.htm">online scan </a>credits Steven Vickers.</p>
<p><span id="more-758"></span></p>
<p>Overall, the book does a very good job of explaining both the Sinclair BASIC interpreter, as well as some general programming concepts. And how the machine works deep down. Here are some highlights.</p>
<h2>Explaining Functions</h2>
<p>The way that functions are explained made me laugh out loud (quoting the original English according to the online resource I found):</p>
<blockquote><p>Consider the sausage machine. You put a lump of meat in at one end, turn a handle, and out comes a sausage at the other end. A lump of pork gives a pork sausage, a lump of fish gives a fish sausage, and a load of beef a beef sausage.</p>
<p>Functions are practically indistinguishable from sausage machines but there is a difference: they work on numbers and strings instead of meat. You supply one value (called the <em>argument</em>), mince it up by doing some calculations on it, and eventually get another value, the <em>result</em>.</p></blockquote>
<p>This is a very good analogy to introduce functions, in a fairly gender-neutral way and assuming no mathematical background on part of the user. I wonder if I ever cared to define any functions&#8230; as I recall it, GOSUB was as far as I got in sophistication before leaving BASIC and starting writing everything in Z80 assembler.</p>
<h2>Reading a Changing Counter</h2>
<p>Later on in the book, a suggestion is made to get a better time counter. Essentially, by reading a 24-bit value incrementing at 50 Hz, using three separate PEEK commands:</p>
<pre><code>(65536*PEEK 23674+256*PEEK 23673+PEEK 23672)/50</code></pre>
<p>This code does subject you to the issue of reading during an update and counter wrap from one byte to the next. This complication is cheerfully noted after a complete program using this feature as a by-the-way-the-code-is-correct by a small loop. There are many such small gems in the book, essential tricks and caveats that still apply to programming close to the hardware and doing real-time programming.</p>
<h2>We have No Clock</h2>
<p>The ZX Spectrum, as most computers of its day, did not have a real-time clock on board. Instead, you had to time things using the 50Hz screen refresh interrupt (which is what the code in previous section reads) or by just adjusting your code to wait appropriately. One example program is supposed to show a clock updating every second. However, getting to a second is a bit tricky when there is no firm time-base to work on. The suggesting instead is this:</p>
<blockquote><p><span style="font-size: x-small;">This clock will run down after about 55.5 hours because of line 60, but you can easily make it run longer. Note how the timing is controlled by line 210. You might expect PAUSE 50 to make it tick one a second, but the computing takes a bit of time as well and has to be allowed for. This is best done by trial and error, timing the computer clock against a real one, and adjusting line 210 until they agree. (You can&#8217;t do this very accurately; an adjustment of one frame in one second is 2% or half an hour in a day.)</span></p></blockquote>
<p><span style="font-size: x-small;">So what we have here is a classic &#8220;how long must I wait to get a steady pace of execution for my periodic code?&#8221; issue familiar to anyone using an RTOS and trying to determine how long to sleep a process for until the next periodic interval starts. Once again, illustrated in ten lines of BASIC and a few lines of text.<br />
</span></p>
<h2>Repeatability and Randomness</h2>
<p>In <a href="http://www.1000bit.net/support/manuali/zxspectrum/chapter_11.htm">Chapter 11</a>, randomness using the built-in random function is introduced. This was a 16-bit periodic pseudo-random system where you could set the random seed to put start the random generation at any particular point in a 100% repeatable manner. Indeed, the book introduces the concept of doing this in order to ensure repeatable execution of a program relying on randomness. This <a href="http://jakob.engbloms.se/archives/734">sounds familiar</a> from my previous post on simulation determinism:</p>
<blockquote><p><span style="font-size: x-small;">If you had a program with RND in it and it also had some mistakes that you had not found, then it would help to use RANDOMIZE like this so that the program behaved the same way each time you ran it.</span></p></blockquote>
<h2>Delving into Details</h2>
<p>The BASIC manual does not try to hide how the BASIC interpreter works internally, <a href="http://www.1000bit.net/support/manuali/zxspectrum/chapter_24.htm">rather on the contrary</a>, including a list of all system variables so that they can be POKEd and changed if need be. It also explains the data layout of all variable types (the Spectrum BASIC used 32-bit integers, impressive for an 8-bit machine, and 40-bit floating point numbers).</p>
<p>The only useful information for me in the way I used the machine as a pure assembly-language target was the memory layout of the screen. Which is bizarre to say the least. It had a separate black-and-white bitmap and color overlay for every 8&#215;8 character. And each scan line was NOT consecutive with the previous in memory, but rather offset by 256 bytes. I think the idea was to make it easy to insert a single character into the bitmap by just incrementing the high byte of the address by one for each pixel line.</p>
<p>To make that work, the screen was divided into three pieces of 8 character lines/2048 bytes each (8 character lines of 8 pixel lines each, each with 32&#215;8 bits of data).  The sprite drawing routines that would work with that to plot a 16&#215;16 sprite in any screen position was amazing code, to say the least. I independently invented unrolled loops to make this run fast. And misused the POP instruction to pull in data to draw (it took 11 cycles, rather than 12 as a more usual register-indirect load would do) &#8212; provided that you turned off interrupts or data corruption would ensue.</p>
<p>These were fun programming times. It shaped my programming habits for a decade, culminating in an infamous 68000 assembler hack in my first undergrad year at Uppsala, with some 50 pages of very tight and complicated assembly language making use of most features of the 68k instruction set&#8230; poor TA.</p>
<h2>Final Notes</h2>
<p><span style="font-size: x-small;">On it goes like that. The chapters are short but very much to the point, and a large number of fairly subtle concepts are introduced. The Spectrum was a good school for a budding programmer, with no compiler, no safety net, but also no way to break the machine in a way that a reboot would not cure.<br />
</span></p>
<p>I actually recommend seeking out the aforementioned online repository for the Spectrum programming book, it is almost still in shape to be used as an introduction to real-time and embedded programming.</p>
<p>I am currently trying to figure out what is a good ZX Spectrum emulator to relive these old times if I can find time. The hardware unit I have depends on an analog tape drive to load software&#8230; and I gave up analog sound back in 1993. As if the magnetic tapes which have been in storage for 20 years have any chance of containing useful data anyway.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/758"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/758" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/758" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/758/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Tyranny of Syntax on Stackoverflow</title>
		<link>http://jakob.engbloms.se/archives/681?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/681#comments</comments>
		<pubDate>Mon, 09 Mar 2009 20:51:51 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[CS]]></category>
		<category><![CDATA[Domain-specific languages]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[stackoverflow.com]]></category>
		<category><![CDATA[VBA]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=681</guid>
		<description><![CDATA[The 44th episode of the Stackoverflow podcast contains an interesting discussion on what I have liked to call &#8220;the tyranny of syntax&#8221;.They note that for some reason people are scared of anything that does not look like C, but still lament some of the less good design patterns in C, such as the fact that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-300" style="margin: 5px;" title="stackoverflowlogo250hq2" src="http://jakob.engbloms.se/wp-content/uploads/2008/10/stackoverflowlogo250hq2.png" alt="stackoverflowlogo250hq2" width="47" height="61" />The <a href="http://itc.conversationsnetwork.org/shows/detail4028.html">44th episode of the Stackoverflow podcast </a>contains an interesting discussion on what I have liked to call &#8220;the tyranny of syntax&#8221;.They note that for some reason people are scared of anything that does not look like C, but still lament some of the less good design patterns in C, such as the fact that closing braces have no annotations as to what is being closed. They also talk about the use of &#8220;little languages&#8221;, and an old favorite song of mine.</p>
<p><span id="more-681"></span></p>
<p>The best bit is the discussion around named parameters and how that was introduced into Visual Basic for Application in Excel &#8212; and at the same time they reduced the argument counts to most functions by replacing them with manipulating properties of objects. I think that approach does make some sense, if you have something that lends itself to that kind of expression. Their comparison of having a single function call with 83 arguments to change the style of text in Word by silently effecting a dialog box, or actually setting each of 83 properties of a dialog box object makes eminent sense&#8230; Sense that applies to simulators as well: in Simics, we do have a system like that, with attributes on all objects in the simulation that can be set to change their behavior and connections. Trying to configure that in the SystemC-style with function calls and constructors from scratch would be a pain, definitely.</p>
<p>Another topic that struck a chord with me was the notion that we are moving towards a world of &#8220;little languages&#8221; built for particular purposes. I definitely think this is the right way to go, as domain-specific languages do make getting particular things done easier. The more general a language is, the worse it is at any particular task. Better then to use a smaller language built to do one thing. As Jeff put it, for databases uses SQL, for text processing using Perl, etc&#8230; Using a multitude of languages is the hallmark of good software design and a natural instinct for a computer scientist.</p>
<p>They also found a <a href="http://www.youtube.com/watch?v=XHosLhPEN3k">YouTube video </a>of the old computer science (CS) song &#8220;<a href="http://www.mmilan.com/write-in-c/">Write in C</a>&#8220;. They do not seem to get that this is a really old song, I remember singing it way back when I was a fresh <a href="http://www.datavetenskap.nu/">undergrad CS student </a>here in Uppsala&#8230; and it was part of the first edition of our nice leather-bound songbook called &#8220;Manualen&#8221;. The lyrics are starting to feel a bit dated, but it is still a very elegant piece of writing that I think took place in the mid-1980s, judging from the other languages referenced.</p>
<p>Anyway, an unusually listen-worthy edition of Stackoverflow.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/681"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/681" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/681" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/681/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IBM z10 Heavy-Duty Virtual Platform</title>
		<link>http://jakob.engbloms.se/archives/639?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/639#comments</comments>
		<pubDate>Sun, 15 Feb 2009 17:17:29 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[computer simulation technology]]></category>
		<category><![CDATA[multicore debug]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[virtual platforms]]></category>
		<category><![CDATA[CECsim]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Simics]]></category>
		<category><![CDATA[z10]]></category>
		<category><![CDATA[zSeries]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=639</guid>
		<description><![CDATA[Unknown to most, IBM has one of the world&#8217;s longest records of using virtual platforms for software and firmware development and verification. This project has been ongoing since at least the days of the zSeries 900 machines, through z990, z9, and now z10. An excellent article on this virtual platform and its uses is found [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-640" style="margin: 5px;" title="ibm_z10" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/ibm_z10.png" alt="ibm_z10" width="118" height="118" />Unknown to most, IBM has one of the world&#8217;s longest records of using virtual platforms for software and firmware development and verification. This project has been ongoing since at least the days of the zSeries 900 machines, through z990, z9, and now z10. An excellent article on this virtual platform and its uses is found in the <a href="http://www.research.ibm.com/journal/rd53-1.html">IBM Journal of Research and Development</a>, number 1, 2009, . It is called <a href="http://www.research.ibm.com/journal/rd/531/koerner.pdf">&#8220;IBM System z10 Firmware Simulation&#8221;, by Körner et al</a>.</p>
<p><span id="more-639"></span>The z10 is the latest generation of the classic IBM mainframe family that started with S/360 back in the 1960s. The simulation for just running the firmware of these beasts is making most other virtual platforms look positively puny &#8211; focusing on single SoCs for consumer or digital devices. It also shows that virtual platforms as a technology can scale all the way from single-core bare-metal simple machines that are useful for developing initial software for simple embedded systems up to servers and racks containing hundreds of processing units and very diverse hardware.</p>
<p>The teminology used is unusual, compared to the EDA/ESL and computer architecture research worlds. But it is good. The key concept is a &#8220;VPO&#8221;, Virtual Power On. For a computer of this class, doing Power On is a major event, and calling it a &#8220;boot&#8221; does not really cover its full complexity, involving many different layers of software running on the same and different computers. The VPO was targeted at four months prior to hardware tape-out &#8212; and this means that at that point in time the virtual system would be complete and the firmware complete enough to do a power on.</p>
<p>The simulation system used for the z10 mixes IBM&#8217;s in-house <a href="http://researchweb.watson.ibm.com/journal/rd/464/vonbuttlar.html">CECsim </a>with <a href="http://www.virtutech.com/solutions/virtual_platform/power">Virtutech Simics</a>. CECsim executes the code for the <a href="http://jakob.engbloms.se/archives/80">central zSeries processors</a>, while Simics simulates the FSP-1 &#8220;flexible support processor&#8221; based on the Power Architecture. In previous generations of simulation, the FSP code had been host-compiled and run on an x86 workstation instead of running the actual Power Architecture binaries. Running the real binaries brought additional verification value to the software, finding 3 times more bugs than in the previous host-based simulation:</p>
<blockquote><p>Because the Simics environment now enables us to execute all FSP code in simulation, a far greater amount of code is simulated. Correspondingly, the number of defects found in simulation also increased, by more than 33(Table 2).</p></blockquote>
<p>The article also describes how hardware-accelerated simulation of the actual VHDL of complex new IO chips were used to validate the bits-and-cycles-level interfacing between code and the logic, as well as to validate the logic design itself.</p>
<p>Overall, the article is one of best presentations of comprehensive use of various types of simulation tools and techniques to remove firmware defects as early as possible in the system development project.</p>
<p>For more on the history of this, I refer to a previous blog post here, &#8220;<a href="http://jakob.engbloms.se/archives/130">The 1970 rules strikes again</a>&#8220;, where I described some late 1960&#8242;s mainframe simulation technology and its uses. Also, browse the back issues of the IBM JRD archives, there are lots of nuggets to be found there!</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/639"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/639" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/639" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/639/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Off-topic: Software tip: SnagIT.</title>
		<link>http://jakob.engbloms.se/archives/141?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/141#comments</comments>
		<pubDate>Sun, 22 Jun 2008 19:07:25 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[desktop software]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[screen capture]]></category>
		<category><![CDATA[SnagIt]]></category>
		<category><![CDATA[TechSmith]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=141</guid>
		<description><![CDATA[Sometimes you find this rare gem of a piece of software that just works and that just solves a problem you have been having an itch with for a long time. SnagIT, from TechSmith, is just such a program. It makes doing screen captures and editing them incredibly easy and convenient. It also has some [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft alignnone size-medium wp-image-140" style="float: left;" title="snagitlogo" src="http://jakob.engbloms.se/wp-content/uploads/2008/06/snagitlogo.png" alt="" width="209" height="80" />Sometimes you find this rare gem of a piece of software that just works and that just solves a problem you have been having an itch with for a long time. <a href="http://www.techsmith.com/screen-capture.asp">SnagIT, from TechSmith</a>, is just such a program. It makes doing screen captures and editing them incredibly easy and convenient. It also has some nice extras, like capturing a webpage in its entirety by scrolling the window in Internet Explorer or Firefox. Simple, but a great time saver for me. I feel like I literally saved hours of work time in just a few weeks of using this program. 30 bucks for a piece of software that does screen capture? In my job, a no-brainer. Highly recommended!</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/141"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/141" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/141" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/141/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Book Review: Intel&#8217;s Multicore Programming Book</title>
		<link>http://jakob.engbloms.se/archives/61?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/61#comments</comments>
		<pubDate>Sun, 09 Dec 2007 19:43:20 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[multicore computer architecture]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Itanium]]></category>
		<category><![CDATA[Jason Roberts]]></category>
		<category><![CDATA[Multicore programming]]></category>
		<category><![CDATA[OpenMP]]></category>
		<category><![CDATA[Shamemm Akhter]]></category>
		<category><![CDATA[SMT]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/61</guid>
		<description><![CDATA[The book &#8220;Multicore Programming &#8211; Increasing Performance through Software Multithreading&#8221; by Shameem Akhter and Jason Roberts is part of a series of books put out by Intel in their multicore software push. In case you have not noticed, Intel has a huge market push currently where they give seminars, publish articles and books, and give [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Multicore programming book cover" href="http://jakob.engbloms.se/wp-content/uploads/2007/12/cover_mcp_sm.gif"><img src="http://jakob.engbloms.se/wp-content/uploads/2007/12/cover_mcp_sm.gif" alt="Multicore programming book cover" hspace="10" align="left" /></a>The book &#8220;<a href="http://www.intel.com/intelpress/sum_mcp.htm">Multicore Programming &#8211; Increasing Performance through Software Multithreading</a>&#8221; by Shameem Akhter and Jason Roberts is part of a <a href="http://shop.intel.com/shop/product.aspx?pid=sibk3603">series of books</a> put out by Intel in their multicore software push. In case you have not noticed, Intel has a huge market push currently where they give seminars, publish articles and books, and give curricula to universities in order to get more parallel software in place. I read this book recently, and here is a short review.<br />
<span id="more-61"></span>First a short note about the Intel multicore education push: the end goal is to make sure that the average computer user will perceive value (more features and higher performance) from buying multicore Intel processors for their home or business PC. In the process, they do provide a useful community service, and presumably lots of jobs for PhDs in parallel programming and computing. This focus on the desktop computing arena has implications for the contents of books like this.</p>
<p>The authors are experienced parallel software writers working at Intel, and who wrote this book for Intel as part of the multicore push.</p>
<p>The book covers the obvious topics for any introduction book to parallel programming:</p>
<ul>
<li>Application patterns for parallel programs: various ways to structure computations to extract or expose parallelism.</li>
<li>Programming APIs.</li>
<li>Common problems in parallel code.</li>
<li>Debugging parallel code.</li>
<li>Performance tuning parallel code.</li>
<li>Fundamental computer architecture.</li>
</ul>
<p>In my mind, the best part of the book is the application patterns and programming APIs section. The most interesting aspect of the book was the weight given to the programming APIs and debug tools for Windows. In comparison, most other texts that I have seen focus on the portable and generally available pthreads/Posix threads API or OpenMP. The Windows APIs are actually pretty cool and powerful. Note that the .net managed code (CLR) environment has its own set of APIs similar to but distinct from the general old Win32 API.</p>
<p>The authors clearly have a weak spot for <a href="http://www.openmp.org/blog/about/">OpenMP</a>, and more time is spent on OpenMP than any other API. I remain unconvinced about its generality, but it certainly has some interesting properties. But it is far from automatic parallelization. MPI gets a very strange treatment, being tucked away in a late part of the debugging chapter. Why it was not considered a full programming API is beyond me.</p>
<p>A section on memory consistency is pretty well written and is one of the best expositions on how that actually works on x86 and Itanium architectures.</p>
<p>The worst part of the book is the strangely confused and forced section on hardware architecture. Being an Intel (trademark) book about Intel (trademark) processors and programming them, the chapter on Pentium (r) and Core (r) and Itanium (trademark) processors was probably mandatory. But to someone with prior knowledge of computer architecture it is all very confused, trying to press ILP together with SMT (HyperThreading) and multicore into some joint thread concept that just does not work as a pedagogical concept.  Also, Itanium takes up an inordinate amount of space for what is basically a moribund architecture. But I guess that Intel (trademark) cannot acknowledge that Itanium (trademark) is a titanic disaster. At least not yet.  This chapter is also full of little (r) and &#8482; markers and various Intel product names that really makes it harder to read.</p>
<p>There is a good description of Intel multithreaded programming tools, not surprisingly.</p>
<p>Overall, the book offers a good read, but it suffers from also being Intel PR material. I do not recommend against reading it, especially not if you are programming in an x86 desktop environment. But if you are attacking an embedded Power Architecture problem, I think there are better sources.</p>
<p>Note for publicity thinkers: I bought this book after reading a technical article at Embedded.com &#8220;Technical Insights&#8221;. Submitting book chapters or excerpts as technical articles there could drive readers and buyers to your books. Worked on me at least, at least this one time.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/61"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/61" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/61" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/61/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

