Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Reti di calcolatori > [Es] - Domanda 3
Pages (3): [1] 2 3 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
[Es] - Domanda 3

Come si fa?

"Un certo servizio che chiameremo DCEP (Delayed Character Echo Protocol) può essere descritto informalmente come segue: un client invia un byte B a un server DCEP mediante un datagram UDP; il server riceve B; il server si mette in pausa per 3 secondi; il server invia B al client mediante un secondo datagram UDP; il client riceve B. Ora, si immagini che il servizio DCEP venga erogato da un server S sequenziale (o iterativo, o monothread in Java, o monoprocesso in C), e che dapprima un client C1, e successivamente un client C2, richiedano a S il servizio DCEP servendosi della porta P (la stessa per entrambi). Supponendo che i tempi di trasmissione e di propagazione dei datagram UDP siano trascurabili, e che le richieste di C1 e C2 siano distanziate tra loro di un secondo (1s), dopo quanti secondi dalla ricezione della richiesta di C1 il server S riuscirà a completare l’erogazione del servizio richiesta da C2? Come cambia (se cambia) la risposta, nel caso in cui C1 e C2 dovessero rivolgere le loro richieste sempre a S, ma questa volta servendosi – rispettivamente – di due diverse porte P1 e P2? Si giustifichino tutte le risposte."

__________________
Il DSY su Facebook!!!

31-01-2004 10:25
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

duqneu sono in dubbio sul ragionamento da fare:

1)C1 chiede servizio al Srv
Srv riceve il servizio
Srv fornisce il servizio a C1
Srv si mette in pausa x 3 secondi

oppure

2)C1 chiede il servizio al Srv
passa un secondo
C2 chiede servizio al Srv

Srv riceve domanda da C1
srv riceve domanda da C2

si mette in pausa per 3 secondi
Srv risponde a C1

e si mette in pausa x 3 sec
Srv risponde a C2

non è 6?????????????????? (chiede C2 dopo quanto viene servito)

__________________
Il DSY su Facebook!!!

Last edited by Lunik on 31-01-2004 at 10:50

31-01-2004 10:48
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ne\'79
.amico.

User info:
Registered: Jul 2002
Posts: 27 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 17:04:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Per me è giusta la risposta 6 secondi.
In quanto il client C2 e' già in coda sulla porta P mentre il server eroga il servizio a C1.

Il problema di questo esercizio è la seconda parte : cosa cambia se si utilizzano 2 porte diverse?
Se il server è iterativo non dovrebbe essere la stessa cosa?

31-01-2004 11:01
Click Here to See the Profile for ne\'79 Click here to Send ne\'79 a Private Message Find more posts by ne\'79 Add ne\'79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

uhm se le due domnde dei client arrivano allo stesso tempo su porte diverse... il Server a chi risponde x primo?

Server sequenziale:
"Un server sequenziale elabora una richiesta per volta ed accoda le altre."

Da questo link:
http://lia.deis.unibo.it/Courses/Re...Socket/SO15.htm

quindi prima risponde a C1, poi risponde a C2..

ha ragione Imation... 1+3+3 = 7!

__________________
Il DSY su Facebook!!!

Last edited by Lunik on 31-01-2004 at 11:18

31-01-2004 11:09
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ne\'79
.amico.

User info:
Registered: Jul 2002
Posts: 27 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 17:04:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Questo è un caso molto particolare penso che ne scelga una a caso.
Nell'esempio però arriva prima la richiesta del client C1. Sugli appunti ho scritto che un server iterativo esegue un servizio alla volta, però se intendiamo il numero di porta come un servizio allora probabilmente il server eseguirà 2 servizi (che sono in realtà lo stesso!!!). quindi il Client2 riceverà la risposta dopo 4 secondi dalla richiesta di C1.

Sarei proprio curioso di sapere qual è la risposta giusta?
Cosa dici se mandiamo una e-mail al prof ce lo dice?
O Ormai è tardi?

31-01-2004 11:19
Click Here to See the Profile for ne\'79 Click here to Send ne\'79 a Private Message Find more posts by ne\'79 Add ne\'79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ne\'79
.amico.

User info:
Registered: Jul 2002
Posts: 27 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 17:04:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

No 7 per me non può proprio essere anche perchè tra C2 è già in coda mentre il Server sta eseguendo il processo quindi la somma e' 3 + 3 = 6 !!!

31-01-2004 11:22
Click Here to See the Profile for ne\'79 Click here to Send ne\'79 a Private Message Find more posts by ne\'79 Add ne\'79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

intnedi x la 2a parte del'esercizio o la prima? ho modificato il mio post di prima aggiungendo che Imation aveva detto giusto... (7 secondi)

x la 2a parte: due porte, due servizi. gli arriva prima il servizio chiesto da C1 quindi serve prima C1 (e passano 3 secondi). Poi passa a C2 (son passati 4 secondi... 1+3)... si ferma x 3 sec...quindi mi sa che son sempre 7!

__________________
Il DSY su Facebook!!!

31-01-2004 11:23
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si ma tra C1 e C2 passa UN secondo... dove lo metti???????

__________________
Il DSY su Facebook!!!

31-01-2004 11:24
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ne\'79
.amico.

User info:
Registered: Jul 2002
Posts: 27 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 17:04:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non lo metto perchè la domanda chiede dopo quanti secondi dalla richiesta di C1 viene servito C2 di conseguenza mentre il server sta servendo C1 c2 si accoda quel secondo non viene perso !!!

31-01-2004 11:28
Click Here to See the Profile for ne\'79 Click here to Send ne\'79 a Private Message Find more posts by ne\'79 Add ne\'79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

x me non è così.... deve esser considerato...
scusa...
C1 chiede
passa un sec
(nel frattempo il server elabora x C1)
C2 chiede
nel frattempo il server si mette in pausa x 3 secondi e risponde a C1
il server si mette in pausa x altri 3 sec e risponde a C2

1+ 3+3 = 7

x me fila il discorso......

boh!

__________________
Il DSY su Facebook!!!

31-01-2004 11:32
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
mimasuper
.consigliere.

User info:
Registered: Sep 2002
Posts: 146 (0.02 al dì)
Location: vic. Milano
Corso: com.dig.
Anno: III anno
Time Online: 2 Days, 13:24:04: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma mentre elabora la richiesta di C1 impiegando 3 secondi, riceve la richiesta di C2, quindi il ritardo di un secondo non lo avverte, perchè quando ha finito di erogare il servizio a C1 c'è già in coda la richiesta di C2....Giusto?
Quindi dovrebbe fare 6 secondi!?!?!
SERVER
tempo:1 riceve rich. C1 --> elabora richiesta C1
tempo:2 riceve rich.C2 ma sta elaborando C1
tempo:3 sta elaborando C1
Tempo4:ha finito con C1 e ha già C2 in coda, inizia a elaborare C2
tempo5:elabora C2
tempo 6:finisce C2
Che casino:?

31-01-2004 11:39
Click Here to See the Profile for mimasuper Click here to Send mimasuper a Private Message Find more posts by mimasuper Add mimasuper to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si ma dopo quanto riceve C2???? dopo un secondo anche se lui elabora C1...

caxxarola che macello!!!

x la 2a parte? Avete idee???????????

__________________
Il DSY su Facebook!!!

31-01-2004 11:41
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
imation
.illuminato.

User info:
Registered: May 2002
Posts: 158 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: 2
Time Online: 3 Days, 1:19:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Lunik
si ma dopo quanto riceve C2???? dopo un secondo anche se lui elabora C1...

caxxarola che macello!!!

x la 2a parte? Avete idee???????????


esatto ;)

anche perchè la domanda richiede : "dopo quanti secondi dalla ricezione di C1 ... "

bisogna considerare evidentemente anche quel secondo di ritardo

31-01-2004 11:49
Click Here to See the Profile for imation Click here to Send imation a Private Message Find more posts by imation Add imation to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.65 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

:lode:

e x la 2a parte? Usano porte diverse... hai idee???

__________________
Il DSY su Facebook!!!

31-01-2004 11:50
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ne\'79
.amico.

User info:
Registered: Jul 2002
Posts: 27 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 1 Day, 17:04:54 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Imation allora secondo te e' 6 o 7?

31-01-2004 11:56
Click Here to See the Profile for ne\'79 Click here to Send ne\'79 a Private Message Find more posts by ne\'79 Add ne\'79 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 05:17.    Post New Thread    Post A Reply
Pages (3): [1] 2 3 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.104 seconds (58.11% PHP - 41.89% MySQL) con 27 query.