RHIT-CSSE / csse332

This is the course repo for CSSE 332 @ Rose-Hulman
https://www.rose-hulman.edu/class/csse/csse332/current/
MIT License
8 stars 63 forks source link

Suggested HW changes #12

Open agmui opened 5 months ago

agmui commented 5 months ago

Suggested HW changes

Condvars basic

for tunnel.c please have the students print out if an ambulance or car wants to enter the tunnel. I can add a check to the autograder to see if a car goes in if an ambulance is waiting. https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/condvar/tunnel.c#L53

for example:

Car (1) entered tunnel in EW direction...
Car (2) entered tunnel in EW direction...
Car (3) entered tunnel in EW direction...
Car (16) entered tunnel in WE direction...
Ambulance 31 waiting to enterer the tunnel in WE direction
Car (4) waiting to enter tunnel in EW direction...
Car (16) exited tunnel in WE direction...
Ambulance 31 entered the tunnel in WE direction
Car (2) exited tunnel in EW direction...
Car (1) exited tunnel in EW direction...
Car (3) exited tunnel in EW direction...
Ambulance 31 exited the tunnel in WE direction

typo:

Most common bugs/warnings for condvars basic

inorder.c:

tunnel.c:

Tests that should be added:

inorder.c:

tunnel.c:

Condvars 2

There were many cases where people got docked for putting their print statements in the wrong place. Have it so that the print and sleep statements are wrapped in a function, called critical_section() or something, so to the students it would seem more important and place it in the correct position. Doing this also will help with the autograder because sometimes people forget to put in print statements and the autograder would mark it as wrong.

hen.c:

Tests that should be added:

hen.c:

Scheduler hw

This list just contains the most common misconceptions I saw when helping others complete the lab:

  1. Please better emphasize user should be on klist branch. Some people just skip the top part of the lab?

  2. mini btop guide like how to search with f -> arrows keys -> hit enter https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/sched/index.md?plain=1#L134

without wfi

image

correct solution:

image

  1. Say to read only ch 7.3 not just ch 7 https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/sched/index.md?plain=1#L99

  2. Clarify that CPUs stand for cores https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/sched/index.md?plain=1#L109

  3. be more explicit with how the casting of list_head to proc* works. Many students missed that section. Like have a mention of this outside of the api demo. https://github.com/RHIT-CSSE/csse332/blob/4566802a928388e0d7f113f423f4a0786f6792a0/labs/sched/index.md?plain=1#L252

  4. remove the iteration example because it is easier to just pop of the queue This is bc people will implement an iterator when doing the assignment https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/sched/index.md?plain=1#L255

  5. Change the wording of "process control block" to struct many people were confused https://github.com/RHIT-CSSE/csse332/blob/4566802a928388e0d7f113f423f4a0786f6792a0/labs/sched/index.md?plain=1#L272

  6. explain what userinit and procinit do or at least say that these functions only run once at the beginning and students could potently put init code in there.

  7. Have a better pseudo-code explanation of runq.
    For example, make this analogy:

    There are 4 chefs in the kitchen(harts) and they get a queue of orders coming in. Each chef takes the first order of that queue and starts working. Then hint that to add to the queue a proc must be marked RUNNABLE. Since 2 chefs can't take the same order at the same time they need to lock.

In the end, just communicate these 2 things:

  1. Add hints that there won't be big modifications to most functions(only around 6).
    Reminder users how to search in vim (use "/") and to just search RUNNABLE as a hint.

  2. Remind students that they can use procdump for debugging

  3. Remind students that they need to also lock when the scheduler is checking when the queue is empty. Many people forget and only lock when popping from the queue.

  4. Clarify that you only need to run usertests forkforkfork nothing else because some people ran usertests at the end https://github.com/RHIT-CSSE/csse332/blob/5e639c2059cafd7fab88cbbd86690970ead15982/labs/sched/index.md?plain=1#L330

typos: