●° Optimizing Stateless Servers Filename:X Offset: 512 Buffer for file x Buffer pointer: Starting at byte 512 Hash(ip, port) Filename: Y Buffer for file y Offset 1024 Buffer pointer: Starting at byte 1024 16 SIE, NTUT, Taiwan
16 CSIE, NTUT, Taiwan Optimizing Stateless Servers Filename: Y Offset 1024 Buffer pointer: Filename: X Offset: 512 Buffer pointer: Buffer for file X Starting at byte 512 Buffer for file Y Starting at byte 1024 Hash(ip, port)
... Optimizing Stateless Servers o Improvement can be achieved when all the assumptions meet o Problem arises when the client programs fails o Consider the situation that the client crashes ● Buffer will be full o Adjustment can be done by least recentl used (lrurule for maintaining the hash table ● Thrashing occurs SIE, NTUT, Taiwan
17 CSIE, NTUT, Taiwan Optimizing Stateless Servers Improvement can be achieved when all the assumptions meet Problem arises when the client programs fails ⚫ Consider the situation that the client crashes ⚫ Buffer will be full Adjustment can be done by least recently used (LRU) rule for maintaining the hash table ⚫ Thrashing occurs
●。 Optimizing Stateless Servers a programmer must be extremely careful when optimizing a stateless server because managing small amounts of state information can consume resources if clients crash and reboot frequently or if the underlying network duplicates or delay messages 18 SIE NTUT. Taiwan
18 CSIE, NTUT, Taiwan Optimizing Stateless Servers A programmer must be extremely careful when optimizing a stateless server because managing small amounts of state information can consume resources if clients crash and reboot frequently or if the underlying network duplicates or delay messages