CS475 - Helpful Hints This project can be confusing. This document is going to try and give you a big picture that will help you out on your way to becoming OS wizards. ___________________________ How do I get started? Organize your groups 2 or 3 mail your grader and inform him about your group and its members - include a name for your project and a title of "CS475" Work hard sleep less :-) :-) consume large amounts of caffeine and junk food understand, modify, expand thread functions learn other thread functions (man/docs/etc) ____________________________ How is this going to work? Here is a step through of the problem. Your main () will follow this type of structure. main() { set up variables, free lists, etc, etc set up the thread environment determine which thread group should run (possibly command line arguments?) do at_ready(t_create(wanted_function)) then call scheduler exit } After your main finishes, you will have 1 item on the ReadyQ. The scheuler then lets this thread run until the quantum is up. It will then schedule the next thread to run(still could be the first, but it might not be). Once the ReadyQ is empty, then print out important information and exit. __________________________ What are the test threads going to look like? An example test thread might look like this. /* this will test to see if your OS can handle ll threads that go to * completion */ tgl() { int i; for (i=10; i;i--) { printf("creating thread %i \n",i); t_ready(t_create(looper)); } t_destroy(); } looper() { int x,y; for(x=10;x;x--) { for(y=1000;y;y--) printf("%i in loop %i\n",(int)t_myid(),x); } t_destroy(); } _____________________________- How will I get the supplied test groups into my code? You will be supplied with a .o file for each thread group. You will have all .o files in your Makefile so that they are included when you compile your OS. Then with the given function name, you create and ready it. The initial thread will then do whatever it wants to do.