Low Level Implementation fo the Producer Consumer