ss_m::init(SSM)

Shore Programmer's Manual - 2 August 96

NAME

ss_m, set_shutdown_flag, setup_options \- Class ss_m Methods for Initialization

SYNOPSIS

#include <sm_vas.h>  // which includes sm.h

		ss_m();
		~ss_m();
static void	set_shutdown_flag(bool clean);
static rc_t	setup_options(option_group_t*);

DESCRIPTION

The above class ss_m methods all deal initializing and shutting down the storage manager (SM). Constructing an instance of ss_m starts the SSM. Destroying it causes the SSM to shutdown. If so, it follows the steps discussed in \hyperref{the recovery section below}{Section}{}{ssmapi:recovery}.

ss_m()

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

Part of SSM initialization includes allocating the 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 not enough shared memory is available, the SSM prints a message, indicating how much shared memory it is trying to acquire, and exits.

~ss_m()

The ss_m destructor flushes all data to disk (see the description of the set_shutdown_flag method for information on controlling this) and frees all resources used by the SM.

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.

set_shutdown_flag(clean)

The set_shutdown_flag method controls how the SM is shutdown when ~ss_m is executed. If clean is set to true, all data pages and logs are flushed to disk. Therefore, no recovery processing will be needed when the SM is restarted. If clean is set to false, the SM will not flush any buffers on shutdown. This is useful for simulating a crash.

ERRORS

Any failure to properly construct/destruct the SM 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.0 of theShore 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-92-C-Q508.

COPYRIGHT

Copyright (c) 1994, 1995, 1996 Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

intro(ssm) , volume(ssm) , transaction(ssm) ,