The ROme OpTimistic Simulator  2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
fossil.c File Reference

Housekeeping operations. More...

#include <arch/thread.h>
#include <core/init.h>
#include <gvt/gvt.h>
#include <gvt/ccgs.h>
#include <mm/state.h>
#include <mm/mm.h>
#include <scheduler/process.h>
#include <scheduler/scheduler.h>
#include <statistics/statistics.h>
+ Include dependency graph for fossil.c:

Go to the source code of this file.

Functions

void fossil_collection (struct lp_struct *lp, simtime_t time_barrier)
 
void adopt_new_gvt (simtime_t new_gvt)
 

Variables

static unsigned long long snapshot_cycles
 Counter for the invocations of adopt_new_gvt. This is used to determine whether a consistent state must be reconstructed.
 

Detailed Description

Housekeeping operations.

In this module all the housekeeping operations related to GVT computation phase are present.

This file is part of ROOT-Sim (ROme OpTimistic Simulator).

ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.

ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Author
Alessandro Pellegrini
Francesco Quaglia

Definition in file fossil.c.

Function Documentation

void adopt_new_gvt ( simtime_t  new_gvt)

This function is used by Master and Slave Kernels to determine the time barrier and perform some housekeeping once the new GVT value has been computed.

Parameters
new_gvtThis is a new GVT value which has been computed and can be used to perform fossil collection and to activate CCGS

Definition at line 96 of file fossil.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void fossil_collection ( struct lp_struct lp,
simtime_t  time_barrier 
)

Determine which snapshots in the state queue can be free'd because are placed before the current time barrier.

Queues are cleaned by deleting all the events the timestamp of which is STRICTLY lower than the time barrier. Since state_pointer points to an event in queue_in, the state queue must be cleaned after the input queue.

Parameters
lpA pointer to the lp_struct for which we want to recollect memory
time_barrierThe current barrier

Definition at line 53 of file fossil.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: