Author Topic: Assignment  (Read 2949 times)

0 Members and 1 Guest are viewing this topic.

Offline nrajeshkumars

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
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.

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 1166
  • Karma: 36
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: Assignment
« Reply #1 on: October 01, 2014, 10:00:56 am »
A) We don't do people's homework.

B) This is nothing to do with Linux.

Offline BkS

  • BkS Media Founder
  • Hero Member
  • *****
  • Posts: 1690
  • Karma: 49
  • Gender: Male
  • sudo service reality-check start
    • View Profile
    • BkS Media
    • Awards
Re: Assignment
« Reply #2 on: October 02, 2014, 04:40:09 pm »
LOL.

Console.WriteLine("I don't even understand why this post is here");
If you try to look through Windows, you can see what the person is doing.
If you try to look through a Penguin, it WILL bite you.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal