• Complain

Simon Marlow - Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming

Here you can read online Simon Marlow - Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2013, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Simon Marlow Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming
  • Book:
    Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2013
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

If you have a working knowledge of Haskell, this hands-on book shows you how to use the languages many APIs and frameworks for writing both parallel and concurrent programs. Youll learn how parallelism exploits multicore processors to speed up computation-heavy programs, and how concurrency enables you to write programs with threads for multiple interactions.

Author Simon Marlow walks you through the process with lots of code examples that you can run, experiment with, and extend. Divided into separate sections on Parallel and Concurrent Haskell, this book also includes exercises to help you become familiar with the concepts presented:

  • Express parallelism in Haskell with the Eval monad and Evaluation Strategies
  • Parallelize ordinary Haskell code with the Par monad
  • Build parallel array-based computations, using the Repa library
  • Use the Accelerate library to run computations directly on the GPU
  • Work with basic interfaces for writing concurrent code
  • Build trees of threads for larger and more complex programs
  • Learn how to build high-speed concurrent network servers
  • Write distributed programs that run on multiple machines in a network

Simon Marlow: author's other books


Who wrote Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming? Find out the surname, the name of the author of the book and a list of all author's works by series.

Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Parallel and Concurrent Programming in Haskell
Simon Marlow
Beijing Cambridge Farnham Kln Sebastopol Tokyo Download from Wow eBook - photo 1

Beijing Cambridge Farnham Kln Sebastopol Tokyo
Download from Wow! eBook

Special Upgrade Offer

If you purchased this ebook directly from oreilly.com, you have the following benefits:

  • DRM-free ebooksuse your ebooks across devices without restrictions or limitations

  • Multiple formatsuse on your laptop, tablet, or phone

  • Lifetime access, with free updates

  • Dropbox syncingyour files, anywhere

If you purchased this ebook from another retailer, you can upgrade your ebook to take advantage of all these benefits for just $4.99. to access your ebook upgrade.

Please note that upgrade offers are not available from sample content.

Preface

As one of the developers of the Glasgow Haskell Compiler (GHC) for almost15 years, I have seen Haskell grow from a niche research languageinto a rich and thriving ecosystem. I spent a lot ofthat time working on GHCs support for parallelism and concurrency.One of the first things I did to GHC in 1997 was to rewrite itsruntime system, and a key decision we made at that time was to buildconcurrency right into the core of the system rather than making it anoptional extra or an add-on library. I like to think this decision was founded uponshrewd foresight, but in reality it had as much to do with thefact that we found a way to reduce the overhead of concurrency to nearzero (previously it had been on the order of 2%; weve always beenperformance-obsessed). Nevertheless, having concurrency benon-optional meant that it was always a first-class part of theimplementation, and Im sure that this decision was instrumental inbringing about GHCs solid and lightning-fast concurrencysupport.

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 wasdesigned for parallelism, the GUM system for running parallel Haskellprograms on multiple machines in a cluster, and the GRiP system: acomplete computer architecture designed for running parallelfunctional programs. All ofthese happened well before the current multicore revolution, and theproblem was that this was the time when Moores law was still givingus ever-faster computers. Parallelism was difficult to achieve, anddidnt seem worth the effort when ordinary computers were gettingexponentially faster.

Around 2004, we decided to build a parallel implementation of the GHCruntime system for running on shared memory multiprocessors, somethingthat had not been done before. This was just before the multicorerevolution. Multiprocessor machines were fairly common, but multicoreswere still around the corner. Again, Id like to think the decision totackle parallelism at this point was enlightened foresight, but it hadmore to do with the fact that building a shared-memory parallelimplementation was an interesting research problem and sounded likefun. Haskells purity was essentialit meant that we could avoidsome of the overheads of locking in the runtime system and garbagecollector, which in turn meant that we could reduce the overhead ofusing parallelism to a low-single-digit percentage. Nevertheless, ittook more research, a rewrite of the scheduler, and a new parallelgarbage collector before the implementation was really usable and ableto 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 ausable tool.

All of this research and implementation was great fun, but good-quality resources for teaching programmers how to use parallelism andconcurrency in Haskell were conspicuously absent. Over the lastcouple of years, I was fortunate to have had the opportunity to teach twosummer school courses on parallel and concurrent programming inHaskell: one at the Central European Functional Programming (CEFP) 2011 summer school in Budapest, and the other the CEA/EDF/INRIA 2012Summer School at Cadarache in the south of France. In preparing thematerials for these courses, I had an excuse to write some in-depthtutorial matter for the first time, and to start collecting goodillustrative examples. After the 2012 summer school I had about100 pages of tutorial, and thanks to prodding from one or two people(see the Acknowledgments), I decided to turn it into a book. At thetime, I thought I was about 50% done, but in fact it was probablycloser to 25%. Theres a lot to say! I hope you enjoy the results.

Audience

You will need a working knowledge of Haskell, which is not covered inthis book. For that, a good place to start is an introductory booksuch as Real World Haskell (OReilly), Programming in Haskell (Cambridge University Press), Learn You a Haskell for Great Good! (No Starch Press), or Haskell: The Craft of Functional Programming (Addison-Wesley).

How to Read This Book

The main goal of the book is to get you programming competently withParallel and Concurrent Haskell. However, as you probably know bynow, learning about programming is not something you can do by readinga book alone. This is why the book is deliberately practical: Thereare lots of examples that you can run, play with, and extend.Some of the chapters have suggestions for exercises you can tryout to get familiar with the topics covered in that chapter, and Istrongly recommend that you either try a few of these, or code up someof your own ideas.

cover frameworks thatwere developed in the last few years.

.

While the two parts are mostly independent from each other, the chapters should be read sequentially within each part. This isnt a referencebook; it contains running examples and themes that are developed acrossmultiple chapters.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic Used for emphasis, new terms, URLs, Unix commands and utilities, and file and directory names. Constant width Indicates variables, functions, types, parameters, objects, and other programming constructs.
Tip

This icon signifies a tip, suggestion, or a general note.

Caution

This icon indicates a trap or pitfall to watch out for, typicallysomething that isnt immediately obvious.

Code samples look like this:

timetable1.hs

search::(partial->Maybesolution)--Picture 2->(partial->[partial])->partial->[solution]

The heading gives the filename of the source file containing the codesnippet, which may be found in the sample code; see forhow to obtain the sample code. When there are multiple snippetsquoted from the same file, usually only the first will have thefilename heading.

There will often be commentary referring to individual lines inthe code snippet, which look like this.

Commands that you type into the shell look like this:

$ ./loggerhellobyelogger: stop

The $ character is the prompt, the command follows it, and the restof the lines are the output generated by the command.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming»

Look at similar books to Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming»

Discussion, reviews of the book Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.