2020-02-04

Feb 5 In-Class Exercise.

Post your solutions to the Feb 5 In-Class Exercise to this thread.
Best,
Chris
Post your solutions to the Feb 5 In-Class Exercise to this thread. Best, Chris
2020-02-05

-- Feb 5 In-Class Exercise
Resource Description for IMG_0385.jpg
((resource:IMG_0385.jpg|Resource Description for IMG_0385.jpg))

-- Feb 5 In-Class Exercise
Resource Description for IMG_7759.jpg
((resource:IMG_7759.jpg|Resource Description for IMG_7759.jpg))

-- Feb 5 In-Class Exercise
 Block 1: {22, 10}
 Block 2: {55, 35}
 Block 3: {70, 5}
 Read 22 into memory, this will swizzle left pointer of 22 which points to 10. 
 We look at 10 and decide to read 5 into memory, this swizzles the left pointer of 10 which points to 5.
Block 1: {22, 10} Block 2: {55, 35} Block 3: {70, 5} Read 22 into memory, this will swizzle left pointer of 22 which points to 10. We look at 10 and decide to read 5 into memory, this swizzles the left pointer of 10 which points to 5.

-- Feb 5 In-Class Exercise
Block 1 contains two records of key 22 and 10.
Block 2 contains two records of key 55 and 35.
Block 3 contains two records of key 70 and 5.
First read block 1 into memory, reference to record of 10 will be swizzled.
Then read block 3 into memory, reference to record of 5 from record of 10 will be swizzled.
Notice that block 2 is not read into memory.
If we do a lookup of the table record corresponding to the key 5, block 1 and 3 would be read in and swizzling.
Resource Description for 63D70131-56F4-4CA8-88DD-E14903FED415_1_105_c.jpeg
Block 1 contains two records of key 22 and 10. Block 2 contains two records of key 55 and 35. Block 3 contains two records of key 70 and 5. First read block 1 into memory, reference to record of 10 will be swizzled. Then read block 3 into memory, reference to record of 5 from record of 10 will be swizzled. Notice that block 2 is not read into memory. If we do a lookup of the table record corresponding to the key 5, block 1 and 3 would be read in and swizzling. ((resource:63D70131-56F4-4CA8-88DD-E14903FED415_1_105_c.jpeg|Resource Description for 63D70131-56F4-4CA8-88DD-E14903FED415_1_105_c.jpeg))

-- Feb 5 In-Class Exercise
Block 1 - 22 | 10
Block 2 - 55 | 35
Block 3 - 70
Block 4 - 5
Searching for 5:
Read Block 1
Swizzle 22 left pointer
Stay in Block 1
Read Block 4
Swizzle 10 left pointer
(Edited: 2020-02-05)
Block 1 - 22 | 10 Block 2 - 55 | 35 Block 3 - 70 Block 4 - 5 Searching for 5: Read Block 1 Swizzle 22 left pointer Stay in Block 1 Read Block 4 Swizzle 10 left pointer

-- Feb 5 In-Class Exercise
Resource Description for 01693f837e426daf54553111a13ad9c29bfae2a1d3.jpg
((resource:01693f837e426daf54553111a13ad9c29bfae2a1d3.jpg|Resource Description for 01693f837e426daf54553111a13ad9c29bfae2a1d3.jpg))

-- Feb 5 In-Class Exercise
((resource:CFF1BF10-A0FB-4315-AA4A-22660496E289.png|Resource Description for CFF1BF10-A0FB-4315-AA4A-22660496E289.png))

-- Feb 5 In-Class Exercise
Resource Description for 8000088D-4859-4446-B70E-3E98E1D87459.jpeg
((resource:8000088D-4859-4446-B70E-3E98E1D87459.jpeg|Resource Description for 8000088D-4859-4446-B70E-3E98E1D87459.jpeg))

-- Feb 5 In-Class Exercise
I read record 22 in block 1. 22's left pointer 10 is read into memory so it gets swizzled. I read 10's left pointer 5 from block 3. 10's left pointer 5 is read into memory so it gets swizzled. ~
I read record 22 in block 1. 22's left pointer 10 is read into memory so it gets swizzled. I read 10's left pointer 5 from block 3. 10's left pointer 5 is read into memory so it gets swizzled. ~
[ Next ]
X