For this assignment, and all written homework assignments, you are welcome, and encouraged, to work in small groups (2 or 3 students) either trying to solve the problems together or trying to verify each other's solutions prior to submitting them. If you solve the problems as a group, you should submit your own write-up of the assignment and list the other students you worked with.
        process         arrival time            CPU burst size
        -------         ------------            --------------
          P1              0                        10
          P2              3                         4
          P3              4                         6
          P4              5                         8
          P5              6                         4
 
	
          $ cat foo | grep blah	
This homework is designed to give you some practice solving synchronization problems before the midterm.
Do the following problems:
Examine Linux's support for linked lists. The interface is defined in include/linux/list.h, and uses of lists can be found throughout the kernel source. In particular, look at code that moves task_struct structs from list to list.
Assume that the following struct definition exits:
struct test_struct {
    int x;
    struct list_head  list;
};
  USING ONLY FUNCTIONS AND MACROS from list.h, for each of the  
  following operations: (1) list the C code fragment that
  performs the operation AND (2) draw a picture of memory that is the result
  of performing the operation if it changes either list in either way from
  the previous operation (label all fields in all structs and show their
  values, draw pointers fields as arrows to what they point to not as
  numeric address values):