6 de abril de 2012

Extra Points

Distributed and Parallel Systems
Extra Points
Questions and answers of the midterm exam.

The questions 1 to 5 are in Cecilia Urbina's blog.

6. How do the computers that form a cluster communicate with one another?
A cluster is communicated by a network connection. There are some types, for example the Ethernet is very common to communicate computers in a cluster, and can use protocols like TCP/IP or sometimes UDP. Another connection used in supercomputers is the Myrinet that use optical fiber cables.

7. What difficulties may arise if the machines that form a cluster are not all identical?
The difference in the architecture and also the resource that are available in the computer, because the execution of one thread can be different if the processor is slower than another, and delay all the execution.

8. What factors affect the number of threads that can be efficiently executed on a GPU?
The number of the processors and how many cores they have, and the memory that can be accessed.

9. Will a cluster always improve its performance if more machines are included into it?
No, because there is a point when you add more hardware and the performance stays equal.

10. Give an example of a critical section in a parallel algorithm.
When access a part of the memory that is used by another thread.

11. Why is deadlock harder to detect in a distributed system than in a single-machine system.
Because is difficult to know in what computer and which processor is the thread doing a deadlock.

12. Give an example of how, in general terms, to distribute sorting.
Break in parts the array to be sorting. MergeSort an QuickSort are good examples because we break in two parts and then break again, and each part is sorting independently and when they finish return the array sorted and mix with the result of the previous thread and sort this.

13. Give an example of how, specifically, to distribute matrix multiplication.
When the matrix is big for example 10x10, we can cut in 4 matrices of 5x5 and each thread make a multiplication.

14. Name some of the difficulties in detecting faces in a single photograph using a computing cluster.
For detect a face in an image using a cluster, we need to send a part of the simple image in each thread, and then returns if the particular region of the image is a face or not. The difficulty is that all the computers in the cluster needs the same classifier trained on example faces, and the image database is only in the server and all the threads wants to access at the same time.

15. Describe in pseudocode how to implement the dining philosophers in a distributed system.
I don't write a pseudocode but I write some ideas about how the dining philosophers can be distributed.
First of all, the server says what philosophers can eat, because it have the counting of forks.
Each processor can be a philosopher waiting for the forks.
When a philosopher have two forks can eat, or execute a program. If take too much time, the server request the forks.
The server provide the fork to a different processor.
The server needs to know how much time one processor has been waiting, for avoid starvation.

I would do questions 6 to 10, but the following 5 questions I didn't see in another blog, so I add questions 11-15.

1 comentario:

  1. Lovely. 10 extra points spread across the coming weeks of the lab as 3+3+3+1

    ResponderEliminar

Nota: solo los miembros de este blog pueden publicar comentarios.