If you have access to a multiprocessor system write a


If two processes use a pipe to exchange a large amount of data on a multiprocessor system, the communication should be faster if the processes run on the same CPU than if they run on different CPUs. The reason is that when the two processes run on the same CPU, the pipe data will be more quickly accessed because it can remain in that CPU's cache. By contrast, when the processes run on separate CPUs, the benefits of the CPU cache are lost. If you have access to a multiprocessor system, write a program that uses sched_setaffinity() to demonstrate this effect, by forcing the processes either onto the same CPUs or onto different CPUs. (Chapter 44 describes the use of pipes.)

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: If you have access to a multiprocessor system write a
Reference No:- TGS01402506

Expected delivery within 24 Hours