I'm struggling to understand what happens when a sender receives a triple duplicate ACK from the receiver and what happens when a timeout occurs.
My understanding so far is that:
Upon a triple duplicate ACK: (1) set threshold to half of the size of the sender window, (2) set receiver window size to 1 MSS
I'm not really sure about what happens when a timeout occurs besides a retransmit.
I am working on this problem listed below. If someone could help me confirm what happens when a triple ACK occurs and when a timeout occurs it would be much appreciated.
Consider a TCP connection has an initial Threshold of 24 kB and a
Maximum Segment Size (MSS) of 4 kB. The receiver advertised window is
40 kB. Suppose all transmission attempts are successful except for a
triple duplicate ACK received (for the same previously transmitted
data) on the number 7 transmission and a timeout at transmission
number 12. The first transmission attempt is number 0. Find the size
of the sender’s congestion window for the first 18 transmission
attempts (number 0-17) assuming the sender’s TCP implementation is
using the slow-start congestion control scheme
Trans. # Sender wnd. (kb) Threshold (kb) Receiver wnd. (kb)
0 4 24 40
1 8 24 40
2 16 24 40
3 24 24 40
4 28 24 40
5 32 24 40
6 4 16 40
7 8 16 40
8 12 16 40
9 16 16 40
10 20 16 40
11 24 16 40
12 40
13 40
14 40
15 40
16 40
17 40
For future readers, the correct answer for TCP Reno is below:
Upon a triple duplicate ACK, the threshold is set to half of the sender window size and the sender window size is halved.
Upon a timeout, the threshold is set to half of the sender window size and the sender window is reset to 1 MSS and uses slow start.
For TCP Tahoe:
Upon a triple duplicate ACK the threshold is sent to half of the sender window size and the sender window size is reset to 1 MSS. Slow start is then used until the sender hits the threshold.
Upon a timeout, Tahoe and Reno perform the same function.
The correct answer: (for TCP Reno)
Trans. # Sender wnd. (kb) Threshold (kb) Receiver wnd. (kb)
0 4 24 40
1 8 24 40
2 16 24 40
3 24 24 40
4 28 24 40
5 32 24 40
6 36 24 40
7 40 24 40 <- tripple duplicate ack after attempting to transmit
8 20 20 40
9 24 20 40
10 28 20 40
11 32 20 40
12 36 20 40 <- timeout after attempting to transmit
13 4 18 40
14 8 18 40
15 16 18 40
16 18 18 40
17 22 18 40
Related
I have a data that looks like this
I need something like this
Thanks in advance
It is not entirely clear what you are wanting to do, but when you want to look across variables in a data set Arrays are your best friend. After reviewing the documentation, look for any of the great papers posted on how to use Arrays.
Update your question for a more specific response.
Please type out your data in the future, ideally as shown below. This shows how you can capture a streak.
data have;
input Name A0-A10 MAX;
cards;
1 10 9 12 12 12 12 12 11 12 12 9 12
2 45 67 23 67 9 45 67 67 67 67 67 67
3 12 14 1 16 14 16 16 16 16 16 16 16
4 14 56 7 68 94 35 67 342 252 253 35 342
;
;
;
run;
data want;
set have;
*declare array to loop;
array A(0:10) A0-A10;
*use a counter to keep track of consecutive values;
counter=0;
*use a variable to keep track of the largest streak;
max_streak=0;
*loop start;
do i=0 to 10;
*if value matches maximum increase the counter;
if A(i)=max then
counter+1;
*if streak is larger than the largest streak replace the largest streak;
if counter>max_streak then
max_streak=counter;
*set streak back to 0 if value does not match maximum;
if A(i) ne max then
counter=0;
end;
run;
data have;
input Name A0-A10 MAX;
datalines;
1 10 9 12 12 12 12 12 11 12 12 9 12
2 45 67 23 67 9 45 67 67 67 67 67 67
3 12 14 1 16 14 16 16 16 16 16 16 16
4 14 56 7 68 94 35 67 342 252 253 35 342
;
data want(drop = c);
set have;
array a a:;
i = 0; c = 0;
do over a;
if a = max then c + 1;
if c > i then i = c;
if a ne max then c = 0;
end;
run;
I have a dataset that includes individual events across a time period. some example records as below, each individual has 2-4 records observed within a period. The event# is ordered by time, however, the same event# did not occur at the same date (A's #1 event occurs on 6/1, while C's #1 event happens on 6/3). Should I analyze the data as an unbalanced panel data with 2 dimensions individual and event #(i.e, the time dimension)? thanks. If not, how should I treat this data? thanks.
obs
ind
event#
date
var1
y
1
A
1
6/1
11
33
2
A
2
6/4
12
23
3
A
3
6/5
13
32
4
A
4
6/5
14
55
5
B
1
6/1
15
44
6
B
2
6/2
18
54
7
C
1
6/3
15
22
8
C
2
6/3
29
55
9
C
3
6/6
31
23
10
D
1
6/3
13
45
11
D
2
6/5
2
12
I have a vector containing 9000 integer elements, where each group of 9 has 3 sub-groups that I'd like to separate out, resulting in a matrix with the shape 3 1000 3. Here's what I did:
⎕IO←0
m←(9÷⍨≢data) 9⍴data
a←m[;0 1 2]
b←m[;3 4 5]
c←m[;6 7 8]
d←↑a b c
which does what I want -- but can I shape the vector directly?
Solution
1 0 2 ⍉ (9÷⍨≢data) 3 3 ⍴ data
Explanation
By using ⍳45 as placeholder data, we can see what is intended:
data ← ⍳45
a←m[;0 1 2]
b←m[;3 4 5]
c←m[;6 7 8]
d←↑a b c
d
0 1 2
9 10 11
18 19 20
27 28 29
36 37 38
3 4 5
12 13 14
21 22 23
30 31 32
39 40 41
6 7 8
15 16 17
24 25 26
33 34 35
42 43 44
The final shape will clearly be 3 (9÷⍨≢data) 3, but we are filling one row from each layer first, then the second row from each layer, and so on. Compare this to the normal way of filling; all rows of the first layer, then all the rows of the second layer, and so on:
3 (9÷⍨≢data) 3⍴data
0 1 2
3 4 5
6 7 8
9 10 11
12 13 14
15 16 17
18 19 20
21 22 23
24 25 26
27 28 29
30 31 32
33 34 35
36 37 38
39 40 41
42 43 44
In other words, our job is to swap the filling order of the first two axes. To do this, we list the axis lengths in the order we want them filled:
(9÷⍨≢data) 3 3⍴data
0 1 2
3 4 5
6 7 8
9 10 11
12 13 14
15 16 17
18 19 20
21 22 23
24 25 26
27 28 29
30 31 32
33 34 35
36 37 38
39 40 41
42 43 44
Now we need to swap the first two axes. This is possible using the dyadic transpose function ⍉ which (for our use case) can be thought of as the "reorder axes" function. The left argument is an array of where you want the corresponding axis to go (first element defines the final location of the first axis and so on). While the normal indices of the axes are 0 1 2 we can swap the first two axes with 1 0 2.
Thus 1 0 2 ⍉ (9÷⍨≢data) 3 3 ⍴ data takes our (9÷⍨≢data) 3 3 shape and puts it into the desired shape of 3 (9÷⍨≢data) 3.
d ≡ 1 0 2 ⍉ (9÷⍨≢data) 3 3 ⍴ data
1
I'm playing around with evrouter and I'm getting an error when trying to generate a button press for button number greater than 10. My Logitech Mouse reports 20 buttons but the Virtual core XTEST pointer only reports 10.
$ xinput get-button-map "Logitech Performance MX"
1 2 3 4 5 6 7 8 9 2 11 12 2 14 15 16 17 18 19 20
$ xinput get-button-map "Virtual core XTEST pointer"
1 2 3 4 5 6 7 8 9 10
How can I increase the number of buttons for the XTEST pointer?
(X.Org X Server 1.19.2)
So in SPARC V8, the destination register (rd) occupies 5 bits of the instruction (25th-29th). My question is: is there a document with map associating each register name, say %i1, to its respective 5-bit binary, say, 01010? I can't find such thing...
Register numbers 0-7 are %g0-%g7, 8-15 are %o0-%o7, 16-23 are %l0-%l7 and 24-31 are %i0-%i7
http://www.gaisler.com/doc/sparcv8.pdf
Note that Sparc uses register windows.... so you are addressing the register window not the register file itself.
The data formats are defined on page 18 of the Sparc V8 manual. Sparc uses LSB 0 bit notation. The order of the register window locations names are on page 24.
A byte for instance is 7 6 5 4 3 2 1 0 with 0 being least significant.
This in turn means the instructions map as follows.
0 00000 %g0
1 00001 %g1
2 00010 %g2
3 00011 %g3
4 00100 %g4
5 00101 %g5
6 00110 %g6
7 00111 %g7
8 01000 %o0
9 01001 %o1
10 01010 %o2
11 01011 %o3
12 01100 %o4
13 01101 %o5
14 01110 %o6
15 01111 %o7
16 10000 %l0
17 10001 %l1
18 10010 %l2
19 10011 %l3
20 10100 %l4
21 10101 %l5
22 10110 %l6
23 10111 %l7
24 11000 %i0
25 11001 %i1
26 11010 %i2
27 11011 %i3
28 11100 %i4
29 11101 %i5
30 11110 %i6
31 11111 %i7