Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > Programming > Perl Modules

    IPC::ScoreBoard 0.05

    Download button

    No screenshots available
    Downloads: 214  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Torsten Fortsch | More programs
    Perl Artistic License / FREE
    July 31st, 2010, 14:57 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    IPC::ScoreBoard description

    IPC similar to the Apache scoreboard

    A scoreboard is a set of integer numbers residing in shared memory. It is organized as 2-dimensional array where a line in one of the dimensions is called a slot. So, in other words the scoreboard is a set of slots and each slot is a set of integer numbers.

    The idea is that in a system of processes or threads of execution each process owns a slot. A process can change the values in its own slot at will but must adhere to read-only access to other slots.

    There is one extra slot at the end of the scoreboard that is allowed to be used by every process. However the IPC::ScoreBoard module does not provide any kind of locking to synchronize access.

    The extra slot can differ in size from the other normal slots.

    A scoreboard can be anonymous or it can have a name in the file system and hence be accessed by unrelated processes.

    SYNOPSIS

     use IPC::ScoreBoard;

     # create an anonymous scoreboard
     my $sb=SB::anon $nslots, $slotsize, $extra;

     # create a file base board
     my $sb=SB::named $filename, $nslots, $slotsize, $extra;

     # open a file based board
     my ($sb, $nslots, $slotsize, $extra)=SB::open $filename;

     # set/set a value
     SB::set $sb, $slotidx, $elidx, $integer_value;
     $value=SB::get $sb, $slotidx, $elidx;
     @values=SB::get_all $sb, $slotidx;

     # increment/decrement
     SB::incr $sb, $slotidx, $elidx, $integer_value;
     SB::decr $sb, $slotidx, $elidx, $integer_value;

     # sum functions
     $sum=SB::sum $sb, $elidx;
     @sums=SB::sum_all $sb;

     # access extra space
     SB::set_extra $sb, $elidx, $integer_value;
     $value=SB::get_extra $sb, $elidx;
     @values=SB::get_all_extra $sb;

     SB::incr_extra $sb, $elidx, $integer_value;
     SB::decr_extra $sb, $elidx, $integer_value;

     # fetch parameters
     $nslots=SB::nslots $sb;
     $slotsize=SB::slotsize $sb;
     $nextra=SB::nextra $sb;

     # does the compiler provide atomic increment/decrement operations?
     if( SB::have_atomics ) {
     # increment and decrement operations are atomic
     }



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Apache scoreboard | Perl module | IPC | Apache | scoreboard



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM