The Linux Community Forum

The Forums => Linux Tips & Tricks => Topic started by: nrajeshkumars on September 30, 2014, 08:26:46 pm

Title: Assignment
Post by: nrajeshkumars on September 30, 2014, 08:26:46 pm
write a server program that accepts the input to generate the Fibonacci sequence and puts that number accepted from command line in the shared memory. Also write a Client program accesses the number from shared memory and generates the Fibonacci sequence. 
The shared memory should have two integer variables (Hint: Define a struct with these two int variables), one is status and the other is fibCount which stores the number to generate Fibonacci sequence. Variable status should have the value DATA_NOT_FILLED (-1)  if the shared memory has not yet been filled with fibCount, DATA_FILLED(0) if the server has filledfibCount in the shared memory, and DATA_TAKEN(1) if client has taken the fibCount in shared memory. Once client accesses the shared memory and receives the number and generates the Fibonacci sequence as in programming assignment 1, the status should be changed toDATA_FILLED, and then the server detaches and removes the shared memory.
Hint: Define DATA_NOT_FILLED, DATA_FILLED and DATA_TAKEN as constants with the values -1, 0 and 1 respectively.
Title: Re: Assignment
Post by: chemicalfan on October 01, 2014, 10:00:56 am
A) We don't do people's homework.

B) This is nothing to do with Linux.
Title: Re: Assignment
Post by: BkS on October 02, 2014, 04:40:09 pm
LOL.

Console.WriteLine("I don't even understand why this post is here");
SimplePortal 2.3.3 © 2008-2010, SimplePortal