CLIENT_STATE Class Reference

#include <client_state_sim.h>

Collaboration diagram for CLIENT_STATE:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CLIENT_STATE (SERVER *server, HOSTMONITOR *hostmonitor)
int init ()
bool poll_slow_events ()
RESULTlookup_result (PROJECT *, const char *)
WORKUNITlookup_workunit (PROJECT *, const char *)
ACTIVE_TASKlookup_active_task_by_result (RESULT *)
void request_enforce_schedule (const char *)
void request_schedule_cpus (const char *)
double runnable_resource_share ()
void request_work_fetch (const char *)
int restart_tasks ()
int quit_activities ()
void set_ncpus ()
double estimate_cpu_time (WORKUNIT &)
double get_fraction_done (RESULT *result)
bool input_files_available (RESULT *)
ACTIVE_TASKget_task (RESULT *)
int project_disk_usage (PROJECT *, double &)
int total_disk_usage (double &)
int allowed_disk_usage (double &)
int allowed_project_disk_usage (double &)
double work_needed_secs ()
PROJECTnext_project_master_pending ()
PROJECTnext_project_need_work ()
SCHEDULER_REQUESTmake_scheduler_request (PROJECT *)
int handle_scheduler_reply_per_task (PROJECT *project, m_task_t task)
int compute_work_requests ()
void set_scheduler_modes ()
int parse_state_file ()

Public Attributes

std::vector< PROJECT * > projects
std::vector< WORKUNIT * > workunits
std::vector< RESULT * > results
ACTIVE_TASK_SETactive_tasks
HOST_INFOhost_info
GLOBAL_PREFS global_prefs
TIME_STATS time_stats
bool started_by_screensaver
bool exit_when_idle
bool check_all_logins
bool return_results_immediately
bool allow_remote_gui_rpc
int cmdline_gui_rpc_port
bool show_projects
bool requested_exit
char detach_project_url [256]
char reset_project_url [256]
char update_prefs_url [256]
char main_host_venue [256]
char attach_project_url [256]
char attach_project_auth [256]
bool exit_before_upload
bool activities_suspended
bool network_suspended
bool executing_as_daemon
bool size_overflow
bool redirect_io
bool detach_console
double now
double new_version_check_time
std::string newer_version
bool no_gui_rpc
bool have_tentative_project
int ncpus

Private Member Functions

int link_workunit (PROJECT *, WORKUNIT *)
int link_result (PROJECT *, RESULT *)
void print_summary ()
bool garbage_collect ()
bool garbage_collect_always ()
void assign_results_to_projects ()
RESULTlargest_debt_project_best_result ()
RESULTearliest_deadline_result ()
void adjust_debts ()
bool possibly_schedule_cpus ()
void schedule_cpus ()
bool enforce_schedule ()
bool no_work_for_a_cpu ()
bool rr_simulation (double, double)
void make_running_task_heap (vector< ACTIVE_TASK * > &)
void print_deadline_misses ()
double total_resource_share ()
double potentially_runnable_resource_share ()
double nearly_runnable_resource_share ()
int app_finished (ACTIVE_TASK &)
bool schedule_largest_debt_project (double expected_pay_off)
bool schedule_earliest_deadline_result ()
bool start_apps ()
bool handle_finished_apps ()
void handle_file_xfer_apps ()
int schedule_result (RESULT *)
void check_suspend_activities (int &)
int suspend_activities (int reason)
int resume_activities ()
void check_suspend_network (int &)
int suspend_network (int reason)
int resume_network ()
void install_global_prefs ()
PROJECTglobal_prefs_source_project ()
void show_global_prefs_source (bool)
PROJECTfind_project_with_overdue_results ()
PROJECTnext_project_sched_rpc_pending ()
PROJECTnext_project_trickle_up_pending ()
bool scheduler_rpc_poll ()
double time_until_work_done (PROJECT *, int, double)
double avg_proc_rate ()
bool should_get_work ()
int proj_min_results (PROJECT *, double)
bool round_robin_misses_deadline (double, double)
bool rr_misses_deadline (double, double)
bool edf_misses_deadline (double)
void set_work_fetch_mode ()

Private Attributes

int old_major_version
int old_minor_version
int old_release
bool skip_cpu_benchmarks
bool run_cpu_benchmarks
bool cpu_benchmarks_pending
int exit_after_app_start_secs
double app_started
double cpu_sched_last_time
bool cpu_earliest_deadline_first
double last_reschedule
double adjust_debts_last_time
double total_wall_cpu_time_this_period
double total_cpu_time_this_period
double cpu_shortfall
bool work_fetch_no_new_work
bool must_enforce_cpu_schedule
bool must_schedule_cpus
bool must_check_work_fetch
std::vector< RESULT * > ordered_scheduled_results
int nslots
double last_work_request_calc
SCHEDULER_OPscheduler_op
bool contacted_sched_server
int overall_work_fetch_urgency

Detailed Description

CLIENT_STATE encapsulates the global variables of the core client. If you add anything here, initialize it in the constructor.


Constructor & Destructor Documentation

CLIENT_STATE::CLIENT_STATE SERVER server,
HOSTMONITOR hostmonitor
 


Member Function Documentation

void CLIENT_STATE::adjust_debts  )  [private]
 

int CLIENT_STATE::allowed_disk_usage double &   ) 
 

int CLIENT_STATE::allowed_project_disk_usage double &   ) 
 

int CLIENT_STATE::app_finished ACTIVE_TASK  )  [private]
 

void CLIENT_STATE::assign_results_to_projects  )  [private]
 

double CLIENT_STATE::avg_proc_rate  )  [private]
 

void CLIENT_STATE::check_suspend_activities int &   )  [private]
 

void CLIENT_STATE::check_suspend_network int &   )  [private]
 

int CLIENT_STATE::compute_work_requests  ) 
 

RESULT * CLIENT_STATE::earliest_deadline_result  )  [private]
 

bool CLIENT_STATE::edf_misses_deadline double   )  [private]
 

bool CLIENT_STATE::enforce_schedule  )  [private]
 

double CLIENT_STATE::estimate_cpu_time WORKUNIT  ) 
 

PROJECT * CLIENT_STATE::find_project_with_overdue_results  )  [private]
 

bool CLIENT_STATE::garbage_collect  )  [private]
 

bool CLIENT_STATE::garbage_collect_always  )  [private]
 

double CLIENT_STATE::get_fraction_done RESULT result  ) 
 

ACTIVE_TASK * CLIENT_STATE::get_task RESULT  ) 
 

PROJECT* CLIENT_STATE::global_prefs_source_project  )  [private]
 

void CLIENT_STATE::handle_file_xfer_apps  )  [private]
 

bool CLIENT_STATE::handle_finished_apps  )  [private]
 

int CLIENT_STATE::handle_scheduler_reply_per_task PROJECT project,
m_task_t  task
 

int CLIENT_STATE::init  ) 
 

bool CLIENT_STATE::input_files_available RESULT  ) 
 

void CLIENT_STATE::install_global_prefs  )  [private]
 

RESULT * CLIENT_STATE::largest_debt_project_best_result  )  [private]
 

int CLIENT_STATE::link_result PROJECT ,
RESULT
[private]
 

int CLIENT_STATE::link_workunit PROJECT ,
WORKUNIT
[private]
 

ACTIVE_TASK * CLIENT_STATE::lookup_active_task_by_result RESULT  ) 
 

RESULT * CLIENT_STATE::lookup_result PROJECT ,
const char * 
 

WORKUNIT * CLIENT_STATE::lookup_workunit PROJECT ,
const char * 
 

void CLIENT_STATE::make_running_task_heap vector< ACTIVE_TASK * > &   )  [private]
 

SCHEDULER_REQUEST * CLIENT_STATE::make_scheduler_request PROJECT  ) 
 

double CLIENT_STATE::nearly_runnable_resource_share  )  [private]
 

PROJECT* CLIENT_STATE::next_project_master_pending  ) 
 

PROJECT * CLIENT_STATE::next_project_need_work  ) 
 

PROJECT * CLIENT_STATE::next_project_sched_rpc_pending  )  [private]
 

PROJECT * CLIENT_STATE::next_project_trickle_up_pending  )  [private]
 

bool CLIENT_STATE::no_work_for_a_cpu  )  [private]
 

int CLIENT_STATE::parse_state_file  ) 
 

bool CLIENT_STATE::poll_slow_events  ) 
 

bool CLIENT_STATE::possibly_schedule_cpus  )  [private]
 

double CLIENT_STATE::potentially_runnable_resource_share  )  [private]
 

void CLIENT_STATE::print_deadline_misses  )  [private]
 

void CLIENT_STATE::print_summary  )  [private]
 

int CLIENT_STATE::proj_min_results PROJECT ,
double 
[private]
 

int CLIENT_STATE::project_disk_usage PROJECT ,
double & 
 

int CLIENT_STATE::quit_activities  ) 
 

void CLIENT_STATE::request_enforce_schedule const char *   ) 
 

void CLIENT_STATE::request_schedule_cpus const char *   ) 
 

void CLIENT_STATE::request_work_fetch const char *   ) 
 

int CLIENT_STATE::restart_tasks  ) 
 

int CLIENT_STATE::resume_activities  )  [private]
 

int CLIENT_STATE::resume_network  )  [private]
 

bool CLIENT_STATE::round_robin_misses_deadline double  ,
double 
[private]
 

bool CLIENT_STATE::rr_misses_deadline double  ,
double 
[private]
 

bool CLIENT_STATE::rr_simulation double  ,
double 
[private]
 

double CLIENT_STATE::runnable_resource_share  ) 
 

void CLIENT_STATE::schedule_cpus  )  [private]
 

bool CLIENT_STATE::schedule_earliest_deadline_result  )  [private]
 

bool CLIENT_STATE::schedule_largest_debt_project double  expected_pay_off  )  [private]
 

int CLIENT_STATE::schedule_result RESULT  )  [private]
 

bool CLIENT_STATE::scheduler_rpc_poll  )  [private]
 

If WORK_FETCH_DONT_NEED_WORK == false, make a request for work

void CLIENT_STATE::set_ncpus  ) 
 

old version. does NOT check whether number of cpus has checked.

void CLIENT_STATE::set_scheduler_modes  ) 
 

void CLIENT_STATE::set_work_fetch_mode  )  [private]
 

bool CLIENT_STATE::should_get_work  )  [private]
 

void CLIENT_STATE::show_global_prefs_source bool   )  [private]
 

bool CLIENT_STATE::start_apps  )  [private]
 

int CLIENT_STATE::suspend_activities int  reason  )  [private]
 

int CLIENT_STATE::suspend_network int  reason  )  [private]
 

double CLIENT_STATE::time_until_work_done PROJECT ,
int  ,
double 
[private]
 

int CLIENT_STATE::total_disk_usage double &   ) 
 

double CLIENT_STATE::total_resource_share  )  [private]
 

double CLIENT_STATE::work_needed_secs  ) 
 


Member Data Documentation

ACTIVE_TASK_SET* CLIENT_STATE::active_tasks
 

bool CLIENT_STATE::activities_suspended
 

double CLIENT_STATE::adjust_debts_last_time [private]
 

bool CLIENT_STATE::allow_remote_gui_rpc
 

double CLIENT_STATE::app_started [private]
 

char CLIENT_STATE::attach_project_auth[256]
 

char CLIENT_STATE::attach_project_url[256]
 

bool CLIENT_STATE::check_all_logins
 

int CLIENT_STATE::cmdline_gui_rpc_port
 

bool CLIENT_STATE::contacted_sched_server [private]
 

bool CLIENT_STATE::cpu_benchmarks_pending [private]
 

bool CLIENT_STATE::cpu_earliest_deadline_first [private]
 

double CLIENT_STATE::cpu_sched_last_time [private]
 

double CLIENT_STATE::cpu_shortfall [private]
 

bool CLIENT_STATE::detach_console
 

char CLIENT_STATE::detach_project_url[256]
 

bool CLIENT_STATE::executing_as_daemon
 

int CLIENT_STATE::exit_after_app_start_secs [private]
 

bool CLIENT_STATE::exit_before_upload
 

bool CLIENT_STATE::exit_when_idle
 

GLOBAL_PREFS CLIENT_STATE::global_prefs
 

bool CLIENT_STATE::have_tentative_project
 

HOST_INFO* CLIENT_STATE::host_info
 

double CLIENT_STATE::last_reschedule [private]
 

double CLIENT_STATE::last_work_request_calc [private]
 

char CLIENT_STATE::main_host_venue[256]
 

bool CLIENT_STATE::must_check_work_fetch [private]
 

bool CLIENT_STATE::must_enforce_cpu_schedule [private]
 

bool CLIENT_STATE::must_schedule_cpus [private]
 

int CLIENT_STATE::ncpus
 

bool CLIENT_STATE::network_suspended
 

double CLIENT_STATE::new_version_check_time
 

std::string CLIENT_STATE::newer_version
 

bool CLIENT_STATE::no_gui_rpc
 

double CLIENT_STATE::now
 

int CLIENT_STATE::nslots [private]
 

int CLIENT_STATE::old_major_version [private]
 

int CLIENT_STATE::old_minor_version [private]
 

int CLIENT_STATE::old_release [private]
 

std::vector<RESULT*> CLIENT_STATE::ordered_scheduled_results [private]
 

int CLIENT_STATE::overall_work_fetch_urgency [private]
 

std::vector<PROJECT*> CLIENT_STATE::projects
 

bool CLIENT_STATE::redirect_io
 

bool CLIENT_STATE::requested_exit
 

char CLIENT_STATE::reset_project_url[256]
 

std::vector<RESULT*> CLIENT_STATE::results
 

bool CLIENT_STATE::return_results_immediately
 

bool CLIENT_STATE::run_cpu_benchmarks [private]
 

class SCHEDULER_OP* CLIENT_STATE::scheduler_op [private]
 

bool CLIENT_STATE::show_projects
 

bool CLIENT_STATE::size_overflow
 

bool CLIENT_STATE::skip_cpu_benchmarks [private]
 

bool CLIENT_STATE::started_by_screensaver
 

TIME_STATS CLIENT_STATE::time_stats
 

double CLIENT_STATE::total_cpu_time_this_period [private]
 

double CLIENT_STATE::total_wall_cpu_time_this_period [private]
 

char CLIENT_STATE::update_prefs_url[256]
 

bool CLIENT_STATE::work_fetch_no_new_work [private]
 

std::vector<WORKUNIT*> CLIENT_STATE::workunits
 


The documentation for this class was generated from the following files:
Generated on Mon Mar 12 16:22:03 2007 for SimBOINC by  doxygen 1.4.6