Parallel and Concurrent Programming in Haskell

As one of the developers of the Glasgow Haskell Compiler (GHC) for almost 15 years, I have seen Haskell grow from a niche research language into a rich and thriving ecosystem. I spent a lot of that time working on GHC’s support for parallelism and concurrency. One of the first things I did to GHC in 1997 was to rewrite its runtime system, and a key decision we made at that time was to build concurrency right into the core of the system rather than making it an optional extra or an add-on library. I like to think this decision was founded upon shrewd foresight, but in reality it had as much to do with the fact that we found a way to reduce the overhead of concurrency to near zero (previously it had been on the order of 2%; we’ve always been performance-obsessed). Nevertheless, having concurrency be non-optional meant that it was always a first-class part of the implementation, and I’m sure that this decision was instrumental in bringing about GHC’s solid and lightning-fast concurrency support.

Haskell has a long tradition of being associated with parallelism. To name just a few of the projects, there was the pH variant of Haskell derived from the Id language, which was designed for parallelism, the GUM system for running parallel Haskell programs on multiple machines in a cluster, and the GRiP system: a complete computer architecture designed for running parallel functional programs. All of these happened well before the current multicore revolution, and the problem was that this was the time when Moore’s law was still giving us ever-faster computers. Parallelism was difficult to achieve, and didn’t seem worth the effort when ordinary computers were getting exponentially faster.

Around 2004, we decided to build a parallel implementation of the GHC runtime system for running on shared memory multiprocessors, something that had not been done before. This was just before the multicore revolution. Multiprocessor machines were fairly common, but multicores were still around the corner. Again, I’d like to think the decision to tackle parallelism at this point was enlightened foresight, but it had more to do with the fact that building a shared-memory parallel implementation was an interesting research problem and sounded like fun. Haskell’s purity was essential—it meant that we could avoid some of the overheads of locking in the runtime system and garbage collector, which in turn meant that we could reduce the overhead of using parallelism to a low-single-digit percentage. Nevertheless, it took more research, a rewrite of the scheduler, and a new parallel garbage collector before the implementation was really usable and able to speed up a wide range of programs. The paper I presented at the International Conference on Functional Programming (ICFP) in 2009 marked the turning point from an interesting prototype into a usable tool.

All of this research and implementation was great fun, but good-quality resources for teaching programmers how to use parallelism and concurrency in Haskell were conspicuously absent. Over the last couple of years, I was fortunate to have had the opportunity to teach two summer school courses on parallel and concurrent programming in Haskell: one at the Central European Functional Programming (CEFP) 2011 summer school in Budapest, and the other the CEA/EDF/INRIA 2012 Summer School at Cadarache in the south of

Attend Meeting C++ 2013

Boost Dependency Analyzer

I have something special to announce today. A tool I’ve build over the last 2 weeks, which allows to analyze the dependencies in boost. With boost 1.53 this spring, I had the idea to build this, but not the time, as I was busy writing a series over the Papers for Bristol. Back then I realized, how easy it could be to build such a tool, as the dependencies could be read & listed by boosts bcp tool. I already had a prototype for the graphpart from 2010. But lets have a look at the tool:

The tool is very easy to handle, it is based on the out of bcp, which is a tool coming with boost. Actually bcp can help you with ripping libraries out of boost, so that you don’t have to add all of boost to your repository when you would like to use smartpointers. But bcp also has a listing mode, where it only shows the dependencies thats whats my tool build up upon. Lets have a short look at the results, the dependencies of boost 1.54:

A few words on how to read this graph. The libraries in the middle of the “starshape” are the ones with the most dependencies, each line between the nodes is a dependency. A dependency can be one or multiple files. The graphlayout is not weighted.

How to

A short introduction on what you need to get this tool to run. First boost, as this tool is build to analyze boost. I’ve tested with some versions (1.49 – 1.54) of boost. You also need a version of bcp, which is quite easy to build (b2 tools/bcp). Then you simply need to start the tool, if BOOST_ROOT is set, the tool will try to read it, other wise you will be asked to choose the location of boost when clicking on Read dependencies. Next thing is selecting the location of bcp. That is the setup, and the tool will now run for some time. On my machine its 90 seconds to 2 minutes the analysis takes, it might be lot longer on yours, depending on how much cores you got. The tool will spawn for each boost library (~112) a bcp process, and analyze this output in a thread pool. After this is done, the data is loaded into the tool, and then saved to a SQLITE database, which will be used if you start the tool a second time and select this version of boost. Loading from the database is far faster.

A screenshot to illustrate this:

tl_files/blog/bda/bda.png

To the left are all the boost libraries, the number of dependencies is shown in the braces. To the right is a Tabwidget showing all the dependencies, the graph is layouted with boost graph. When you click on show all you’ll get the full view of all dependencies in boost. The layouting is done in the background, so this will take some time to calculate, and is animated when its done. The results of the layouting are good, but not perfect, so that you might have to move some nodes. Exporting supports images, which are transparent PNGs, not all services/tools are happy with that (f.e. facebook, twitter nor G+ could handle the perfectly

Green Hills Software Announces AdaMULTI Support for ARM-Based Processors

SANTA BARBARA, CA–(Marketwired – Jul 2, 2013) – Green Hills Software, the largest independent vendor of embedded software solutions, has announced the availability of a complete integrated development environment for Ada users, who are targeting systems based on ARM® processors. AdaMULTI™ development environment for ARM has been created in response to increasing demand for ARM devices in embedded applications due to their excellent power/performance ratios and relative cost effectiveness.

The Ada programming language is typically used on projects that have real-time constraints, are developed by sizeable teams and require longevity of support. It is widely adopted in the defense sector and in security applications, such as access control. With the increasing requirement to extend the operating life of battery-powered equipment used on missions or remotely deployed in the field, ARM-based processors are being selected because of their ability to deliver the necessary performance with a reduced power budget.

Green Hills Software’s customers can rehost their existing Ada95 based applications with the new compilation environment. Additionally, some new features that have recently been added to the language are also included in the new release.

AdaMULTI for ARM is a fully integrated development environment that contains all the tools needed to complete a major programming project. These include: launcher, project manager, editor, source-level debugger, EventAnalyzer™, run-time error checking, code coverage analysis,TimeMachine™ tools suite, performance profiler and graphical browser. AdaMULTI development environment components are aware of each other and communicate among themselves, making the whole much greater than the sum of its parts. It runs on Windows, Solaris and Linux hosts and supports remote debugging for a variety of target environments, including with the Green Hills Probe and SuperTrace™ Probe for hardware debug and trace.

The AdaMULTI environment can also be used with Green Hills Software’s optimizing C/C++ compilers and other compilers that adhere to ARM Procedure Call and EABI standards. It supports a wide variety of real-time operating systems (RTOS), including Green Hills Software’s INTEGRITY® RTOS, third party and internally developed RTOSes. Because the AdaMULTI environment is fully RTOS-aware, designers can debug and tune their applications at the task level. It is particularly well suited to debugging multi-tasking programs and systems that employ multiple processors and cores.

Availability
Green Hills Software’s AdaMULTI development environment for ARM is available now for ARM processors including Cortex™-A and Cortex-R series and ARM7TDMI®.

About Green Hills Software
Founded in 1982, Green Hills Software is the largest independent vendor of embedded development solutions. In 2008, the Green Hills INTEGRITY-178B RTOS was the first and only operating system to be certified by NIAP (National Information Assurance Partnership comprised of NSA and NIST) to EAL 6+, High Robustness, the highest level of security ever achieved for any software product. Our open architecture integrated development solutions address deeply embedded, absolute security and high-reliability applications for the military/avionics, medical, industrial, automotive, networking, consumer and other markets that demand industry-certified solutions. Green Hills Software is headquartered in Santa Barbara, CA, with European headquarters in the United Kingdom.

Stopping Google Latitude Service on August 9th

The world’s largest search engine company, Google will soon be officially shut down one of his services. The services that will be closed is Google Latitude which is a location sharing application.

Closure is made after a company based in Mountain View did a massive change on Google Maps. In addition, this application also has a very low popularity. Google Latitude consumption levels far below other applications such as Foursquare or Facebook. Not only that, Latitude also less popular than the location-sharing service owned by Google.

Google Latitude itself is a location sharing application that is integrated with Google Maps. This feature allows for automatic location tracking, check in at a place it can also be set automatically or manually.

In the latest update Google Maps on Android, this feature is not found anymore. Selian it, Google also removed the existence of Google Latitude app available on iOS and has officially retire the Latitude API. So third-party applications that use these APIs will not work, unless using a sharing site owned by Google.

Yahoo Open Start Request Username ‘Beautiful’ is Not Active Again

Since last month it was announced that Yahoo will delete the Yahoo! username or ID is no longer active, many people are waiting for the arrival of this. Because, mostly inactive username is precisely deter others who want to use the name. Now, according to the announcement last month, Yahoo began to open up opportunities for those who want to get the username ‘pretty’.
Users who want to get the username ‘beautiful’ can not directly get the name. They should write the desired username in advance through a form benama Yahoo! Wish List. Yahoo provides five options that could be asked. If the first choice is not available, then the choice of the required reserves would then look for. Yahoo will provide notice of the availability of username via email in mid-August 2013.
“To get Yahoo! username you’ve always wanted, we set up a page where you can ask five top choices. If your first choice is not available, we will try to find other options of backup you have the content. In mid-August, you will receive email containing the username where available, as well as links to mengklaimnnya for 48 hours. Quite so, and it is yours, “wrote Dylan Casey, Senior Director, Platform Yahoo via its official blog.