Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Topics - nrajeshkumars

Pages: [1]
1
Linux Tips & Tricks / Assignment
« 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.

Pages: [1]

SimplePortal 2.3.3 © 2008-2010, SimplePortal