System V queue implementation