Writers and readers problem