Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 20 Introduction to Multiprogramming

CHAPTER 20
INTRODUCTION TO
MULTIPROGRAMMING

by Mike McShaffry

image

The general term for creating software that can figuratively or actually run in multiple, independent pieces simultaneously is multiprogramming.

There are few subjects in programming as tricky as this. It turns out to be amazingly simple to get multiple threads chewing on something interesting, like calculating π to 1,000,000 digits. The difficulty comes in getting each of these jobs to play nicely with each other’s memory and getting them to send information to each other so that the results of their work can be put to good use.

The code you will learn in this chapter will work on single or multiprocessor Windows systems, but it is easy enough to port to others. The concepts you will learn are also portable to any system that has threading built into the operating system.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial