#Lab on Semaphores & Shared Memory

6 messages · Page 1 of 1 (latest)

vapid herald
#

The purpose of the lab is to create a telephone-style game. What I need it to do is print the last line added to the file (telephone.txt) and then prompt the user for the next line. This next line will be added to the file and its size will be saved in the shared memory. There's also a semaphore involved to make sure there is only one user writing at a time.

I have two files, control.c for monitoring the semaphore / shared memory / file, and game.c for the implementation of the game.

Fair warning: I just have a general set of what functions I should use, and I don't really understand how semaphores and shared memory work. I'm... struggling.

languid knollBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

vapid herald
#

I realize my question is incredibly unspecific, I just don't really understand anything ab semaphores / shared mem tbh

languid knollBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.