Added semaphores to kmalloc