Develop a Producer/Consumer Application
Budget: $30 – $250 USD
To develop a synchronous inter-process communication through the use ofboth fork(), pipe(). and exec()system calls. For this exercise only ordinary pipes are to be used.
What to Do
You are to develop a producer/consumer application. Both the C programming languageand any distribution of the Linux operating system are to be used. Your solution must be structured as a set ofservices. The core service is the inter-process communication which it is referred here as the producer/consumer service.
Details
A synchronous producer/consumer pair of processes is to be created to support the service of
replacing all lowercase letters in a set of strings of characters with their uppercasecorrespondent. The service above described willrequire support of a set of other services t operform
1. the encoding a n ddecoding of the data,
2. to change lowercase letters into uppercase,
3. to open and close files,
4. to include and verify parity bits,
5. to read from pipes, and
6. to write to pipes.
Both the standard ASCIl character set and odd bit parity are to be used. All data communications between producer and consumer are to be done by reading and writing through two shared pipes. The data generated by the producer is encoded and shared with the consumer through one pipe.
The consumer decodes the message, modifies it, encodes it, and shares it with the producer through the second pipe.
You are to create a library to support your producer/consumer process activities. The file "encDec.h" is to be created and it must contain the prototypes of all code required to support the producer/consumer activities as described by the services provided by the three layers discussed below. All access to the services provided by this library must be done only through the use of any of the members of the exec() family of system calls. The three distinct layers to be created are physical, data link and application and details regarding the services each one of them provided are as follows:
1. The physical layermust contain routines tohandle tasks such as a. converting a character into a binary bit pattern,
b. converting binary patterns into characters,
c. including a parity bit, and
d. checking and removing the parity bit.
2. The data link layer must contain routines for
a. framing (putting two SYN characters, a LENGTH character, and data into a frame), and
b. deframing (separatingcontrol characters from data characters). 3. The application layer must contain routines to handle tasks such as
a. reading data to be transmitted from input data files in the producer, and
b. writing received data into display (or output data file) in the consumer.
What to Do
You are to develop a producer/consumer application. Both the C programming languageand any distribution of the Linux operating system are to be used. Your solution must be structured as a set ofservices. The core service is the inter-process communication which it is referred here as the producer/consumer service.
Details
A synchronous producer/consumer pair of processes is to be created to support the service of
replacing all lowercase letters in a set of strings of characters with their uppercasecorrespondent. The service above described willrequire support of a set of other services t operform
1. the encoding a n ddecoding of the data,
2. to change lowercase letters into uppercase,
3. to open and close files,
4. to include and verify parity bits,
5. to read from pipes, and
6. to write to pipes.
Both the standard ASCIl character set and odd bit parity are to be used. All data communications between producer and consumer are to be done by reading and writing through two shared pipes. The data generated by the producer is encoded and shared with the consumer through one pipe.
The consumer decodes the message, modifies it, encodes it, and shares it with the producer through the second pipe.
You are to create a library to support your producer/consumer process activities. The file "encDec.h" is to be created and it must contain the prototypes of all code required to support the producer/consumer activities as described by the services provided by the three layers discussed below. All access to the services provided by this library must be done only through the use of any of the members of the exec() family of system calls. The three distinct layers to be created are physical, data link and application and details regarding the services each one of them provided are as follows:
1. The physical layermust contain routines tohandle tasks such as a. converting a character into a binary bit pattern,
b. converting binary patterns into characters,
c. including a parity bit, and
d. checking and removing the parity bit.
2. The data link layer must contain routines for
a. framing (putting two SYN characters, a LENGTH character, and data into a frame), and
b. deframing (separatingcontrol characters from data characters). 3. The application layer must contain routines to handle tasks such as
a. reading data to be transmitted from input data files in the producer, and
b. writing received data into display (or output data file) in the consumer.