Question
Two processes, client and server, communicate via two message queues Up and Down. Server ^ | Up | v Down Client The client reads a
Two processes, client and server, communicate via two message queues "Up" and "Down". Server ^ | Up | v Down Client The client reads a message from the standard input and sends it to the server via the Up queue, then waits for the server's answer on the Down queue. The server is specialized in converting characters from lower case to upper case and vice versa. Therefore, if the client sends the message "lower case" via the Up message queue, the server will read the message, convert it, and send "LOWER CASE" via the Down queue. When the client receives the message from the server, it prints it out. You may assume the maximum size of any message is 256 bytes. Multiple clients must be able to connect to the up and down queues. However, what happens if one client puts a letter to convert on the system and another client is waiting for it's response from the queue? There are different ways to handle this, but you should handle this using typed messages. Each client has a particular client number based on the last 4 digits of its process ID. Use this 4-digit number as the client identifier, and use typed messages on the queue so that each client can always be sure to receive the letter that it is waiting on to be converted.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started