small operation system

use C

Program puts prompt "How many" on the standard input. The user types an inter,NN at the [url removed, login to view] your program types a prompt "SLEEP". The user then gives the argument to be put in the sleep command (start with 0) in your program. use 0 to start with.

The program should generate two processes, PRODUCER and CONSUMER.

PRODUCER should generate expressions of the form n1+n2, where n1 and n2 are [url removed, login to view] integers should be produced by a rodom number generator and should be in the range 1-99. After it produces such an expression it should write it to file SHAREFILE. The program should produce a total of NN such expressions writing each to SHAREFILE. After the write to SHAREFILE place a "sleep(SLEEP)" command in the PRODUCER program.

COnsumer should read an expression from file SHAREFILE concatenate = n3 to it. The entire resulting expression is n1+n2 =n3, where n3 is the correct sum 0f n1 and n2. CONSUMER then puts [THE INFORMATION NECESSARY TO PRINT THAT RESULT IN THAT FORM] in its own memory, CONSOWN, location. It should process NN such expressions. CONSUMER also keeps a counter, COUNT,EACH time that CONSUMER looks for the next item in SHAREFILE and it is not there CONSUMER increments COUNTER [AND TRIES AGAIN]. When consumer has finished putting NN expressions in CONSOWN it should print them out in readable form , one expression per line. It should print out COUNT. After this printout, both processes should terminate gracefully.

In program, "12+7" -> use (fscanf and fgets) to get string

Syntax is like:





example PRODUCER generated expressions



corresponding CONSUMER printout expressions



## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.

3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

4) use system call sleep(), fork(), + another if you need.

## Platform

unix sun os 5.8 , C,

gcc command to compile.

Навички: Програмування на С, PHP

Деталі: writing prompt generator, writing in standard form, writing generator, writing expressions, writing a code generator, where to start programming, syntax programming, syntax in programming, sun source, standard c types, sleep programming, programming syntax, programming expression, n3, N2, integers form 1, how to work integers, how to be a producer, get a producer, fgets c programming

Про роботодавця:
( 0 відгуки(-ів) ) United States

ID Проекту: #2980260

4 фрілансерів(-и) готові виконати цю роботу у середньому за $42


See private message.

$56.95 USD за 4 дні(-в)
(15 відгуків(и))

See private message.

$25.5 USD за 4 дні(-в)
(1 відгук)

See private message.

$42.5 USD за 4 дні(-в)
(0 відгуків(и))

See private message.

$42.5 USD за 4 дні(-в)
(1 відгук)