ss_m, set_shutdown_flag, setup_options - Class ss_m Methods for Initialization


CONTENTS


SYNOPSIS

#include <sm_vas.h>  

class ss_m;

static void	ss_m::set_shutdown_flag(bool clean);
		ss_m::ss_m();

static rc_t	ss_m::setup_options(option_group_t*);
		ss_m::~ss_m();


DESCRIPTION

These methods of class ss_m control initializing and shutting down the Shore storage manager (SSM). Constructing an instance of ss_m starts the SSM. Destroying the instance causes the SSM to shut down. During construction, the SSM follows the steps discussed in the Recovery section of The Shore Storage Manager Programming Interface.

setup_options(option_group_t *)

The setup_options method adds storage manager specific options to the option_group_t. These options must be initialized before the ss_m constructor is called.

ss_m()
The ss_m constructor initializes all SSM data structures, and performs recovery based on the current log. Only one instance of ss_m may be in existence at any one time (this is enforced by the constructor).

Part of SSM initialization includes allocating a buffer pool. The buffer pool is located in shared memory, so the operating system must have shared-memory support to accommodate the size of the buffer pool. If insufficient shared memory is available, the SSM prints a message indicating how much shared memory it is trying to acquire, and exits.

set_shutdown_flag(clean)

The set_shutdown_flag method can be used to simulate a crash. If clean is set to false, the SSM will not flush any buffers when ~ss_m() is called. If clean is set to true, all data pages and logs are flushed to disk, and no recovery processing will be needed when the SSM is restarted. This is the normal operation of the storage manager.

~ss_m()
The ss_m destructor flushes all buffers in the buffer pool to disk (unless set_shutdown_flag(clean) was used to defeat this) and frees all the resources used by the SSM.

ERRORS

Failure to properly construct/destruct the SSM will result in a fatal error that will print a message and exit the program.

See errors(ssm) for more information on error-handling.


EXAMPLES

To Do.

VERSION

This manual page applies to Version 1.1.1 of the Shore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.

COPYRIGHT

Copyright © 1994, 1995, 1996, 1997, Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

intro(ssm), volume(ssm), options(common), transaction(ssm)