CS405 Parallel Computing BS-Computer Science (SSUET)

shrewdnessfreedomSoftware and s/w Development

Dec 2, 2013 (3 years and 6 months ago)

71 views

CS405 Parallel
Computing



BS
-
Computer Science
(SSUET)



Lecturer: Engr. Muhammad Nadeem

Page
1



Reasoning Question



Q1

Why have parallel processing programs been so much harder to develop than sequential

programs?

Ans

The first reason is that you
must
get better performance and
efficiency from a parallel
processing program on a multiprocessor; otherwise, you would just use a sequential program
on a uniprocessor, as programming is easier. In fact, uniprocessor design techniques such as
superscalar and out
-
of
-
order execution take a
dvantage of instruction
-
level parallelism normally
without the involvement of the programmer.

Such innovations reduced the demand for
rewriting programs for multiprocessors, since programmers could do nothing and yet their
sequential programs would run fas
ter on new computers.



Q2

Why is it difficult to write parallel processing programs that are fast, especially as the
number of processors increases?

Ans

We used the analogy of eight reporters trying to write a single story in hopes of doing the work
ei
ght times faster. To succeed, the task must be broken into eight equal
-
sized pieces, because
otherwise some reporters would be idle while waiting for the ones with larger pieces to finish.
Another performance danger would be that the reporters would spend
too much time
communicating with each other instead of writing their pieces of the story. For both this
analogy and parallel programming, the challenges include scheduling, load balancing, time for
synchronization, and overhead for communication between th
e parties. The challenge is stiffer
with the more reporters for a newspaper story and the more processors for parallel
programming.



Q3

Why we move toward multicore systems?


Ans

The main reason is scalability. As we increase the number of processors
to enhance
performance, multicore systems allow limiting power consumption and interprocessor
communication overhead. A Multicore system can be scaled by adding more CPU cores and
adjusting the interconnection network. More system programming work has to b
e done to be
able to utilize the increased resources. It is one thing to increase the number of CPU resources.
It is another to be able to schedule all of them to do useful tasks.




Q4

Why fine gained multithreading potentially faster than
coarse
-
grained

multithreading?


Ans

In parallel computer processing, the term refers to how tasks are divided up.

Fine
-
grained
parallel processing

divides a task into a large number of smaller tasks, usually of short
duration, while coarse
-
grained

paralle
l processing has larger, longer tasks. Finer

granularity
increases the amount of work that can be done simultaneously and so is potentially faster, but
at the price of requiring more resources for communication between processors.