Introduction to Multi-CPU Scheduling

This lesson ponders over the concepts highlighted in this chapter and briefs about​ the background of multi-CPU​ scheduling.

This chapter will introduce the basics of multiprocessor scheduling. As this topic is relatively advanced, it may be best to cover it after you have studied the topic of concurrency in some detail (i.e., the second major “easy piece” of the course).

After years of existence only in the high-end of the computing spectrum, multiprocessor systems are increasingly commonplace and have found their way into desktop machines, laptops, and even mobile devices. The rise of the multicore processor, in which multiple CPU cores are packed onto a single chip, is the source of this proliferation; these chips have become popular as computer architects have had a difficult time making a single CPU much faster without using (way) too much power. And thus we all now have a few CPUs available to us, which is a good thing, right?

Press + to interact

Of course, there are many difficulties that arise with the arrival of more than a single CPU. A primary one is that a typical application (i.e., some C program you wrote) only uses a single CPU; adding more CPUs does not make that single application run faster. To remedy this problem, you’ll have to rewrite your application to run in parallel, perhaps using threads (as discussed in great detail in the second piece of this course). Multi-threaded applications can spread work across multiple CPUs and thus run faster when given more CPU resources.

Beyond applications, a new problem that arises for the operating system is (not surprisingly!) that of multiprocessor scheduling. Thus far we’ve discussed a number of principles behind single-processor scheduling; how can we extend those ideas to work on multiple CPUs? What new problems must we overcome? And thus, our problem:

CRUX: HOW TO SCHEDULE JOBS ON MULTIPLE CPUs

How should the OS schedule jobs on multiple CPUs? What new problems arise? Do the same old techniques work, or are new ideas required?

Press + to interact

ASIDE: ADVANCED CHAPTERS

Advanced chapters require material from a broad swath of the course to truly understand, while logically fitting into a section that is earlier than said set of prerequisite materials. For example, this chapter on multiprocessor scheduling makes much more sense if you’ve first read the middle piece on concurrency; however, it logically fits into the part of the course on virtualization (generally) and CPU scheduling (specifically). Thus, it is recommended such chapters be covered out of order; in this case, after the second piece of the course.

Get hands-on with 1400+ tech skills courses.