Labs
Labs help students gain initial familiarity with applying course concepts. Many labs are focused on specific skills needed for the assignments.
Expand for Lab Schedule
Room: SRYE 4013
- Monday
- 12:30pm (D207 & D208)
- Wednesday
- 2:30pm (D201 & D202)
- 3:30pm (D203 & D204)
- 4:30pm (D205 & D206)
Lab directions
- Submit your completed lab online to CourSys (not Canvas, not GitHub).
- Labs are marked on completion, not correctness, so complete each part to the best of your ability and learn.
- Labs are due Sunday 11:59pm. Extensions possible only in exceptional cases.
- It is recommended that students attend in-person lab sections for lots of support!
- You are invited to come to any (or more than one) lab section.
- There is no need to attend the section you are enrolled in.
- There is no need to attend any lab sections: there is no attendance taken.
- You can complete each lab on your own time or own computer if you like.
- While completing these labs, you are encouraged to help your classmates and receive as much help as you like. Assignments, however, are individual work and you must not work with another person on assignments.
- I recommend coming to the lab and working with someone.
- Failing that, I recommend getting together with someone in the class outside of lab time to work through the lab together.
- Failing that, you are welcome to complete the lab exercises without any collaboration.
- Each student must submit their lab to get marks.
- Academic honesty expectations for labs are that each student types their own lab solution. It is OK to share ideas and help each others with specific coding issues and design. It is not permitted to submit another student's file for credit.
- If using CSIL lab PC:
- [Only CSIL PC] If in Windows, reboot to Linux; while booting, select Ubuntu from boot menu.
- [Only CSIL PC] Don't setup GitHub tokens in the
cmpt201
container because it may be shared with other users. - [Only CSIL PC] Delete any possible previous docker container before starting the lab:
docker rm cmpt201
- [Only CSIL PC] When done your lab, copy your solution out of the container, then execute the above docker command to delete your docker container to leave it clean for the next user.
- You do not need to use
.record
Labs
- No Lab (Week of Jan 6)
- No lab this week. Don't show up, we won't be there either!
- Lab 1 (Week of Jan 13) -
getline()
,strtok_r()
- Lab 2 (Week of Jan 20) - `fork()', 'exec()', 'wait()'
- Preparation Material:
- Lab solution.
- Lab 3 (Week of Jan 27) - Input History
- Preparation Material:
- getline()
- C arrays
- Lab solution.
- Preparation Material:
- Lab 4 (Week of Feb 3) - Heap Memory / Memory Allocation
- Preparation Material:
- Know
sbrk()
function. - Understand memory allocation from notes, see slides.
- C Skills
- Able to create and use structs.
- Able to use pointers: type cast, dereference, pointer arithmetic.
- Know
- Lab solution.
- Preparation Material:
- Lab 5 (Week of Feb 10) - Memory Allocation Algorithms
- Preparation Material:
- Understand memory allocation from notes, see slides.
- Able to work with a C linked-list.
See YouTube Video on Linked List in C
- Lab solution.
- Preparation Material:
- Lab 6 (Week of Feb 24) - Debugging & Asserts
- Preparation Material:
- Able to work with a C linked-list.
See YouTube Video on Linked List in C
- Able to work with a C linked-list.
- Lab solution.
- Preparation Material:
- Lab 7 (Week of Mar 3) - MapReduce
- Preparation Material: Understand MapReduce
- Lab solution.
- Lab 8 (Week of Mar 10) - Threading Activity with uthash
- Preparation Material:
- Read about the
uthash
library. - C Skills
- Able to use structs, arrays, pointers
- Able to compile, run, and debug C programs using CMake.
- Read about the
- Lab solution.
- Preparation Material:
- Lab 9 (Week of Mar 17) - Socket Programming
- Preparation Material:
- Linux socket programming.
- C Skills
- Able to use structs, arrays, pointers
- Able to compile, run, and debug C programs using CMake.
- Lab solution.
- Preparation Material:
- Lab 10 (Week of Mar 24) - Multiple-Client socket programming
- Preparation Material:
- Linux socket programming.
- C Skills
- Able to use structs, arrays, pointers
- Able to compile, run, and debug C programs using CMake.
- Lab solution.
- Preparation Material:
- Lab 11 (Week of Mar 31) - Two Truths and a Lie = Signature Verification
- Read how to verify a message by its signature: OpenSSL Wiki re EVP Signing and Verifying.
- Focus on the section about Asymmetric Key, specifically about Verifying a message digest.
- You should really do this reading! It shows sample code (the first one under Verifying is very helpful)! Read the section, not just the code.
- Good to have some initial familiarity with:
- C Skills
- Able to use files, arrays, pointers.
- Able to compile, run, and debug C programs using CMake.
- Lab solution.
- Read how to verify a message by its signature: OpenSSL Wiki re EVP Signing and Verifying.
- Note: No lab exercise during week of April 7th
- TAs will still be in lab during lab time as normal.