Re: BLCR and systemcalls

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed Feb 08 2006 - 14:15:38 PST

  • Next message: andron_at_clccorp_dot_com: "(no subject)"
       System calls interact with BLCR's checkpoint in the same manner that 
    they do with normal POSIX signals.  Most calls will return -1 with 
    errno=EINTR when they are interrupted by a checkpoint.  However, there 
    are calls like read(), write, send() and friends that may instead return 
    indicating a read or write of fewer bytes than requested.
       So, if you truely must ensure the read() call is atomic (no short 
    reads) you may need to prevent checkpoints in part of your code.  Have a 
    look at cr_enter_cs() and cr_leave_cs() in libcr.h.  These provide a way 
    to define critical sections which will not be checkpointed.  Any 
    checkpoint request arriving between these two calls will be queued, and 
    executed at (or soon after) the cr_leave_cs().  Note, however, that a 
    *blocking* read() in the critical section might prevent checkpointing at 
    sichiwai wrote:
    > Hello,
    > I have another question. What is the behaviour of systemcalls during a
    > checkpoint. Are systemcalls atomic regarding to the checkpointing procedure?
    > The reason why I ask this, is that I need to be shure that a
    > read-systemcall reading from a tcp socket is either complete or not
    > executet at all, during a checkpoint.
    > Regard
    >   Christian
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group
    HPC Research Department                   Tel: +1-510-495-2352
    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

  • Next message: andron_at_clccorp_dot_com: "(no subject)"