\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1] %uncomment if require: \path (0,300); %set diagram left start at 0, and has height of 300 %Shape: Rectangle [id:dp1659927180988856] \draw (106,21) -- (145.43,21) -- (145.43,61) -- (106,61) -- cycle ; %Shape: Rectangle [id:dp60162597566272] \draw (111.43,145) -- (111.43,203.29) -- (90.71,203.29) -- (90.71,145) -- cycle ; %Shape: Rectangle [id:dp00028539200901533945] \draw (142.71,144) -- (142.71,203.29) -- (121.71,203.29) -- (121.71,144) -- cycle ; %Shape: Rectangle [id:dp019176495354326972] \draw (174.43,184.26) -- (174.43,203.11) -- (153.14,203.11) -- (153.14,184.26) -- cycle ; %Shape: Circle [id:dp7790209479077526] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (276,170.71) .. controls (276,168.66) and (277.66,167) .. (279.71,167) .. controls (281.77,167) and (283.43,168.66) .. (283.43,170.71) .. controls (283.43,172.77) and (281.77,174.43) .. (279.71,174.43) .. controls (277.66,174.43) and (276,172.77) .. (276,170.71) -- cycle ; %Shape: Circle [id:dp7009203011691245] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (286.43,170.71) .. controls (286.43,168.66) and (288.09,167) .. (290.14,167) .. controls (292.19,167) and (293.86,168.66) .. (293.86,170.71) .. controls (293.86,172.77) and (292.19,174.43) .. (290.14,174.43) .. controls (288.09,174.43) and (286.43,172.77) .. (286.43,170.71) -- cycle ; %Shape: Circle [id:dp13342086511975615] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (296.86,170.71) .. controls (296.86,168.66) and (298.52,167) .. (300.57,167) .. controls (302.62,167) and (304.29,168.66) .. (304.29,170.71) .. controls (304.29,172.77) and (302.62,174.43) .. (300.57,174.43) .. controls (298.52,174.43) and (296.86,172.77) .. (296.86,170.71) -- cycle ; %Shape: Rectangle [id:dp5447259154641135] \draw (153.43,145.43) -- (174.43,145.43) -- (174.43,158.37) -- (153.43,158.37) -- cycle ; %Shape: Rectangle [id:dp9780910526987703] \draw (153.43,158.37) -- (174.43,158.37) -- (174.43,171.32) -- (153.43,171.32) -- cycle ; %Shape: Rectangle [id:dp9823297574958101] \draw (153.43,171.32) -- (174.43,171.32) -- (174.43,184.26) -- (153.43,184.26) -- cycle ; %Shape: Rectangle [id:dp26427025317978536] \draw (186,23) -- (225.43,23) -- (225.43,63) -- (186,63) -- cycle ; %Shape: Rectangle [id:dp7685803476832467] \draw (202.43,145) -- (202.43,203.29) -- (181.71,203.29) -- (181.71,145) -- cycle ; %Shape: Rectangle [id:dp5393850523964543] \draw (233.71,171.41) -- (233.71,203.29) -- (212.71,203.29) -- (212.71,171.41) -- cycle ; %Shape: Rectangle [id:dp06125322053208593] \draw (265.43,184.26) -- (265.43,203.11) -- (244.14,203.11) -- (244.14,184.26) -- cycle ; %Shape: Rectangle [id:dp210427247172708] \draw (244.43,145.43) -- (265.43,145.43) -- (265.43,158.37) -- (244.43,158.37) -- cycle ; %Shape: Rectangle [id:dp4712939573626067] \draw (244.43,158.37) -- (265.43,158.37) -- (265.43,171.32) -- (244.43,171.32) -- cycle ; %Shape: Rectangle [id:dp9796535632094827] \draw (244.43,171.32) -- (265.43,171.32) -- (265.43,184.26) -- (244.43,184.26) -- cycle ; %Shape: Rectangle [id:dp6920491695751174] \draw (212.71,145.52) -- (233.71,145.52) -- (233.71,158.46) -- (212.71,158.46) -- cycle ; %Shape: Rectangle [id:dp9224042481550583] \draw (212.71,158.46) -- (233.71,158.46) -- (233.71,171.41) -- (212.71,171.41) -- cycle ; %Shape: Rectangle [id:dp12096171177736381] \draw (93,82.86) -- (118.2,82.86) -- (118.2,104) -- (93,104) -- cycle ; %Shape: Rectangle [id:dp298331898093555] \draw (118.2,82.86) -- (143.4,82.86) -- (143.4,104) -- (118.2,104) -- cycle ; %Shape: Rectangle [id:dp41953486075473] \draw (143.4,82.86) -- (168.6,82.86) -- (168.6,104) -- (143.4,104) -- cycle ; %Shape: Rectangle [id:dp7046873368993529] \draw (168.6,82.86) -- (193.8,82.86) -- (193.8,104) -- (168.6,104) -- cycle ; %Shape: Rectangle [id:dp6252678926497113] \draw (193.8,82.86) -- (219,82.86) -- (219,104) -- (193.8,104) -- cycle ; %Shape: Rectangle [id:dp4979567338840891] \draw (219,82.86) -- (244.2,82.86) -- (244.2,104) -- (219,104) -- cycle ; %Straight Lines [id:da6099834178635517] \draw (104.2,99) -- (100.37,143.01) ; \draw [shift={(100.2,145)}, rotate = 274.97] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da6779754089981487] \draw (135.2,98) -- (131.37,142.01) ; \draw [shift={(131.2,144)}, rotate = 274.97] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da6442265344724993] \draw (156,93.43) -- (189.09,143.33) ; \draw [shift={(190.2,145)}, rotate = 236.45] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da006839088937779403] \draw (178.43,99.43) -- (164.8,143.09) ; \draw [shift={(164.2,145)}, rotate = 287.34] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da0675200137451315] \draw (206.71,99.52) -- (223.48,143.13) ; \draw [shift={(224.2,145)}, rotate = 248.97] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da4849729759948771] \draw (231.6,93.43) -- (254.19,150.04) ; \draw [shift={(254.93,151.9)}, rotate = 248.25] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Curve Lines [id:da03959106193360351] \draw (93,82.86) .. controls (96.2,60.6) and (127.2,84.6) .. (126.2,60.6) ; %Curve Lines [id:da6283016522283285] \draw (168.6,82.86) .. controls (166.2,62.6) and (127.2,84.6) .. (126.2,60.6) ; %Curve Lines [id:da1266417207786419] \draw (168.6,82.86) .. controls (169.2,58.6) and (206.2,85.6) .. (205.2,63.6) ; %Curve Lines [id:da007446453026779265] \draw (244.2,82.86) .. controls (244.8,58.6) and (206.2,85.6) .. (205.2,63.6) ; %Shape: Circle [id:dp2807401862026926] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (253,93.71) .. controls (253,91.66) and (254.66,90) .. (256.71,90) .. controls (258.77,90) and (260.43,91.66) .. (260.43,93.71) .. controls (260.43,95.77) and (258.77,97.43) .. (256.71,97.43) .. controls (254.66,97.43) and (253,95.77) .. (253,93.71) -- cycle ; %Shape: Circle [id:dp7342173238414365] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (263.43,93.71) .. controls (263.43,91.66) and (265.09,90) .. (267.14,90) .. controls (269.19,90) and (270.86,91.66) .. (270.86,93.71) .. controls (270.86,95.77) and (269.19,97.43) .. (267.14,97.43) .. controls (265.09,97.43) and (263.43,95.77) .. (263.43,93.71) -- cycle ; %Shape: Circle [id:dp5314606969014675] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (273.86,93.71) .. controls (273.86,91.66) and (275.52,90) .. (277.57,90) .. controls (279.62,90) and (281.29,91.66) .. (281.29,93.71) .. controls (281.29,95.77) and (279.62,97.43) .. (277.57,97.43) .. controls (275.52,97.43) and (273.86,95.77) .. (273.86,93.71) -- cycle ; %Shape: Circle [id:dp9220532132358463] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (242,41.71) .. controls (242,39.66) and (243.66,38) .. (245.71,38) .. controls (247.77,38) and (249.43,39.66) .. (249.43,41.71) .. controls (249.43,43.77) and (247.77,45.43) .. (245.71,45.43) .. controls (243.66,45.43) and (242,43.77) .. (242,41.71) -- cycle ; %Shape: Circle [id:dp8147273883297732] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (252.43,41.71) .. controls (252.43,39.66) and (254.09,38) .. (256.14,38) .. controls (258.19,38) and (259.86,39.66) .. (259.86,41.71) .. controls (259.86,43.77) and (258.19,45.43) .. (256.14,45.43) .. controls (254.09,45.43) and (252.43,43.77) .. (252.43,41.71) -- cycle ; %Shape: Circle [id:dp04583504383039805] \draw [fill={rgb, 255:red, 0; green, 0; blue, 0 } ,fill opacity=1 ] (262.86,41.71) .. controls (262.86,39.66) and (264.52,38) .. (266.57,38) .. controls (268.62,38) and (270.29,39.66) .. (270.29,41.71) .. controls (270.29,43.77) and (268.62,45.43) .. (266.57,45.43) .. controls (264.52,45.43) and (262.86,43.77) .. (262.86,41.71) -- cycle ; %Shape: Rectangle [id:dp26278935632752654] \draw (456.8,22) -- (496.23,22) -- (496.23,62) -- (456.8,62) -- cycle ; %Shape: Rectangle [id:dp5253832264115919] \draw (462.23,146) -- (462.23,204.29) -- (441.51,204.29) -- (441.51,146) -- cycle ; %Shape: Rectangle [id:dp19337284039858993] \draw (494.51,145) -- (494.51,204.29) -- (473.51,204.29) -- (473.51,145) -- cycle ; %Shape: Rectangle [id:dp12109801848615143] \draw (504.23,146.43) -- (525.23,146.43) -- (525.23,159.37) -- (504.23,159.37) -- cycle ; %Shape: Rectangle [id:dp029986139125434796] \draw (504.23,159.37) -- (525.23,159.37) -- (525.23,172.32) -- (504.23,172.32) -- cycle ; %Shape: Rectangle [id:dp5205073319604256] \draw (504.23,172.32) -- (525.23,172.32) -- (525.23,204.5) -- (504.23,204.5) -- cycle ; %Shape: Rectangle [id:dp5392153103190804] \draw (536.8,24) -- (576.23,24) -- (576.23,64) -- (536.8,64) -- cycle ; %Shape: Rectangle [id:dp20777203648986298] \draw (553.23,146) -- (553.23,204.29) -- (532.51,204.29) -- (532.51,146) -- cycle ; %Shape: Rectangle [id:dp9821766933114229] \draw (584.51,172.41) -- (584.51,204.29) -- (563.51,204.29) -- (563.51,172.41) -- cycle ; %Shape: Rectangle [id:dp26278037443005653] \draw (616.23,185.26) -- (616.23,204.11) -- (594.94,204.11) -- (594.94,185.26) -- cycle ; %Shape: Rectangle [id:dp7263888129359626] \draw (595.23,146.43) -- (616.23,146.43) -- (616.23,159.37) -- (595.23,159.37) -- cycle ; %Shape: Rectangle [id:dp39759929453499376] \draw (595.23,159.37) -- (616.23,159.37) -- (616.23,172.32) -- (595.23,172.32) -- cycle ; %Shape: Rectangle [id:dp4139225137390832] \draw (595.23,172.32) -- (616.23,172.32) -- (616.23,185.26) -- (595.23,185.26) -- cycle ; %Shape: Rectangle [id:dp5534530289312252] \draw (563.51,146.52) -- (584.51,146.52) -- (584.51,159.46) -- (563.51,159.46) -- cycle ; %Shape: Rectangle [id:dp15109524268989016] \draw (563.51,159.46) -- (584.51,159.46) -- (584.51,172.41) -- (563.51,172.41) -- cycle ; %Shape: Rectangle [id:dp3260024587356085] \draw (443.8,83.86) -- (469,83.86) -- (469,105) -- (443.8,105) -- cycle ; %Shape: Rectangle [id:dp771034531518882] \draw (469,83.86) -- (494.2,83.86) -- (494.2,105) -- (469,105) -- cycle ; %Shape: Rectangle [id:dp35395262229310664] \draw (494.2,83.86) -- (519.4,83.86) -- (519.4,105) -- (494.2,105) -- cycle ; %Shape: Rectangle [id:dp17684146143997692] \draw (519.4,83.86) -- (544.6,83.86) -- (544.6,105) -- (519.4,105) -- cycle ; %Shape: Rectangle [id:dp22681144521939345] \draw (544.6,83.86) -- (569.8,83.86) -- (569.8,105) -- (544.6,105) -- cycle ; %Shape: Rectangle [id:dp3401048482705622] \draw (569.8,83.86) -- (595,83.86) -- (595,105) -- (569.8,105) -- cycle ; %Straight Lines [id:da5134271301477562] \draw (455,100) -- (451.17,144.01) ; \draw [shift={(451,146)}, rotate = 274.97] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da5852145262435737] \draw (486,99) -- (482.17,143.01) ; \draw [shift={(482,145)}, rotate = 274.97] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da05316401791657244] \draw [color={rgb, 255:red, 218; green, 15; blue, 15 } ,draw opacity=1 ] (506.8,94.43) -- (572.41,144.29) ; \draw [shift={(574,145.5)}, rotate = 217.23] [color={rgb, 255:red, 218; green, 15; blue, 15 } ,draw opacity=1 ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da7304314536476455] \draw [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ] (529.23,100.43) -- (515.6,144.09) ; \draw [shift={(515,146)}, rotate = 287.34] [color={rgb, 255:red, 0; green, 0; blue, 0 } ,draw opacity=1 ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da41418908415964717] \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (557.51,100.52) -- (541.68,144.12) ; \draw [shift={(541,146)}, rotate = 289.96] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Straight Lines [id:da0992928490139493] \draw (582.4,94.43) -- (604.99,151.04) ; \draw [shift={(605.73,152.9)}, rotate = 248.25] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ; %Curve Lines [id:da30182495627256767] \draw (443.8,83.86) .. controls (447,61.6) and (478,85.6) .. (477,61.6) ; %Curve Lines [id:da2733079278124235] \draw (519.4,83.86) .. controls (517,63.6) and (478,85.6) .. (477,61.6) ; %Curve Lines [id:da8525590686816691] \draw (519.4,83.86) .. controls (520,59.6) and (557,86.6) .. (556,64.6) ; %Curve Lines [id:da11645227785870849] \draw (595,83.86) .. controls (595.6,59.6) and (557,86.6) .. (556,64.6) ; %Right Arrow [id:dp3848885793985928] \draw (266,115) -- (364.4,115) -- (364.4,105) -- (430,125) -- (364.4,145) -- (364.4,135) -- (266,135) -- cycle ; %Curve Lines [id:da5861404114416708] \draw [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ] (417,78) .. controls (411.24,116.88) and (503.17,114.75) .. (544.15,126.9) ; \draw [shift={(549,128.5)}, rotate = 20.22] [color={rgb, 255:red, 208; green, 2; blue, 27 } ,draw opacity=1 ][line width=0.75] (0, 0) circle [x radius= 6.7, y radius= 6.7] ; % Text Node \draw (102,4) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small Worker 1}}; % Text Node \draw (30,166) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small \sf mailboxes}}; % Text Node \draw (96,206) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 0}}; % Text Node \draw (127,206) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 1}}; % Text Node \draw (160,206) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 2}}; % Text Node \draw (188.71,205.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 3}}; % Text Node \draw (220.71,206.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 4}}; % Text Node \draw (252.71,206.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 5}}; % Text Node \draw (3.2,85.86) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small \sf worker\_queues}}; % Text Node \draw (181,3) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small Worker 2}}; % Text Node \draw (452.8,5) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small Worker 1}}; % Text Node \draw (446.8,207) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 0}}; % Text Node \draw (477.8,207) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 1}}; % Text Node \draw (510.8,207) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 2}}; % Text Node \draw (539.51,206.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 3}}; % Text Node \draw (571.51,207.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 4}}; % Text Node \draw (603.51,207.29) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small 5}}; % Text Node \draw (531.8,4) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small Worker 2}}; % Text Node \draw (266,117) node [anchor=north west][inner sep=0.75pt] [align=left] {{\footnotesize worker 1 steals mailbox 4}}; % Text Node \draw (346,55) node [anchor=north west][inner sep=0.75pt] [align=left] {{\small \textcolor[rgb]{0.82,0.01,0.11}{pointers swapped}}\\{\small \textcolor[rgb]{0.82,0.01,0.11}{during steal}}}; \end{tikzpicture}