Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design and implement versions of send() and receive() that record up to K messages per process. The low level messaging system has two important functions

Design and implement versions of send() and receive() that record up to K messages per process. The low level messaging system has two important functions send and receive. One main issue with the low level messaging is there is only one message and if another message is sent to a process, this message will be ignored. You are required to change the original send and receive functions to allow sending and receiving up to K messages.

Help instructions (You do not have to follow the following instructions).

1. Edit the original send and receive functions or create new send and receive functions and call them sendk and receivek.

2. In your main function, you can call the new send and receive functions or you can create new shell commands to be able to call the new send and receive functions from the shell.

3. To show that your new messaging system can now accept up to K messages. Assume K in your program as 5. Then, send 10 messages. So, if your system is working, you should fill a buffer of the first five messages and then show an error for the other five messages.

4. To receive the five messages sent before, you can get them from the buffer in FIFO or in LIFO. Whatever you prefer.

5. prhasmsg flag should be updated to handle more situations (not only true and false) since a process can have more than one message i.e. up to k messages.

Note: Write the code in "C" programming language.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

explain what is meant by redundancy

Answered: 1 week ago