in today's computers, moving data to and from main memory consumes so much time and energy that
1 have their own small, high-speed memory banks, known as "caches," which store frequently used data. traditionally, managing the caches has required fairly simple algorithms that can be hard-wired into the chips. in the 21st century, however, in order to meet consumers' expectations for
2 increasing computational power, chipmakers have had to begin equipping their chips with more and more cores, or processing units. and as cores
3(增殖,扩散), cache management becomes much more difficult.
daniel sanchez, an assistant professor in mit's department of electrical engineering and computer science, believes that it's time to turn cache management over to software. this week, at the international conference on parallel architectures and
4 techniques, sanchez and his student nathan beckmann presented a new system,
5 6, that monitors the computations being performed by a multicore chip and manages cache memory accordingly.
in experiments simulating the execution of hundreds of applications on 16- and 64-core chips, sanchez and beckmann found that jigsaw could speed up execution by an average of 18 percent -- with more than twofold improvements in some cases -- while actually reducing energy consumption by as much as 72 percent. and sanchez believes that the performance improvements offered by jigsaw should only increase as the number of cores does.
location, location, location
in most multicore chips, each core has several small, private caches. but there's also what's known as a last-level cache, which is shared by all the cores. "that cache is on the order of 40 to 60 percent of the chip," sanchez says. "it is a significant fraction of the area because it's so crucial to performance. if we didn't have that cache, some applications would be an order of magnitude slower."
7, the last-level cache is broken into separate memory banks and distributed across the chip; for any given core, accessing the nearest bank takes less time and consumes less energy than accessing those farther away. but because the last-level cache is shared by all the cores, most chips assign data to the banks
8.
jigsaw, by contrast, monitors which cores are accessing which data most frequently and, on the fly, calculates the most efficient assignment of data to cache banks. for instance, data being used exclusively by a single core is stored near that core, whereas data that all the cores are accessing with equal frequency is stored near the center of the chip, minimizing the average distance it has to travel.
jigsaw also varies the amount of cache space
9 to each type of data, depending on how it's accessed. data that is reused frequently receives more space than data that is accessed infrequently or only once.
in principle,
10 cache space allocations requires evaluating how the chip as a whole will perform given every possible allocation of cache space to all the computations being performed on all the cores. that calculation would be prohibitively time-consuming, but by ignoring some particularly
11 12 that are extremely unlikely to arise in practice, sanchez and beckmann were able to develop an approximate
13 algorithm that runs
14 even as the number of cores and the different types of data increases dramatically.