Terminé

Write some Software

Your task is to implement a semaphore-based solution to

the problem stated below.

Consider a system with N blocks of storage, each of which holds one unit of information (e.g. an integer,

character, or employee record). Initially, these blocks are empty and are linked onto a list called freelist.

Three processes communicate using shared memory in the following manner:

Shared Variables: freelist, list-1, list-2: block (where block is some data type to hold items)

Using the appropriate libraries, rewrite the pseudo-code as actual Unix/Linux processes, using semaphores to

implement the necessary mutual exclusion and synchronization. The solution must be deadlock-free and

concurrency should not be unnecessarily restricted. Further, you will have to implement a correct representation

of the three lists so that access to them is shared among the processes.

Deliverables: You must submit a working solution that compiles without errors on the CSE computers. Further,

you must submit a detailed description of the approach you have used to solve the problem.

Grading: Your project will be graded on program correctness, particularly whether it is avoiding deadlocks and

its ability to maximize concurrency among the three processes. Further, the detailed description of your approach

regarding shared list implementation and the synchronization mechanisms used will weigh in the final project

grade.

PROCESS #1

var b: pointer to type block;

while (1)

{

b:= unlink(freelist);

produce_information_in_block(b);

link(b, list1);

}

PROCESS #2

var x,y: pointer to type block;

while (1)

{

x:=unlink(list-1);

y:=unlink(freelist);

use_block_x_to_produce info_in_y(x, y);

link(x, freelist);

link(y, list-2);

}

PROCESS #3

var c: pointer to type block;

while(1)

{

c:=unlink(list-2);

consume_information_in_block(c);

link(c, freelist);

}

Using the appropriate libraries, rewrite the pseudo-code as actual Unix/Linux processes, using semaphores to

implement the necessary mutual exclusion and synchronization. The solution must be deadlock-free and

concurrency should not be unnecessarily restricted. Further, you will have to implement a correct representation

of the three lists so that access to them is shared among the processes

Compétences : Programmation C, Programmation C++, Linux, Architecture Logicielle

en voir plus : write software reviews, looking someone write software, perl include file shared variables, c++programming, write software brochure, write software requirement specification, getafreelancercom write software programs reviews, write software mobile, msr206 write software demo, someone write software, find someone write software, write software gps system, write software iphone gps, write software functional specification outline, need someone write software, write software functional description pdf, free english speaking write software

Concernant l'employeur :
( 1 commentaire ) denton, United States

Nº du projet : #15408790

Décerné à:

kaloyan13

I have worked with producer/consumer models in Linux, using C. Relevant Skills and Experience C, Linuxm synchronization, semaphores Proposed Milestones $80 USD - final milestone

%selectedBids___i_sum_sub_4% %project_currencyDetails_sign_sub_5% USD en 1 jour
(430 Commentaires)
7.2

7 freelance font une offre moyenne de $139 pour ce travail

liveexperts123

please ignore the bid amount we will discuss the price later in the chat after we have discussed the project thoroughly Relevant Skills and Experience: . Proposed Milestones: 190 - . Hi varmaraobujji! Please drop a mes Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(65 Commentaires)
7.2
utkarshkatiyar19

Hi, i have understood the project. i can easily complete it for you. we can have a chat thanks Relevant Skills and Experience c programming Proposed Milestones $140 USD - all

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(389 Commentaires)
7.3
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(44 Commentaires)
5.8
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(46 Commentaires)
5.2
nabnab556

Hi! Dear if you have any work for a programmer to do some applications,then I will do this task.i have a good typing and also work on turbo C++.

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 2 jours
(0 Commentaires)
0.0
%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(0 Commentaires)
0.0