cis4307, Fall 2009 10 Minute Test # 1 September 10, 2009 (10) 1. Implement the lock operation of spinlocks using the CompareAndSwap instruction. (10) 2. Spinlocks suffer of the Priority Inversion problem. Describe in detail what it is. (15) 3. Implement in C the function char * doubleup(const char * s) which, given a string s, returns a new string consisting of s with each character repeated twice. So doubleup("nabucco") is "nnaabbuuccccoo".