Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : DOMAIN.H

 
Output of file : DOMAIN.H contained in archive : PCCAPP.ZIP
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Vincent F. Russo ([email protected])
* Contributing Author: Gary M. Johnston ([email protected])
* Contributing Author: David W. Dykstra ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/*
* Domain.h: description of the Domain class. A Domain is a subclass of
* SpaceMaps which adds reference counting and address translation.
*
*/

#ifndef Domain_h
#define Domain_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif

#include "ProxiableObject.h" /* parent class */
#include "AccessType.h"
#include "FaultErrorCode.h"
#include "LOCK.h"
#include "MemoryObjectStar.h"
#include "NameServerStar.h"
#include "ObjectProxyManagerStar.h"
#include "PhysicalMemoryChain.h"
#include "ProtectionLevel.h"

#include "ADDRESS_TRANSLATION.h"

class MemoryObjectCache;
class MemoryObject;
class ObjectProxy;
class NameServer;

static const int maxMemoryObjectsInMap = 64;
static const char * const NotMapped = (const char *) 0xffffffff;

#ifdef MULTIMAX
class Module;
#endif

class Domain;
/*
* The class 'DomainCleaner' is used to reference count the Domain
* by processes such that the domain can be 'cleaned' (that is, the
* name server and proxies deleted) when the last process dies and
* before the Domain itself is deleted. The destructor of the
* DomainCleaner simply calls cleanup() on the Domain.
*/
class DomainCleaner : public ProxiableObject {
protected:
Domain * _domain;
public:
DomainCleaner( Domain * );
~DomainCleaner();
};

extern ClassStar DomainClass;
class Domain : public ProxiableObject {
friend class PhysicalMemoryChain;

protected:
LOCK lock;
DomainCleaner * _cleaner;
int numberOfMemoryObjectsInMap;
struct {
const char * baseAddr;
const char * highAddr;
int length;
ProtectionLevel access;
MemoryObjectStar memoryObject;
} list[ maxMemoryObjectsInMap ];

ADDRESS_TRANSLATION _translation;
ObjectProxyManagerStar _proxyManager;
ObjectProxy * _defaultProxy;
PFV _returnFunct;
Domain * _parents[ APPLICATIONRING + 1 ];
DomainStar _parentStar; /* for referencing direct parent Domain only */
unsigned char _ring;
NameServerStar _nameServer;
#ifdef MULTIMAX
Module * _moduleTableEntry;
#endif

/*
* See if a MemoryObject is anywhere in the list and
* return its address.
*/
virtual const char * locationOf( MemoryObject * cache );

/*
* Lookup the parent domain associated with the address
*/
Domain * getParent( const char * address );

/*
* These 'basic' methods really implement the corresponding
* functionality as described below. The methods without the
* 'basic' first determine whether to call this 'basic' method
* or that of one of the parents, depending on what ring the
* address belongs to.
*/
MemoryObjectRef basicLookup( const char * vaddr, int & offset,
ProtectionLevel & permissionDesired );

FaultErrorCode basicRepairFault( const char * address,
AccessType attemptedAccess );

public:
Domain( Domain * parentDomain );
~Domain();
void cleanup();
DomainCleaner * cleaner();

/*
* Convert a virtual address into a (memory object,offset) pair.
*/
MemoryObjectRef lookup( const char * vaddr, int & offset,
ProtectionLevel & permissionDesired );

/*
* Called by the page fault handler to repair a page fault
*/
FaultErrorCode repairFault( const char * address,
AccessType attemptedAccess );

/*
* Force a range of addresses into physical memory and add the
* corresponding mappings to the address translation for this Domain.
*/
proxiable virtual void makeAddressable( const char * address,
unsigned int length );

/*
* This method forces all the memory in a range to be cached and
* then returns a PMChain describing it.
*/
PhysicalMemoryChain constructChain( const char * baseVirtualAddress,
unsigned int length );

/*
* Add a memory object at a partcular virtual address with a particular
* access permission.
*/
proxiable virtual const char * add( MemoryObject * memory,
const char * vaddr, ProtectionLevel permission );

/*
* Add a memory object wherever it will fit with a particular access
* permission.
*/
proxiable virtual const char * add( MemoryObject * memory,
ProtectionLevel permission );

/*
* Remove a memory object.
*/
proxiable virtual const char * remove( MemoryObject * memory );

/*
* Get the object proxy manager for this domain.
*/
ObjectProxyManager * proxyManager();
/*
* Get/Set the default return function for this domain.
*/
PFV returnFunct();
void setReturnFunct( PFV funct );
/*
* Get the defaultProxy for this domain.
*/
ObjectProxy * defaultProxy();

/*
* Get the translation for this domain.
*/
AddressTranslation * translation();

/*
* Return the NameServer for this Domain.
*/
proxiable virtual NameServer * nameServer();

/*
* Set minor data elements of two domains equal. Assists copy.
*/
void setDataEqual( Domain * oldDomain );

/*
* Make one Domain's memory object mappings a copy of another.
*/
void copy( Domain * );

/*
* return the ring of this domain.
*/
unsigned char ring();
/*
* return a parent of this domain.
*/
Domain * parent( unsigned char ring );


#ifdef MULTIMAX
/*
* set/get Module Table Entry for this domain
*/
void setModuleTableEntry( void * starttext, void * startdata );
Module * moduleTableEntry();
#endif

Class * classOf();

};

inline DomainCleaner *
Domain::cleaner()
{
return ( _cleaner );
}

inline AddressTranslation *
Domain::translation()
{
return( &_translation );
}

inline ObjectProxyManager *
Domain::proxyManager()
{
return( _proxyManager );
}

inline PFV
Domain::returnFunct()
{
return( _returnFunct );
}

inline void
Domain::setReturnFunct( PFV funct )
{
_returnFunct = funct;
}

inline unsigned char
Domain::ring()
{
return( _ring );
}

inline Domain *
Domain::parent( unsigned char ring )
{
if ( ring <= _ring)
return( _parents[ ring ] );
else
return( 0 );
}

inline NameServer *
Domain::nameServer()
{
return( _nameServer );
}

#ifdef MULTIMAX
inline Module *
Domain::moduleTableEntry( )
{
return( _moduleTableEntry );
}
#endif

#endif /* Domain_h */
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Systems Research Group ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/* This file was generated by Proxify++ version 0.1 */

#ifndef Domain_h
#define Domain_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif
#include "ProxiableObject.h"
#include "AccessType.h"
#include "FaultErrorCode.h"
#include "LOCK.h"
#include "MemoryObjectStar.h"
#include "NameServerStar.h"
#include "ObjectProxyManagerStar.h"
#include "PhysicalMemoryChain.h"
#include "ProtectionLevel.h"
#include "ADDRESS_TRANSLATION.h"
class MemoryObjectCache;
class MemoryObject;
class ObjectProxy;
class NameServer;
static const int maxMemoryObjectsInMap = 64;
static const char *const NotMapped = (const char *)0xffffffff;
class Domain;
class DomainCleaner : public ProxiableObject {
};
extern ClassStar DomainClass;
class Domain : public ProxiableObject {
public:
proxiable virtual void makeAddressable(const char * address, unsigned int length);
proxiable virtual const char * add(MemoryObject * memory, const char * vaddr, ProtectionLevel permission);
proxiable virtual const char * add(MemoryObject * memory, ProtectionLevel permission);
proxiable virtual const char * remove(MemoryObject * memory);
proxiable virtual NameServer * nameServer();
};
#include "VersionInstaller.h"
REQUIREDVERSION( Domain );
#endif Domain_h


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : DOMAIN.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/