=========================================== Self-mark results Summary =========================================== - Ian! D. Allen - idallen@idallen.ca - www.idallen.com ------ Assignment 02 ----------------------------------------------- ???: -Ian! D. Allen - idallen@idallen.ca - www.idallen.com ???: Due date: 11:59PM March 2. ???: Q12 ???: Q23 ???: Q33 ???: Q43 ???: Q51 ???: Q63 ???: Q73 ???: Q83 ???: Q93 ???: Q102 ???: Q112 ???: Q123 ???: Q130 ???: Q143 ???: Q150 ???: Q163 ???: Q173 ???: Q183 ???: Q193 ???: Q203 ???: Q213 ???: Q223 ???: Q232 ???: Q242 ???: Q253 ???: Q262 ???: Q270 ???: Q282 ???: Q293 ???: Q302 ???: Q312 ???: Q322 ???: Q330 ???: Q343 ???: Q352 ???: Q362 ???: 82/108 = 75.9% ???: ____________________________________________ ???: Submit a plain text file in this format: ???: -Ian! D. Allen - idallen@idallen.ca - www.idallen.com ???: Due date: 11:59PM March 2. ???: 142 ???: 2 -> 4 ???: 3 -> 4 ???: 5 -> 4 ???: 6 -> 4 ???: 10-> 4 ???: 17-> 4 ???: 18-> 4 ???: 19-> 4 ???: 20-> 4 ???: 22-> 4 ???: 25-> 4 ???: 27-> 4 ???: 28-> 4 ???: 30-> 4 ???: 31-> 4 ???: 34-> 4 ???: 35-> 4 ???: ************************************************* ???: ************************************************* ----- Assignment 02 --------------------------------------------------------- Q-01 2.4 : 001111122222222333333333333333333333333333 Q-02 2.6 : 00111222223333333333333333333333333333333 Q-03 2.2 : 0111111111112222222222222233333333333333333333333 Q-04 2.6 : 011222222223333333333333333333333333333333 Q-05 2.7 : 012222222223333333333333333333333333333333 Q-06 2.7 : 00112233333333333333333333333333333333333 Q-07 2.5 : 011111222222333333333333333333333333333333 Q-08 2.6 : 011112222223333333333333333333333333333333 Q-09 2.5 : 001112222222333333333333333333333333333333 Q-10 2.2 : 00001111111222222223333333333333333333333 Q-11 2.2 : 000000111122222222333333333333333333333333 Q-12 2.5 : 000111222222333333333333333333333333333333 Q-13 2.0 : 000000000111112222233333333333333333333333 Q-14 2.4 : 00001111222223333333333333333333333333333 Q-15 2.4 : 000111122222222333333333333333333333333333 Q-16 2.4 : 001111111111333333333333333333333333333333 Q-17 2.6 : 00011133333333333333333333333333333333333 Q-18 2.6 : 00111222333333333333333333333333333333333 Q-19 2.5 : 00011222222222333333333333333333333333333 Q-20 2.6 : 01122222222223333333333333333333333333333 Q-21 2.4 : 000011122222222233333333333333333333333333 Q-22 2.4 : 00001112222222333333333333333333333333333 Q-23 2.5 : 001112222222233333333333333333333333333333 Q-24 2.5 : 000111222222223333333333333333333333333333 Q-25 2.3 : 00000112222222222333333333333333333333333 Q-26 2.4 : 0000012222222333333333333333333333333333333 Q-27 2.5 : 00111122222233333333333333333333333333333 Q-28 2.2 : 00000111111222223333333333333333333333333 Q-29 2.7 : 001112333333333333333333333333333333333333 Q-30 2.2 : 00000111111222222233333333333333333333333 Q-31 2.1 : 0000000111222222223333333333333333333333 Q-32 1.9 : 00000000001111112223333333333333333333333 Q-33 2.5 : 00011122223333333333333333333333333333333 Q-34 2.3 : 00000111112223333333333333333333333333333 Q-35 1.8 : 0000000000111111222222233333333333333333 Q-36 1.9 : 0000000011111222222222233333333333333333 *AVG 2.4 : Assignment 02 <------------- ------ Assignment 03 ----------------------------------------------- ???: Terminology/#03 ----- Assignment 03 --------------------------------------------------------- Q-00 2.0 : 2 Q-01 2.9 : 12233333333333333333333333333333 Q-02 2.9 : 12333333333333333333333333333333 Q-03 2.7 : 02222223333333333333333333333333 Q-04 2.8 : 01222333333333333333333333333333 Q-05 2.8 : 01223333333333333333333333333333 Q-06 2.8 : 02223333333333333333333333333333 Q-07 2.7 : 01222223333333333333333333333333 Q-08 2.8 : 02223333333333333333333333333333 Q-09 2.6 : 00022223333333333333333333333333 Q-10 2.7 : 01222223333333333333333333333333 Q-11 2.6 : 00022223333333333333333333333333 Q-12 2.7 : 0222223333333333333333333333333 Q-13 2.5 : 00111222223333333333333333333333 Q-14 2.3 : 00111111222233333333333333333333 Q-15 2.5 : 00002222233333333333333333333333 Q-16 2.6 : 00022222333333333333333333333333 Q-17 2.8 : 22222233333333333333333333333333 Q-18 2.9 : 22233333333333333333333333333333 Q-19 2.8 : 22222333333333333333333333333333 Q-20 2.8 : 222223333333333333333333333333333 Q-21 2.8 : 22222223333333333333333333333333 Q-22 2.8 : 02233333333333333333333333333333 Q-23 2.8 : 02222333333333333333333333333333 Q-24 2.8 : 01233333333333333333333333333333 Q-25 2.8 : 02233333333333333333333333333333 Q-26 2.8 : 02223333333333333333333333333333 Q-27 2.7 : 01122223333333333333333333333333 Q-28 2.3 : 00111122222222333333333333333333 Q-29 2.7 : 01222223333333333333333333333333 Q-30 2.6 : 00012223333333333333333333333333 Q-31 2.3 : 00000222222333333333333333333333 Q-32 2.6 : 00022233333333333333333333333333 Q-33 2.5 : 00001223333333333333333333333333 Q-34 2.5 : 00002223333333333333333333333333 Q-35 2.5 : 00012222333333333333333333333333 Q-36 2.3 : 00001122222333333333333333333333 Q-37 2.3 : 00001122222223333333333333333333 Q-38 2.4 : 0000022233333333333333333333 Q-39 2.8 : 02223333333333333333333333333333 Q-40 2.7 : 0222223333333333333333333333333 *AVG 2.6 : Assignment 03 <------------- ------ Assignment 04 ----------------------------------------------- ???: -Ian! D. Allen - idallen@idallen.ca - www.idallen.com ???: Due date: 11:59PM March 2. ???: you are doing and the errors are minor. ???: Replace each of the underscores with a single digit between 0 and 3 that ???: to see how you are all doing with each topic, so please put only 0, 1, 2, ???: you didn't submit it on time. ???: I will examing the submitted files to see which topics need more work. ???: b) 1 ???: c) 1 ???: d) 1 ???: = 67 ???: Q13 ???: Q23 ???: Q33 ???: Q43 ???: Q53 ???: Q63 ???: Q73 ???: Q82 ???: Q93 ???: Q103 ???: Q113 ???: Q123 ???: Q133 ???: Q143 ???: Q153 ???: Q163 ???: Q173 ???: Q183 ???: Q193 ???: Q203 ???: Q213 ???: Q223 ???: Q233 ???: Q243 ???: Q253 ???: Q263 ???: Q273 ???: Q283 ???: Q293 ???: Q303 ???: 89/90 = 98.9% ???: Submit a plain text file in this format: ???: -Ian! D. Allen - idallen@idallen.ca - www.idallen.com ???: Due date: 11:59PM March 2. ???: you are doing and the errors are minor. ???: 1 -> 4 ???: 2 -> 4 ???: 3 -> 4 ???: 4 -> 4 ???: 5 -> 4 ???: 6 -> 4 ???: 7 -> 4 ???: 8 -> 4 ???: 9 -> 4 ???: 10-> 4 ???: 11-> 4 ???: 12-> 4 ???: 14-> 4 ???: 15-> 4 ???: 16-> 4 ???: 17-> 4 ???: 18-> 4 ???: 19-> 4 ???: 20-> 4 ???: 21-> 4 ???: 22-> 4 ???: 23-> 4 ???: 24-> 4 ???: 25-> 4 ???: 26-> 4 ???: 27-> 4 ???: 29-> 4 ???: 30-> 4 ???: -- ----- Assignment 04 --------------------------------------------------------- Q-01 2.7 : 00122222333333333333333333333333333333333 Q-02 2.7 : 00122222233333333333333333333333333333333 Q-03 2.6 : 00011222333333333333333333333333333333333 Q-04 2.7 : 00022233333333333333333333333333333333333 Q-05 2.5 : 000111222222233333333333333333333333333333 Q-06 2.5 : 00011112222233333333333333333333333333333 Q-07 2.5 : 00011122222333333333333333333333333333333 Q-08 2.1 : 00000111111222222223333333333333333333333 Q-09 2.5 : 00111122222333333333333333333333333333333 Q-10 2.4 : 00011112222222333333333333333333333333333 Q-11 2.5 : 00011122223333333333333333333333333333333 Q-12 2.6 : 00112222223333333333333333333333333333333 Q-13 2.5 : 001111122222223333333333333333333333333333 Q-14 2.6 : 00111222223333333333333333333333333333333 Q-15 2.5 : 00111122222233333333333333333333333333333 Q-16 2.7 : 00112222333333333333333333333333333333333 Q-17 2.7 : 00122233333333333333333333333333333333333 Q-18 2.6 : 00012222233333333333333333333333333333333 Q-19 2.2 : 00001111122222222222333333333333333333333 Q-20 2.7 : 00022233333333333333333333333333333333333 Q-21 2.5 : 00000122233333333333333333333333333333333 Q-22 2.7 : 00022233333333333333333333333333333333333 Q-23 2.5 : 00001222223333333333333333333333333333333 Q-24 2.0 : 000001111111122222222223333333333333333333 Q-25 2.0 : 0000001111111222222333333333333333333333 Q-26 1.8 : 00000000001111112222222233333333333333333 Q-27 2.1 : 00000111111112222222333333333333333333333 Q-28 1.6 : 000000000011111111112222222223333333333333 Q-29 1.7 : 00000000001111112222222222222333333333333 Q-30 1.7 : 0000000000000011222222333333333333333333 Q-31 2.0 : 02233 Q-32 1.8 : 00333 Q-33 2.5 : 123333 Q-34 2.8 : 233333 Q-35 2.4 : 03333 Q-36 2.0 : 0233 *AVG 2.4 : Assignment 04 <------------- ------ Assignment 05 ----------------------------------------------- ???: Q1-a)3 b)3 c)3 d)3 e)3 f)3 g)3 h)1 i)0 ???: Q6-a)1 b)3 c)e d)3 e)1 f)1 ???: Q1 ???: A 3 ???: B 3 ???: C 3 ???: D 3 ???: E 3 ???: F 3 ???: G 3 ???: H 3 ???: I 3 ???: Q6 ???: A 3 ???: B 3 ???: C 3 ???: D 3 ???: E 3 ???: F 2 ???: Q1 ???: a 3 ???: b 3 ???: c 3 ???: d 3 ???: e 0 ???: f 0 ???: g 0 ???: h 0 ???: i 0 ----- Assignment 05 --------------------------------------------------------- Q-00 2.0 : 2 Q-01 2.2 : 0001111122222233333333333333333 Q-02 2.1 : 0000011222222222222233333333333333 Q-03 2.0 : 0000001111122222223333333333333333 Q-04 2.0 : 0000000012222222333333333333333333 Q-05 1.6 : 0000000001112222222222222333333333 Q-06 2.0 : 00000001222222222333333333333333 Q-07 1.6 : 0000000000111122222222333333333333 Q-08 2.2 : 0000011122222233333333333333333333 Q-09 2.2 : 0000001222222233333333333333333333 Q-10 2.3 : 0000001222223333333333333333333333 Q-11 1.9 : 0000000001122222222333333333333333 Q-12 2.1 : 0000000001222333333333333333333333 Q-13 2.0 : 0000000111122222233333333333333333 Q-14 2.0 : 0000000111122223333333333333333333 Q-15 1.9 : 0000000011112222333333333333333333 Q-16 2.1 : 0000000022222333333333333333333333 Q-17 2.2 : 0000000012233333333333333333333333 Q-18 2.2 : 0000001112222333333333333333333333 Q-19 2.2 : 0000001111223333333333333333333333 Q-20 2.1 : 00000011122222222333333333333333333 Q-21 2.1 : 0000001111222233333333333333333333 Q-22 1.8 : 0000000000011222333333333333333333 Q-23 2.3 : 0000001122233333333333333333333333 Q-24 2.1 : 0000000111223333333333333333333333 Q-25 2.4 : 0000001223333333333333333333333333 Q-26 1.6 : 0000000000001111222333333333333333 Q-27 1.9 : 0000000001112222223333333333333333 Q-28 1.8 : 0000000000111122223333333333333333 Q-29 2.1 : 0000001112222223333333333333333333 Q-30 2.1 : 0000001111222222333333333333333333 Q-31 2.0 : 0000001111122222333333333333333333 Q-32 1.9 : 0000000011222222222333333333333333 Q-33 1.8 : 0000000011112222222233333333333333 Q-34 1.6 : 0000000000011122222222333333333333 Q-35 1.4 : 0000000000000012222222222333333333 Q-36 1.6 : 000000000011111222223333333333333 *AVG 2.0 : Assignment 05 <------------- ------ Assignment 06 ----------------------------------------------- ----- Assignment 06 --------------------------------------------------------- Q-00 2.0 : 2 Q-01 2.7 : 1222222233333333333333333333333 Q-02 2.5 : 0111222222233333333333333333333 Q-03 2.6 : 0122222222333333333333333333333 Q-04 2.5 : 0122222222223333333333333333333 Q-05 2.1 : 0001111122222222333333333333333 Q-06 2.6 : 0111222233333333333333333333333 Q-07 2.8 : 2222233333333333333333333333333 Q-08 2.9 : 2223333333333333333333333333333 Q-09 2.9 : 2233333333333333333333333333333 Q-10 2.3 : 0111111222222233333333333333333 Q-11 2.3 : 0111111222222233333333333333333 Q-12 2.5 : 0012222222333333333333333333333 Q-13 2.7 : 1122222233333333333333333333333 Q-14 2.0 : 0000111111122223333333333333333 Q-15 2.4 : 0011112222233333333333333333333 Q-16 2.6 : 0122222222333333333333333333333 Q-17 2.3 : 011222222222222223333333333333 Q-18 3.0 : 3 Q-19 3.0 : 3 Q-20 3.0 : 3 Q-21 3.0 : 3 Q-22 3.0 : 3 Q-23 3.0 : 3 Q-24 3.0 : 3 Q-25 3.0 : 3 Q-26 3.0 : 3 Q-27 3.0 : 3 Q-28 3.0 : 3 Q-29 3.0 : 3 Q-30 3.0 : 3 Q-31 3.0 : 3 Q-32 3.0 : 3 Q-33 3.0 : 3 Q-34 3.0 : 3 Q-35 3.0 : 3 Q-36 3.0 : 3 *AVG 2.8 : Assignment 06 <------------- ------ Assignment 07 ----------------------------------------------- ???: Q19a)3 b)2 c)1 d)1 ----- Assignment 07 --------------------------------------------------------- Q-00 3.0 : 33 Q-01 2.8 : 112223333333333333333333333333333 Q-02 2.7 : 112222233333333333333333333333333 Q-03 2.8 : 112222333333333333333333333333333 Q-04 2.5 : 011222222223333333333333333333333 Q-05 2.7 : 001223333333333333333333333333333 Q-06 2.6 : 002222222333333333333333333333333 Q-07 2.3 : 001122222222222223333333333333333 Q-08 2.5 : 011122222233333333333333333333333 Q-09 2.5 : 001122222333333333333333333333333 Q-10 2.5 : 000122222233333333333333333333333 Q-11 2.5 : 000122222333333333333333333333333 Q-12 2.1 : 000011111222222222333333333333333 Q-13 1.7 : 000000011111111122222333333333333 Q-14 2.4 : 000111222233333333333333333333333 Q-15 2.5 : 001112222233333333333333333333333 Q-16 2.5 : 001111223333333333333333333333333 Q-17 1.6 : 000000000001122222222333333333333 Q-18 1.1 : 0000000000000000011111122233333333 Q-19 1.8 : 000000001111222222233333333333333 Q-20 2.6 : 0111222333333333333333333333333333 Q-21 2.0 : 000011111111222223333333333333333 Q-22 2.1 : 0001111112222223333333333333333 *AVG 2.3 : Assignment 07 <------------- ------ Assignment 09 ----------------------------------------------- ???: 0. What is the date of your second midterm test? ???: March 31, 2010 ???: *** Boolean Section *** ???: 1. True/False: (xy)' == x'y' ???: In English: "NOT(red AND jello) == NOT red AND NOT jello" ? ???: true ???: 2. True/False: (x + y)' == x' + y' ???: In English: "NOT(red OR jello) == NOT red OR NOT jello" ? ???: false ???: 3. Using deMorgan, write a simplified expression for the Boolean ???: complement of the logic function F(a,b,c) = a(b' + c) ???: F(a,b,c) = a(b' + c) ???: = a'(b + c') ???: = a'(bc') ???: = a'+ (bc') ???: 4. Using deMorgan, write a simplified expression for the Boolean ???: complement of the logic function F(a,b,c) = a + (b'c) ???: F(a,b,c) = a + (b'c) ???: = a' + (bc') ???: = a' + (b + c') ???: = a'(b + c') ???: 5. Show that x = xy + xy' using a Boolean truth table. ???: x y y' xy xy' ???: 0 0 1 0 0 ???: 0 1 0 0 0 ???: 1 0 1 0 1 ???: 1 1 0 1 0 ???: 6. Prove that x = xy + xy' using a chain of simple Boolean Identities. ???: x = xy + xy' ???: x = xy + y' ???: x = x ???: 7. Construct a Boolean function F(a,b) that implements the XOR operator ???: using only AND, OR, and NOT logic. (The truth table for the simple ???: function should be the same as the XOR truth table.) ???: a b a XOR b ???: 0 0 0 or 0 0 ???: 0 1 0 or 1 1 ???: 1 0 1 or 0 1 ???: 1 1 1 and 1 0 ???: 8. Write the simplest IF statement (simplify the Boolean logic) for the ???: following programming problem specification: ???: "Call the delete routine unless: the product_id is zero or the ???: delete(); ???: } ???: 9. Write the simplest IF statement (simplify the Boolean logic) for the ???: following programming problem specification: ???: "A record is one where the modify_date date is less than a ???: year old and the account_balance is bigger than zero. If the record ???: is NOT current, call the delete routine." ???: if(!current < 1 && !account_balance > 0){ ???: delete() ???: } ???: *** Memory Section *** ???: 10. What do the acronyms RAM and ROM stand for? ???: RANDOM ACCESS MEMORY and READ ONLY MEMORY ???: 11. Is the BIOS in your computer stored in RAM or ROM? ???: BIOS is stored in ROM ???: 12. Put these in increasing order of access time (faster to slower) and ???: indicate beside each type of device approximately what its access time is: ???: Fixed Hard Disk ???: Level 1 Cache - 4ns ???: Magnetic Tape ???: Level 2 Cache - 15-20ns ???: Main Memory - 20ns ???: Optical Disk ???: Registers ???: 13. Define "a cache hit": ???: If an entry can be found with a tag matching that of the desired datum, the datum in the entry is used instead. ???: 14. Define "a cache miss": ???: When the cache is consulted and found not to contain a datum with the desired tag. ???: 15. List and briefly describe the three Principles of Locality: ???: Temporal locality- Recently-accessed data elements tend to be accessed again. ???: Spatial locality - Accesses tend to cluster. ???: Sequential locality - Instructions tend to be accessed sequentially. ???: 16. With reference to cache size, why is a small loop of code often faster ???: than a large loop? ???: small loop of code is often faster then large loop ???: beucase it takes less time to cycle through. ???: 17. What is the basic feature that Virtual Memory enables? ???: Cache memory enhances performance by providing faster memory access speed. ???: Virtual memory enhances performance by providing greater memory capacity, ???: without the expense of adding main memory. ???: 18. What is the difference between a Physical Address and a Virtual Address? ???: A physical address is the actual memory address of physical memory. ???: Programs create virtual addresses that are mapped to physical addresses by the memory manager. ???: 19. What is a "page fault"? ???: Page faults occur when a logical address requires that a page be brought in from disk. ???: 20. How much slower (orders of magnitude) is a page fault compared to an ???: ordinary memory access that does not cause a page fault? ???: Double the time slower. ???: 21. With reference to virtual memory, why is a small program often faster ???: than a large program? ???: small programs often faster than a large problem beucase ???: Main memory and virtual memory are divided into equal sized pages. ???: The entire address space required by a process need not be in memory at once. ???: Some parts can be on disk, while others are in main memory. ???: Further, the pages allocated to a process do not need to be ???: stored contiguously-- either on disk or in memory. ???: In this way, only the needed pages are in memory at any time, ???: the unnecessary pages are in slower disk storage. ???: 22. What is virtual memory "thrashing"? ???: thrashing is where the computer spends too much time shuffling blocks of virtual memory ???: between real memory and disks, and therefore appears to work slower. ???: 23. With reference to Chapter 6 Slides 46-47, describe what happens when ???: the CPU generates the 13-bit address 1004h: ???: It drops one bit. ???: *** Internet Section *** ???: 24. IPv4 addresses are stored as 32-bits and sent around the Internet in ???: Big Endian format, where each of the four "quads" is stored in its ???: own byte. Encode the dotted-quad IP address 129.65.33.17 as a 32-bit ???: 81.41.21.11h ???: 25. Which of the following URLs are always identical to the URL ???: http://idallen.com/address.html: ???: a) HTTP://idallen.com/address.html ???: b) http://IDALLEN.COM/address.html ???: c) http://idallen.com/ADDRESS.HTML ???: b, is always identical to the URL ???: http://idallen.com/address.html ???: a) IDALLEN@idallen.ca ???: b) idallen@IDALLEN.CA ???: b, is always identical to the ???: 27. Which of the following cannot ever be valid dotted-quad IP addresses? ???: a) 1.2.3.4 ???: b) 0.0.0.0 ???: c) 192.0.32.10 ???: d) 292.0.32.10 ???: e) 255.255.255.255 ???: f) 255.255.255.256 ???: can only go up to 255. ???: 28. True/False: If two machines with IP addresses 192.0.32.10 and ???: 192.0.32.11 are on the same network, they will always have similar ???: true ???: e.g. host1.example.com and host2.example.com, their IP addresses ???: will always be on the same or similar networks, e.g. 192.0.32.10 and ???: 192.0.32.11. ???: false ???: 30. How many bits are used to store the new IPv6 Internet addresses? ???: 128 bits are used to store the new IPv6 Internet addresses. ???: $perm variable into standard Internet numeric dotted-quad form. ???: Give the dotted-quad IP address here: ???: 203.59.123.114 ???: 32. Use the "whois" command to find out who owns the above IP address. ???: In what country is that IP address registered? ???: Australia ???: an IP address provided by Verizon. Give the "host" and "whois" ???: command lines that show this to be true, including only the relevant ???: lines of output from each command: ???: whois 203.59.123.114 ???: 203.59.123.114 is from Australia(AU) in region Oceana ???: 35. Use the "traceroute" command to trace the packet routes between this ???: machine and the German address. (The trace may not be able to trace ???: all the way to the destination - some trace points will be asterisks ???: 1 73 11 9 72.249.128.105 - ???: 2 13 41 12 64.129.174.181 64-129-174-181.static.twtelecom.net ???: 3 48 44 12 4.69.145.244 ae-93-90.ebr3.dallas1.level3.net ???: 4 42 49 43 4.69.132.77 ae-3-3.ebr2.losangeles1.level3.net ???: 5 193 41 43 4.69.144.144 ae-3-80.edge1.losangeles6.level3.net ???: 6 54 43 43 4.68.62.10 reach-level3-xe.losangeles.level3.net ???: 7 40 252 253 203.215.20.148 te13-1-0.syd-ult-core1.iinet.net.au ???: 8 198 261 208 202.84.140.101 i-2-0.sydp-core04.bx.reach.com ???: 9 251 192 193 134.159.160.58 static.net.reach.com ???: 10 360 386 416 203.215.20.148 te13-1-0.syd-ult-core1.iinet.net.au ???: 11 254 261 261 203.215.20.3 ge4-2.per-qv1-bdr1.iinet.net.au ???: 12 258 Timed out Timed out 203.215.4.19 te6-1.per-qv1-bng1.iinet.net.au ???: 13 281 271 Timed out 203.59.9.29 ca.asamo.gov.au ----- Assignment 09 --------------------------------------------------------- Q-00 3.0 : 333333333 Q-01 2.6 : 0111122333333333333333333333333333 Q-02 2.6 : 0111222233333333333333333333333333 Q-03 2.2 : 000111111222233333333333333333333 Q-04 2.2 : 0011111122222222233333333333333333 Q-05 2.3 : 0001111111223333333333333333333333 Q-06 2.4 : 0000011223333333333333333333333333 Q-07 2.1 : 0000011112222222223333333333333333 Q-08 2.1 : 0000011111122222333333333333333333 Q-09 1.9 : 0000011111111222222223333333333333 Q-10 2.7 : 0012333333333333333333333333333333 Q-11 2.6 : 0011223333333333333333333333333333 Q-12 2.6 : 0002222223333333333333333333333333 Q-13 2.4 : 0011122222222333333333333333333333 Q-14 2.4 : 0011112222222333333333333333333333 Q-15 2.5 : 0012222222233333333333333333333333 Q-16 2.4 : 0002222222222233333333333333333333 Q-17 2.3 : 0011112222222223333333333333333333 Q-18 2.1 : 0011111111222222222333333333333333 Q-19 2.2 : 0001111222222222333333333333333333 Q-20 2.2 : 00001111222222222333333333333333333 Q-21 2.0 : 0000000111222222333333333333333333 Q-22 2.2 : 0000111222222223333333333333333333 Q-23 1.7 : 000000011111112222222233333333333 Q-24 2.2 : 000001111222233333333333333333333 Q-25 2.3 : 000112222222222333333333333333333 Q-26 2.4 : 000111222222333333333333333333333 Q-27 2.3 : 001111222222222333333333333333333 Q-28 2.4 : 000112222223333333333333333333333 Q-29 2.7 : 001222333333333333333333333333333 Q-30 2.6 : 000222233333333333333333333333333 Q-31 2.0 : 000000001112223333333333333333333 Q-32 2.2 : 000000002223333333333333333333333 Q-33 2.0 : 000000000122233333333333333333333 Q-34 1.9 : 0000000001112222333333333333333333 Q-35 2.0 : 0000000001222333333333333333333 *AVG 2.3 : Assignment 09 <------------- ------ Assignment 11 ----------------------------------------------- ???: Q16a)3 b)3 c)3 d)3 e)3 f)3 ???: 17 to 43. 3 ???: - Ian! D. Allen - idallen@idallen.ca - www.idallen.com ???: Available online: Tuesday April 13, 2010 ???: Do *not* use the DigitalDropbox to submit your answers. ???: Answers will be posted shortly after the due date/time. ???: text, not HTML, not MSWord, not RTF. No fonts, no word-processing. ???: Plain text only. Did I mention that the format is plain text (Notepad)? ???: After that, you cannot submit any more times. If you need to re-submit ???: Answers will be posted after the due date/time so that you can check ???: your answers before coming to labs and ask questions about the answers ???: in the labs. Please check your answers (and my answers!). I go over ???: No questions means no review - I'll presume you know the material. ???: and exams. ???: Edit this file and answer the following questions underneath each ???: question, showing how you obtained each answer, if appropriate. ???: Upload the file containing the answers before the due date. Some of ???: the answers below may require reading the URL links published in the ???: weekly notes. ???: Make sure you can log in to the Course Linux Server before you begin. ???: The command-line commands referenced in this lab should be executed in ???: your own account on the Course Linux Server. ???: *** Review *** ???: 0. What is the date and room location of your CST8281 Final Exam? ???: April 29, 2010, rooms 102 ???: 1. Write the simplest IF statement (simplify the Boolean logic) for the ???: following programming problem specification: ???: "Call the add routine unless: the cost is less than zero or the ???: colour is 'blue'." ???: if(cost >= 0 && colour != "blue") add(); ???: 2. Write the simplest IF statement (simplify the Boolean logic) for the ???: following programming problem specification: ???: "In Elbonia, you lose (cannot renew) your driving license if your ???: age is over 50 or you have more than 23 demerit points. Call the ???: renew() function if this is not true. (Write a simplified IF ???: statement that calls renew() if you are allowed to renew.)" ???: if(age <= 50 && demerit_points <= 23) renew(); ???: *** Operating Systems Review (CST8202) *** ???: CLS = "Course Linux Server" ???: /home/thom0424 ???: 4. Use "ls -lid" to display the permissions on the above directory and paste ???: the full output here: ???: /home/thom0424/public_html/a10 ???: a copy of all the CST8281 course Notes files? ???: /home/idallen/public_html/teaching/cst8281/10w/notes ???: file in the preceding CST8281 course Notes directory? ???: /home/idallen/public_html/teaching/cst8281/10w/notes/210_file_transfer.txt ???: 8. How would you use file patterns and "grep" on the CLS to find out ???: which Week Notes files contain the string "PuTTY"? ???: grep PuTTY *.txt ???: following URL: ???: http://cst8281.idallen.ca:8080/~abcd0001/one/two.jpg ???: /home/abcd0001/public_html/one/two.jpg ???: 10. Give two URLs, one private (Algonquin-only) and one public (works on ???: ~alleni99/public_html/test/image.png ???: (Algonquin-only) http://idallen-linux/~alleni99/test/image.png ???: (Internet-wide) http://cst8281.idallen.ca:8080/~alleni99/test/image.png ???: 11. You are using FTP or SFTP on a Windows computer. Your current ???: Windows directory is C:\Temp and you connect to the CLS. Give the ???: "put" command that will copy a local file "foo.txt" from the "Vmware" ???: directory on your "D:" drive to the CLS so that the following URL ???: http://cst8281.idallen.ca:8080/~abcd0001/tmp/bar.txt ???: put d:\Vmware\foo.txt /home/abcd0001/public_html/tmp/bar.txt ???: 12. You are in the directory ~abcd0001/public_html/a10 on the CLS. ???: directory into the directory ~abcd0001/public_html/tmp using the ???: mv ~abcd0001/foo.txt ../tmp ???: 13. Create the directory "public_html/a11" under your CLS home directory. ???: output here: ???: 917222 drwxr-xr-x 2 thom0424 thom0424 4096 2010-04-07 18:36 a11 ???: 14. Redirect the output of the Unix "who" command into the file "who.txt" ???: Verify that you can see the contents of the who.txt file using a ???: web browser (e.g. Firefox) using the appropriate URL. ???: who > a11/who.txt ???: 15. Use "ls -liac" on the "a11" directory to show the permissions of the ???: directory and all the files inside it. Paste the output here: ???: total 12 ???: 917222 drwxr-xr-x 2 thom0424 thom0424 4096 2010-04-07 18:38 . ???: 916950 drwxr-xr-x 5 thom0424 thom0424 4096 2010-04-07 18:36 .. ???: 917234 -rw-r--r-- 1 thom0424 thom0424 192 2010-04-07 18:38 who.txt ???: 16. Turn off execute permission for "others" on the "a11" directory. ???: a) What command turns off execute permission for "others"? ???: chmod o-x a11 ???: b) Use "ls -liac" to generate a listing showing the new permissions of ???: the "a11" directory and all its contents and paste the output here: ???: total 12 ???: 917222 drwxr-xr-- 2 thom0424 thom0424 4096 2010-04-07 18:40 . ???: 916950 drwxr-xr-x 5 thom0424 thom0424 4096 2010-04-07 18:36 .. ???: 917234 -rw-r--r-- 1 thom0424 thom0424 192 2010-04-07 18:38 who.txt ???: b) Can you still use "cat" or "less" to view the who.txt file? ???: yes ???: c) Can you still view the who.txt file via URL in the web browser? ???: no ???: d) Turn on execute permissions on the "a11" directory. What command ???: did you use to do this? ???: or ???: e) Use "ls -liac" to generate a listing showing the restored ???: permissions of the "a11" directory and its contents and paste it here: ???: total 12 ???: 917222 drwxr-xr-x 2 thom0424 thom0424 4096 2010-04-07 18:41 . ???: 916950 drwxr-xr-x 5 thom0424 thom0424 4096 2010-04-07 18:36 .. ???: 917234 -rw-r--r-- 1 thom0424 thom0424 192 2010-04-07 18:38 who.txt ???: f) Can you still view the who.txt file in the web browser? ???: yes ???: *** The Web *** ???: 17. What is the World Wide Web? ???: It is the totality of web servers (i.e. computers that provide HTML pages and other resources via HTTP) on the Internet. ???: 18. What is the difference between HTTP and HTML? ???: HTTP is the protocol used for transferring web resources. ???: 19. What gets stored in the disk files that are served up by a Web server? ???: A plain-text document with HTML tags. ???: 20. What protocol is used to send Web pages across the Internet? ???: HTTP over TCP/IP ???: 21. Describe how your Web browser acts to fetch and display a Web page. ???: The browser sends an HTTP request for a file (typically an HTML file) ???: to the web server (typically on port 80). The server sends an HTTP ???: response containing the file. If additional files are required to ???: render the page (such as images), the browser sends additional requests ???: for those files. ???: 22. True/False: Line breaks in HTML appear as line breaks in your Web page. ???: used to preserve line breaks. ???: 23. What is the URL of the W3C web page validator service? ???: http://validator.w3c.org ???: 25. True/False: Every opening HTML tag has a corresponding closing tag. ???: False ???: 26. True/False: A valid Web page could be a single line of text. ???: True ???: 27. Give three examples of HTML tags that have no closing tag: ???:

???: 28. What is an HTML "element"? ???: An HTML element is an individual componenet of an HTML document. ???: A single element includes the opening tag, its attributes (if any), ???: its content (if any), and the matching closing tag (if any). ???: 29. What tag pair are mandatory inside the section? ???: ???: 30. Which heading usually prints larger,

or

? ???:

???: 31. How do you write a comment in HTML? ???: ???: False ???: 33. True/False: This is a valid comment: <-- Hello World! --> ???: False ???: 34. True/False: This is a valid comment: <-- See -- Saw --> ???: False ???: 35. True/False: This is a valid comment: ???: False ???: 36. True/False: This is a valid comment: ???: True ???: 37. True/False: This is a valid comment: ???: True ???: 38. True/False: The major attribute of the tag is "http=" followed ???: by a relative or absolute file or URL address. ???: False ???: 39. True/False: the address used in the attribute on an tag must match ???: the text displayed in the browser for that attribute. ???: False ???: 41. True/False: When using the tag, the attribute that points to ???: False ???: 42. Write an tag that references the image file "foo.png" stored in ???: the parent directory (not in the current directory). The image size ???: is 800x600 pixels and shows a Linux penguin dancing. ???: A dancing Linux penguin ???: 43. Write here, from memory, the smallest valid Web page that displays ???: "Hello World!", including all the mandatory tags. You can omit the ???: details on the DOCTYPE header line (don't memorize it). ???: ???: ???: ???: ???: ???:

???: Hello world! ???:

???: ???: ----- Assignment 11 --------------------------------------------------------- Q-00 3.0 : 33333333333 Q-01 2.2 : 00001112222222233333333333333333 Q-02 2.2 : 00011111222223333333333333333333 Q-03 2.4 : 0000022222333333333333333333333 Q-04 2.8 : 00223333333333333333333333333333 Q-05 2.5 : 00111222233333333333333333333333 Q-06 2.3 : 00011222222222233333333333333333 Q-07 2.6 : 00122222333333333333333333333333 Q-08 2.1 : 00000112222222222333333333333333 Q-09 2.5 : 00002222233333333333333333333333 Q-10 2.2 : 00000011222223333333333333333333 Q-11 2.0 : 00000001222222223333333333333333 Q-12 2.2 : 00001112222222233333333333333333 Q-13 2.5 : 00002222333333333333333333333333 Q-14 2.4 : 0000022233333333333333333333333 Q-15 2.5 : 00001233333333333333333333333333 Q-16 2.5 : 000012222333333333333333333333333333 Q-17 2.4 : 0000122222233333333333333333333 Q-18 2.5 : 0011222222233333333333333333333 Q-19 2.0 : 0000000111122233333333333333333 Q-20 2.5 : 00012222223333333333333333333333 Q-21 1.9 : 0000011112222222222333333333333 Q-22 2.4 : 0000112233333333333333333333333 Q-23 2.5 : 0001123333333333333333333333333 Q-24 2.5 : 0001122223333333333333333333333 Q-25 2.6 : 0012222333333333333333333333333 Q-26 2.5 : 0001222233333333333333333333333 Q-27 2.7 : 0012233333333333333333333333333 Q-28 2.3 : 0000111222223333333333333333333 Q-29 2.5 : 0001122333333333333333333333333 Q-30 2.7 : 0022333333333333333333333333333 Q-31 2.7 : 0022333333333333333333333333333 Q-32 2.6 : 0012223333333333333333333333333 Q-33 2.7 : 0022233333333333333333333333333 Q-34 2.7 : 0022233333333333333333333333333 Q-35 2.4 : 0000012233333333333333333333333 Q-36 2.2 : 0000011112233333333333333333333 Q-37 2.6 : 0011123333333333333333333333333 Q-38 2.3 : 000011122333333333333333333333 Q-39 2.4 : 0001111223333333333333333333333 Q-40 2.4 : 0000112233333333333333333333333 Q-41 2.6 : 0012222333333333333333333333333 Q-42 2.3 : 000011222222333333333333333333 Q-43 2.2 : 0000222222222233333333333333 Q-44 3.0 : 33 *AVG 2.4 : Assignment 11 <------------- ------ Assignment 12 ----------------------------------------------- ----- Assignment 12 --------------------------------------------------------- Q-00 3.0 : 33333333333 Q-01 2.0 : 0000011111222233333333333333 Q-02 2.0 : 0000011112222233333333333333 Q-03 2.1 : 00000012223333333333333333 Q-04 2.2 : 000233333333 Q-05 2.2 : 000233333333 Q-06 2.2 : 000233333333 Q-07 2.2 : 000233333333 Q-08 2.2 : 000233333333 Q-09 2.2 : 000233333333 Q-10 2.2 : 000233333333 Q-11 2.2 : 000233333333 Q-12 2.2 : 000233333333 Q-13 2.2 : 000233333333 Q-14 3.0 : 3 Q-15 3.0 : 3 Q-16 3.0 : 3 Q-17 3.0 : 3 Q-18 3.0 : 3 Q-19 3.0 : 3 Q-20 3.0 : 3 Q-21 3.0 : 3 Q-22 3.0 : 3 Q-23 3.0 : 3 Q-24 3.0 : 3 Q-25 3.0 : 3 Q-26 3.0 : 3 Q-27 3.0 : 3 Q-28 3.0 : 3 Q-29 3.0 : 3 Q-30 3.0 : 3 Q-31 3.0 : 3 Q-32 3.0 : 3 Q-33 3.0 : 3 Q-34 3.0 : 3 Q-35 3.0 : 3 Q-36 3.0 : 3 Q-37 3.0 : 3 Q-38 3.0 : 3 Q-39 3.0 : 3 Q-40 3.0 : 3 Q-41 3.0 : 3 Q-42 3.0 : 3 Q-43 3.0 : 3 *AVG 2.7 : Assignment 12 <------------- -- | Ian! D. Allen - idallen@idallen.ca - Ottawa, Ontario, Canada | Home Page: http://idallen.com/ Contact Improv: http://contactimprov.ca/ | College professor (Free/Libre GNU+Linux) at: http://teaching.idallen.com/ | Defend digital freedom: http://eff.org/ and have fun: http://fools.ca/