Strumenti Utente

Strumenti Sito


magistraleinformaticanetworking:spm:farmposix

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisioneRevisione precedente
Prossima revisione
Revisione precedente
magistraleinformaticanetworking:spm:farmposix [22/03/2011 alle 17:52 (14 anni fa)] Marco Daneluttomagistraleinformaticanetworking:spm:farmposix [22/03/2011 alle 18:02 (14 anni fa)] (versione attuale) – [Task farm (POSIX TCP/IP)] Marco Danelutto
Linea 1: Linea 1:
 ===== Task farm (POSIX TCP/IP) ===== ===== Task farm (POSIX TCP/IP) =====
  
 +//(The code presented here does not pretend to be efficient, nor completely correct. It has been designed with the aim of illustrating several of the problems related to the implementation of fairly simple parallel applications)//
 ==== Version 1 ==== ==== Version 1 ====
 This version uses two servers (emitter and collector). Emitter accepts requests from workers and delivers tasks to be executed. Collector accepts results from workers and print them out on the screen. Workers open a separate connection with both emitter and collector for each task. The two connections are closed after processing the task and delivering the result. Tasks and results are (positive) integers. Emitter and worker termination is handled correctly. Collector does not terminate (suggestion: each worker should propagate EOS to collector. Collector should count EOS and terminate after receiving EOS from all the workers).  This version uses two servers (emitter and collector). Emitter accepts requests from workers and delivers tasks to be executed. Collector accepts results from workers and print them out on the screen. Workers open a separate connection with both emitter and collector for each task. The two connections are closed after processing the task and delivering the result. Tasks and results are (positive) integers. Emitter and worker termination is handled correctly. Collector does not terminate (suggestion: each worker should propagate EOS to collector. Collector should count EOS and terminate after receiving EOS from all the workers). 
Linea 230: Linea 231:
         return 0;          return 0; 
 } }
 +</code>
 +
 +=== Makefile ===
 +<code makefile makefile>
 +CC = gcc 
 +CFLAGS = 
 +TARGETS = emitter collector worker
 +
 +all:    $(TARGETS)
 +
 +clean:  
 +        rm -f $(TARGETS)
 +
 +worker:         worker.c
 +        $(CC) -o worker $(CFLAGS) worker.c
 +
 +collector:      collector.c
 +        $(CC) -o collector $(CFLAGS) collector.c
 +
 +emitter:        emitter.c
 +        $(CC) -o emitter $(CFLAGS) emitter.c
 +
 +dist:   $(SOURCES)
 +        rsync -avz ../FarmSocket ottavinareale:
 +        rsync -avz ../FarmSocket backus:Downloads/
 +        rsync -avz ../FarmSocket pianosau: 
 </code> </code>
  
magistraleinformaticanetworking/spm/farmposix.1300816343.txt.gz · Ultima modifica: 22/03/2011 alle 17:52 (14 anni fa) da Marco Danelutto

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki