Đã hoàn thành

This program is to show the use of multithreading and to implement message passing through shared memory

This program is to show the use of multithreading and to implement message passing through shared memory. The code in each thread that accesses the shared memory is a critical section, and you need to avoid race condition using the pthread library functions ??" pthread_mutex_lock and pthread_mutex_unlock ??" Write a program with three threads ??" reader, modifier, and printer. The reader thread reads an input file, one character at a time, and passes on the character to the modifier through a common buffer that can hold only one character. The reader should not send another character until the previous character has been taken by the modifier. The modifier thread receives the character from the common buffer with the reader. If the character is a, it sends the character % to the printer thread. If the character received is b it sends two stars (*) to the printer ??" one at a time. If the character received is c, then it sends three #’s to the printer ??" one at a time. All other characters are sent as they are received. Again the common buffer between the modifier thread and the printer thread can hold only one character, and the same restrictions as above also apply in this case. Finally, the printer thread prints the character received from the modifier thread ??" one character at a time. Use file1 of the previous project as input to this program also.

## Deliverables

Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. "WITH COMMENTS" Complete copyrights to all work purchased.

## Platform

UNIX

## Deadline information

Dead line is 20th Feb. 1.00 pm US central time. CODE with COMMENTS.

Kĩ năng: Lập trình C, Kĩ thuật, Linux, MySQL, PHP, Kiến trúc phần mềm, Kiểm tra phần mềm, UNIX

Xem nhiều hơn: thread programming, programming race condition, multithreading programming, in this line, program line, above the line, Use, use case, shared, Pthread, need a three character, multithreading, memory c, hold source code, buffer source code, message passing, write pthread program, send line message program, send file printer, project shared library

Về Bên Thuê:
( 6 nhận xét ) United States

ID dự án: #2838997

Được trao cho:

technologyi2i

See private message.

$7 USD trong 14 ngày
(8 Đánh Giá)
2.5

12 freelancer đang chào giá trung bình $26 cho công việc này

pelkinsoftm

See private message.

$34 USD trong 14 ngày
(49 Nhận xét)
6.1
andreifortuna

See private message.

$17 USD trong 14 ngày
(12 Nhận xét)
5.7
nedani

See private message.

$21.25 USD trong 14 ngày
(53 Nhận xét)
5.4
bokbokan

See private message.

$21.25 USD trong 14 ngày
(78 Nhận xét)
5.2
deovalente

See private message.

$25.5 USD trong 14 ngày
(15 Nhận xét)
4.6
wirovw

See private message.

$34 USD trong 14 ngày
(11 Nhận xét)
4.2
Meg341

See private message.

$34 USD trong 14 ngày
(14 Nhận xét)
3.5
dannynoest

See private message.

$25.5 USD trong 14 ngày
(15 Nhận xét)
2.7
vw182605vw

See private message.

$25.5 USD trong 14 ngày
(0 Nhận xét)
0.0
ctrucza

See private message.

$34 USD trong 14 ngày
(0 Nhận xét)
0.0
codingchampvw

See private message.

$34 USD trong 14 ngày
(0 Nhận xét)
0.0