shared memory and semphore usage