2005-01-20 23:22:22 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
2003-08-01 21:20:20 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
2003-08-01 21:20:20 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// This software 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 Lesser General Public License for more details.
|
2002-04-30 22:22:54 +00:00
|
|
|
//
|
2005-01-20 23:22:22 +00:00
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2002-07-15 05:34:32 +00:00
|
|
|
#ifndef _CLIENT_STATE_
|
|
|
|
#define _CLIENT_STATE_
|
|
|
|
|
2004-03-04 11:41:43 +00:00
|
|
|
#ifndef _WIN32
|
2002-04-30 22:22:54 +00:00
|
|
|
#include <vector>
|
2004-07-13 13:54:09 +00:00
|
|
|
#include <ctime>
|
2004-03-04 11:41:43 +00:00
|
|
|
#endif
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
#include "app.h"
|
2002-06-21 06:52:47 +00:00
|
|
|
#include "client_types.h"
|
2002-04-30 22:22:54 +00:00
|
|
|
#include "file_xfer.h"
|
2004-01-21 07:07:16 +00:00
|
|
|
#include "gui_rpc_server.h"
|
2002-04-30 22:22:54 +00:00
|
|
|
#include "hostinfo.h"
|
2002-06-21 06:52:47 +00:00
|
|
|
#include "http.h"
|
2003-05-29 23:25:15 +00:00
|
|
|
#include "language.h"
|
2004-06-12 04:45:36 +00:00
|
|
|
#include "miofile.h"
|
2002-06-21 06:52:47 +00:00
|
|
|
#include "net_stats.h"
|
|
|
|
#include "net_xfer.h"
|
2002-08-07 22:52:10 +00:00
|
|
|
#include "pers_file_xfer.h"
|
2002-04-30 22:22:54 +00:00
|
|
|
#include "prefs.h"
|
2002-06-21 06:52:47 +00:00
|
|
|
#include "scheduler_op.h"
|
2003-05-29 23:25:15 +00:00
|
|
|
#include "ss_logic.h"
|
2002-04-30 22:22:54 +00:00
|
|
|
#include "time_stats.h"
|
2003-07-30 22:02:54 +00:00
|
|
|
|
2003-10-19 01:48:32 +00:00
|
|
|
extern int add_new_project();
|
|
|
|
|
2003-07-30 22:02:54 +00:00
|
|
|
#define USER_RUN_REQUEST_ALWAYS 1
|
|
|
|
#define USER_RUN_REQUEST_AUTO 2
|
|
|
|
#define USER_RUN_REQUEST_NEVER 3
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2004-06-30 01:10:22 +00:00
|
|
|
#define DONT_NEED_WORK 0
|
|
|
|
#define NEED_WORK 1
|
|
|
|
#define NEED_WORK_IMMEDIATELY 2
|
|
|
|
|
2003-10-18 19:35:58 +00:00
|
|
|
enum SUSPEND_REASON_t {
|
|
|
|
SUSPEND_REASON_BATTERIES = 1,
|
|
|
|
SUSPEND_REASON_USER_ACTIVE = 2,
|
|
|
|
SUSPEND_REASON_USER_REQ = 4,
|
|
|
|
SUSPEND_REASON_TIME_OF_DAY = 8,
|
2004-08-05 21:42:26 +00:00
|
|
|
SUSPEND_REASON_BENCHMARKS = 16,
|
|
|
|
SUSPEND_REASON_DISK_SIZE = 32
|
2003-10-18 19:35:58 +00:00
|
|
|
};
|
|
|
|
|
2004-04-07 07:21:35 +00:00
|
|
|
#define CPU_HALF_LIFE (86400*7)
|
|
|
|
|
2003-10-27 17:10:48 +00:00
|
|
|
// CLIENT_STATE encapsulates the global variables of the core client.
|
|
|
|
// If you add anything here, initialize it in the constructor
|
2002-08-26 22:57:17 +00:00
|
|
|
//
|
2002-04-30 22:22:54 +00:00
|
|
|
class CLIENT_STATE {
|
|
|
|
public:
|
2004-10-01 08:15:58 +00:00
|
|
|
std::vector<PROJECT*> projects;
|
|
|
|
std::vector<APP*> apps;
|
|
|
|
std::vector<FILE_INFO*> file_infos;
|
|
|
|
std::vector<APP_VERSION*> app_versions;
|
|
|
|
std::vector<WORKUNIT*> workunits;
|
|
|
|
std::vector<RESULT*> results;
|
2002-04-30 22:22:54 +00:00
|
|
|
|
|
|
|
NET_XFER_SET* net_xfers;
|
2003-07-29 23:26:32 +00:00
|
|
|
PERS_FILE_XFER_SET* pers_file_xfers;
|
2002-04-30 22:22:54 +00:00
|
|
|
HTTP_OP_SET* http_ops;
|
|
|
|
FILE_XFER_SET* file_xfers;
|
|
|
|
ACTIVE_TASK_SET active_tasks;
|
|
|
|
HOST_INFO host_info;
|
2002-09-29 00:32:11 +00:00
|
|
|
GLOBAL_PREFS global_prefs;
|
2002-08-26 22:57:17 +00:00
|
|
|
NET_STATS net_stats;
|
2003-05-09 20:33:57 +00:00
|
|
|
SS_LOGIC ss_logic;
|
2004-01-21 07:07:16 +00:00
|
|
|
GUI_RPC_CONN_SET gui_rpcs;
|
2003-06-06 22:08:46 +00:00
|
|
|
LANGUAGE language;
|
2004-03-04 19:38:31 +00:00
|
|
|
TIME_STATS time_stats;
|
2004-09-26 04:16:52 +00:00
|
|
|
PROXY_INFO proxy_info;
|
2002-08-26 22:57:17 +00:00
|
|
|
|
2004-01-14 21:13:17 +00:00
|
|
|
int core_client_major_version;
|
|
|
|
int core_client_minor_version;
|
2003-03-16 21:59:11 +00:00
|
|
|
int file_xfer_giveup_period;
|
2003-07-30 22:02:54 +00:00
|
|
|
int user_run_request;
|
2004-04-01 23:19:13 +00:00
|
|
|
// values above (USER_RUN_REQUEST_*)
|
|
|
|
int user_network_request;
|
|
|
|
// same, just for network
|
2003-10-22 18:39:22 +00:00
|
|
|
bool started_by_screensaver;
|
2003-01-07 01:02:08 +00:00
|
|
|
bool exit_when_idle;
|
2004-06-15 00:46:59 +00:00
|
|
|
bool check_all_logins;
|
2003-08-14 00:02:15 +00:00
|
|
|
bool return_results_immediately;
|
2004-06-11 00:04:51 +00:00
|
|
|
bool allow_remote_gui_rpc;
|
2003-05-15 17:10:26 +00:00
|
|
|
bool show_projects;
|
2003-04-08 18:36:03 +00:00
|
|
|
bool requested_exit;
|
2003-05-15 17:10:26 +00:00
|
|
|
char detach_project_url[256];
|
|
|
|
// stores URL for -detach_project option
|
|
|
|
char reset_project_url[256];
|
|
|
|
// stores URL for -reset_project option
|
|
|
|
char update_prefs_url[256];
|
|
|
|
// stores URL for -update_prefs option
|
2004-10-01 08:15:58 +00:00
|
|
|
char main_host_venue[256];
|
|
|
|
// venue from project that gave us general prefs
|
2003-03-31 23:18:55 +00:00
|
|
|
bool exit_before_upload;
|
|
|
|
// exit when about to upload a file
|
2003-06-11 22:25:13 +00:00
|
|
|
// exponential backoff variables
|
|
|
|
int master_fetch_period, retry_base_period, retry_cap;
|
|
|
|
int master_fetch_retry_cap, master_fetch_interval;
|
|
|
|
int sched_retry_delay_min, sched_retry_delay_max;
|
|
|
|
int pers_retry_delay_min, pers_retry_delay_max, pers_giveup;
|
2003-10-19 02:54:35 +00:00
|
|
|
bool activities_suspended;
|
2004-04-01 23:19:13 +00:00
|
|
|
bool network_suspended;
|
2005-01-07 20:47:40 +00:00
|
|
|
bool executing_as_daemon;
|
2004-08-05 21:42:26 +00:00
|
|
|
bool size_overflow;
|
2005-02-01 00:54:06 +00:00
|
|
|
bool redirect_io;
|
2002-12-09 23:51:55 +00:00
|
|
|
|
2002-08-12 22:26:32 +00:00
|
|
|
private:
|
2002-08-22 21:04:42 +00:00
|
|
|
bool client_state_dirty;
|
2003-05-15 17:10:26 +00:00
|
|
|
int old_major_version;
|
|
|
|
int old_minor_version;
|
2002-08-14 23:02:32 +00:00
|
|
|
char* platform_name;
|
2003-04-01 03:28:37 +00:00
|
|
|
bool skip_cpu_benchmarks;
|
|
|
|
// if set, use hardwired numbers rather than running benchmarks
|
|
|
|
bool run_cpu_benchmarks;
|
|
|
|
// if set, run benchmarks on client startup
|
2003-02-12 19:53:46 +00:00
|
|
|
int exit_after_app_start_secs;
|
|
|
|
// if nonzero, exit this many seconds after starting an app
|
2004-10-14 22:01:05 +00:00
|
|
|
double app_started;
|
2003-02-12 19:53:46 +00:00
|
|
|
// when the most recent app was started
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2004-06-30 01:10:22 +00:00
|
|
|
// CPU sched state
|
|
|
|
//
|
2004-10-14 22:01:05 +00:00
|
|
|
double cpu_sched_last_time;
|
2004-06-30 01:10:22 +00:00
|
|
|
double cpu_sched_work_done_this_period;
|
2003-10-19 01:48:32 +00:00
|
|
|
|
|
|
|
// --------------- client_state.C:
|
|
|
|
public:
|
|
|
|
CLIENT_STATE();
|
|
|
|
int init();
|
2004-10-14 22:01:05 +00:00
|
|
|
bool do_something(double t);
|
2003-10-19 01:48:32 +00:00
|
|
|
// Initiates and completes actions (file transfers, process executions)
|
|
|
|
// Never blocks.
|
|
|
|
// Returns true if it actually did something,
|
|
|
|
// in which case it should be called again immediately.
|
|
|
|
int net_sleep(double dt);
|
|
|
|
// sleeps until either dt seconds have elapsed,
|
|
|
|
// or until there's network activity.
|
|
|
|
bool time_to_exit();
|
2004-02-28 19:11:40 +00:00
|
|
|
PROJECT* lookup_project(const char*);
|
|
|
|
APP* lookup_app(PROJECT*, const char*);
|
2003-11-02 22:51:49 +00:00
|
|
|
FILE_INFO* lookup_file_info(PROJECT*, const char* name);
|
2004-02-28 19:11:40 +00:00
|
|
|
RESULT* lookup_result(PROJECT*, const char*);
|
|
|
|
WORKUNIT* lookup_workunit(PROJECT*, const char*);
|
2003-10-19 01:48:32 +00:00
|
|
|
APP_VERSION* lookup_app_version(APP*, int);
|
|
|
|
ACTIVE_TASK* lookup_active_task_by_result(RESULT*);
|
|
|
|
int detach_project(PROJECT*);
|
2004-10-07 19:18:37 +00:00
|
|
|
int report_result_error(RESULT&, const char *format, ...);
|
2003-10-19 02:54:35 +00:00
|
|
|
int reset_project(PROJECT*);
|
2004-11-09 17:28:22 +00:00
|
|
|
int version();
|
2003-10-19 01:48:32 +00:00
|
|
|
private:
|
2002-04-30 22:22:54 +00:00
|
|
|
int link_app(PROJECT*, APP*);
|
2004-09-22 21:08:26 +00:00
|
|
|
int link_file_info(PROJECT*, FILE_INFO*);
|
2002-05-17 22:33:57 +00:00
|
|
|
int link_file_ref(PROJECT*, FILE_REF*);
|
2002-04-30 22:22:54 +00:00
|
|
|
int link_app_version(PROJECT*, APP_VERSION*);
|
|
|
|
int link_workunit(PROJECT*, WORKUNIT*);
|
|
|
|
int link_result(PROJECT*, RESULT*);
|
2003-10-19 01:48:32 +00:00
|
|
|
void print_summary();
|
2004-10-14 22:01:05 +00:00
|
|
|
bool garbage_collect(double);
|
|
|
|
bool update_results(double);
|
2004-07-14 22:54:56 +00:00
|
|
|
double total_resource_share();
|
2003-10-19 01:48:32 +00:00
|
|
|
|
|
|
|
// --------------- cs_account.C:
|
2003-10-19 02:54:35 +00:00
|
|
|
public:
|
2004-02-28 19:11:40 +00:00
|
|
|
int add_project(const char* master_url, const char* authenticator);
|
2003-10-19 01:48:32 +00:00
|
|
|
private:
|
|
|
|
int parse_account_files();
|
2003-11-02 22:51:49 +00:00
|
|
|
int parse_preferences_for_user_files();
|
2005-01-20 18:50:49 +00:00
|
|
|
|
2003-10-19 01:48:32 +00:00
|
|
|
// --------------- cs_apps.C:
|
|
|
|
public:
|
2004-09-23 18:50:26 +00:00
|
|
|
bool must_schedule_cpus;
|
2004-11-18 22:18:00 +00:00
|
|
|
// Reschedule CPUs ASAP. Set when:
|
|
|
|
// - core client starts (CS::init())
|
|
|
|
// - an app exits (ATS::check_app_exited())
|
|
|
|
// - a result's input files finish downloading (CS::update_results())
|
|
|
|
// - an app fails to start (CS::schedule_cpus())
|
|
|
|
// - any project op is done via RPC (suspend/resume)
|
|
|
|
// - any result op is done via RPC (suspend/resume)
|
2003-10-19 01:48:32 +00:00
|
|
|
int restart_tasks();
|
2004-05-05 17:48:39 +00:00
|
|
|
int quit_activities();
|
2004-06-30 01:10:22 +00:00
|
|
|
void set_ncpus();
|
2003-10-19 01:48:32 +00:00
|
|
|
double estimate_cpu_time(WORKUNIT&);
|
2004-04-07 06:51:42 +00:00
|
|
|
double get_fraction_done(RESULT* result);
|
2004-03-24 23:33:46 +00:00
|
|
|
bool input_files_available(RESULT*);
|
2004-07-14 22:54:56 +00:00
|
|
|
ACTIVE_TASK* get_next_graphics_capable_app();
|
2003-10-19 01:48:32 +00:00
|
|
|
private:
|
2004-06-30 01:10:22 +00:00
|
|
|
int ncpus;
|
2003-10-19 01:48:32 +00:00
|
|
|
int nslots;
|
|
|
|
|
2003-12-24 21:50:41 +00:00
|
|
|
int choose_version_num(char*, SCHEDULER_REPLY&);
|
2002-04-30 22:22:54 +00:00
|
|
|
int app_finished(ACTIVE_TASK&);
|
2004-06-30 01:10:22 +00:00
|
|
|
void assign_results_to_projects();
|
|
|
|
bool schedule_largest_debt_project(double expected_pay_off);
|
2002-04-30 22:22:54 +00:00
|
|
|
bool start_apps();
|
2004-10-14 22:01:05 +00:00
|
|
|
bool schedule_cpus(double);
|
|
|
|
bool handle_finished_apps(double);
|
2004-07-06 18:31:56 +00:00
|
|
|
void handle_file_xfer_apps();
|
2004-09-24 23:22:05 +00:00
|
|
|
int schedule_result(RESULT*);
|
2003-10-19 01:48:32 +00:00
|
|
|
|
|
|
|
// --------------- cs_benchmark.C:
|
|
|
|
public:
|
|
|
|
bool should_run_cpu_benchmarks();
|
2004-03-21 00:10:15 +00:00
|
|
|
void start_cpu_benchmarks();
|
|
|
|
bool cpu_benchmarks_poll();
|
|
|
|
void abort_cpu_benchmarks();
|
|
|
|
bool are_cpu_benchmarks_running();
|
2003-10-19 01:48:32 +00:00
|
|
|
|
|
|
|
// --------------- cs_cmdline.C:
|
|
|
|
public:
|
|
|
|
void parse_cmdline(int argc, char** argv);
|
|
|
|
void parse_env_vars();
|
|
|
|
void do_cmdline_actions();
|
|
|
|
|
|
|
|
// --------------- cs_files.C:
|
|
|
|
public:
|
2003-12-02 22:47:32 +00:00
|
|
|
bool start_new_file_xfer(PERS_FILE_XFER&);
|
2003-10-19 01:48:32 +00:00
|
|
|
private:
|
|
|
|
int make_project_dirs();
|
2004-10-14 22:01:05 +00:00
|
|
|
bool handle_pers_file_xfers(double);
|
2003-10-19 01:48:32 +00:00
|
|
|
|
|
|
|
// --------------- cs_prefs.C:
|
|
|
|
public:
|
|
|
|
int project_disk_usage(PROJECT*, double&);
|
2003-11-04 22:22:06 +00:00
|
|
|
int total_disk_usage(double&);
|
2003-10-19 01:48:32 +00:00
|
|
|
// returns the total disk usage of BOINC on this host
|
|
|
|
int allowed_disk_usage(double&);
|
2004-08-05 21:42:26 +00:00
|
|
|
int allowed_project_disk_usage(double&);
|
2003-10-19 01:48:32 +00:00
|
|
|
private:
|
2005-01-19 21:53:46 +00:00
|
|
|
void check_suspend_activities(double, int&);
|
2003-10-19 01:48:32 +00:00
|
|
|
int suspend_activities(int reason);
|
|
|
|
int resume_activities();
|
2004-11-18 22:18:00 +00:00
|
|
|
void check_suspend_network(double, int&);
|
2004-04-01 23:19:13 +00:00
|
|
|
int suspend_network(int reason);
|
|
|
|
int resume_network();
|
2003-02-26 00:47:57 +00:00
|
|
|
void install_global_prefs();
|
2004-10-01 08:15:58 +00:00
|
|
|
PROJECT* global_prefs_source_project();
|
2004-03-30 23:05:34 +00:00
|
|
|
void show_global_prefs_source(bool);
|
2002-07-15 05:34:32 +00:00
|
|
|
|
2003-10-19 01:48:32 +00:00
|
|
|
// --------------- cs_scheduler.C:
|
2002-07-15 05:34:32 +00:00
|
|
|
public:
|
|
|
|
double work_needed_secs();
|
2003-10-19 01:48:32 +00:00
|
|
|
PROJECT* next_project_master_pending();
|
2004-09-22 22:09:54 +00:00
|
|
|
PROJECT* next_project_need_work(PROJECT*);
|
2002-07-15 05:34:32 +00:00
|
|
|
int make_scheduler_request(PROJECT*, double);
|
2003-01-02 23:12:05 +00:00
|
|
|
int handle_scheduler_reply(PROJECT*, char* scheduler_url, int& nresults);
|
2004-07-14 22:54:56 +00:00
|
|
|
int compute_work_requests();
|
2002-07-15 05:34:32 +00:00
|
|
|
private:
|
2003-10-19 01:48:32 +00:00
|
|
|
SCHEDULER_OP* scheduler_op;
|
|
|
|
bool contacted_sched_server;
|
|
|
|
|
2004-06-18 23:25:48 +00:00
|
|
|
PROJECT* find_project_with_overdue_results();
|
2003-10-19 01:48:32 +00:00
|
|
|
PROJECT* next_project_sched_rpc_pending();
|
2005-01-10 20:46:33 +00:00
|
|
|
//bool some_project_rpc_ok();
|
2004-10-14 22:01:05 +00:00
|
|
|
bool scheduler_rpc_poll(double);
|
2004-07-14 22:54:56 +00:00
|
|
|
double ettprc(PROJECT*, int);
|
|
|
|
double avg_proc_rate(PROJECT*);
|
2002-04-30 22:22:54 +00:00
|
|
|
|
2003-10-19 01:48:32 +00:00
|
|
|
// --------------- cs_statefile.C:
|
2002-04-30 22:22:54 +00:00
|
|
|
public:
|
2003-11-02 22:51:49 +00:00
|
|
|
void set_client_state_dirty(char*);
|
2003-10-19 01:48:32 +00:00
|
|
|
int parse_state_file();
|
2004-06-12 04:45:36 +00:00
|
|
|
int write_state(MIOFILE&);
|
2003-10-19 01:48:32 +00:00
|
|
|
int write_state_file();
|
|
|
|
int write_state_file_if_needed();
|
2004-01-26 19:42:39 +00:00
|
|
|
void check_anonymous();
|
|
|
|
int parse_app_info(PROJECT*, FILE*);
|
2004-07-13 23:51:09 +00:00
|
|
|
int write_state_gui(MIOFILE&);
|
|
|
|
int write_file_transfers_gui(MIOFILE&);
|
|
|
|
int write_tasks_gui(MIOFILE&);
|
2003-07-21 12:42:41 +00:00
|
|
|
|
2004-05-12 21:21:09 +00:00
|
|
|
// --------------- cs_trickle.C:
|
|
|
|
private:
|
|
|
|
int read_trickle_files(PROJECT*, FILE*);
|
|
|
|
int remove_trickle_files(PROJECT*);
|
|
|
|
public:
|
|
|
|
int handle_trickle_down(PROJECT*, FILE*);
|
|
|
|
|
2003-10-19 01:48:32 +00:00
|
|
|
// --------------- check_state.C:
|
|
|
|
// stuff related to data-structure integrity checking
|
|
|
|
//
|
|
|
|
public:
|
2003-07-21 12:42:41 +00:00
|
|
|
void check_project_pointer(PROJECT*);
|
|
|
|
void check_app_pointer(APP*);
|
|
|
|
void check_file_info_pointer(FILE_INFO*);
|
|
|
|
void check_app_version_pointer(APP_VERSION*);
|
|
|
|
void check_workunit_pointer(WORKUNIT*);
|
|
|
|
void check_result_pointer(RESULT*);
|
|
|
|
void check_pers_file_xfer_pointer(PERS_FILE_XFER*);
|
|
|
|
void check_file_xfer_pointer(FILE_XFER*);
|
|
|
|
|
|
|
|
void check_app(APP&);
|
|
|
|
void check_file_info(FILE_INFO&);
|
|
|
|
void check_file_ref(FILE_REF&);
|
|
|
|
void check_app_version(APP_VERSION&);
|
|
|
|
void check_workunit(WORKUNIT&);
|
|
|
|
void check_result(RESULT&);
|
|
|
|
void check_active_task(ACTIVE_TASK&);
|
|
|
|
void check_pers_file_xfer(PERS_FILE_XFER&);
|
|
|
|
void check_file_xfer(FILE_XFER&);
|
|
|
|
|
|
|
|
void check_all();
|
2003-10-19 01:48:32 +00:00
|
|
|
|
2005-01-20 18:50:49 +00:00
|
|
|
#if 0
|
2004-08-05 21:42:26 +00:00
|
|
|
// ------------------ cs_data.C:
|
|
|
|
// mechanisms for managing data saved on host
|
|
|
|
//
|
|
|
|
public:
|
|
|
|
bool get_more_disk_space(PROJECT*, double);
|
|
|
|
int anything_free(double &);
|
|
|
|
int calc_proj_size(PROJECT*);
|
|
|
|
int calc_all_proj_size();
|
|
|
|
int compute_share_disk_size(PROJECT*);
|
2004-08-06 17:56:01 +00:00
|
|
|
int total_potential_offender(PROJECT*, double &);
|
|
|
|
int total_potential_self(PROJECT*, double &);
|
2004-08-05 21:42:26 +00:00
|
|
|
double select_delete(PROJECT*, double, int);
|
|
|
|
double delete_results(PROJECT*, double);
|
|
|
|
double compute_resource_share(PROJECT*);
|
|
|
|
PROJECT* greatest_offender();
|
|
|
|
private:
|
|
|
|
bool data_manager_poll();
|
|
|
|
bool fix_data_overflow(double, double);
|
|
|
|
int reset_checks();
|
|
|
|
int delete_inactive_results(PROJECT*);
|
|
|
|
int unstick_result_files(RESULT*);
|
|
|
|
double delete_next_file(PROJECT*, int);
|
|
|
|
double delete_expired(PROJECT*);
|
|
|
|
double offender(PROJECT*);
|
|
|
|
double proj_potentially_free(PROJECT*);
|
|
|
|
FILE_INFO* get_priority_or_lru(PROJECT*, int);
|
2005-01-20 18:50:49 +00:00
|
|
|
#endif
|
|
|
|
|
2002-04-30 22:22:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CLIENT_STATE gstate;
|
2002-07-15 05:34:32 +00:00
|
|
|
|
|
|
|
#endif
|