Annotation of 43BSD/ingres/doc/other/lockdev.nr, revision 1.1.1.1

1.1       root        1: .ds HE 'HOW TO INSTALL CONCURRENCY DEVICE''PAGE %'
                      2: .so nmacs
                      3: .ce
                      4: Instructions for installing the INGRES lock device in UNIX
                      5: 
                      6: .ce
                      7: May 19, 1983
                      8: .sp 3
                      9: INGRES version 8.1 has a fully implemented concurrency control
                     10: mechanism.
                     11: The INGRES system sets and clears locks by writing to
                     12: a server named "ingreslock".
                     13: If the socket cannot be opened for writing, INGRES
                     14: runs without any concurrency control.
                     15: 
                     16: Initially it is advisable to bring up INGRES without
                     17: the concurrency device.
                     18: If planned usage of the INGRES system requires concurrency
                     19: control then the server "ingreslock" must be installed
                     20: into your UNIX system.
                     21: 
                     22: This document describes the procedure for installing
                     23: the UNIX server for
                     24: "ingreslock".
                     25: 
                     26: .sh 1
                     27: Log in as root.
                     28: .sh 1
                     29: Compiling the concurrency device
                     30: .PS
                     31: .dn
                     32: change directory to ../source/support
                     33: .PS
                     34: The concurrency device consists of three
                     35: files: .../source/support/ildr.c
                     36:  .../source/h/ildr.h
                     37: and .../source/support/init_socket.c
                     38: 
                     39: compile the lock driver
                     40: .nf
                     41:        make ingreslock
                     42: 
                     43: .fi
                     44: .sh
                     45: Installation Parameters
                     46: .PS
                     47: There are several parameters in ildr.h that can be set by
                     48: the user.  These include:
                     49: 
                     50: .nf
                     51:        NLOCKS - number of locks
                     52:        PLOCKS - page locks
                     53:        RLOCKS - relation locks
                     54:        DLOCKS - data base locks
                     55: 
                     56: .fi
                     57: NLOCKS is the maximum number of locks permissible.
                     58: It determines the size of the lock table.
                     59: PLOCKS is the maximum number of page, relation and data base
                     60: locks.
                     61: RLOCKS is the maximum number of relation and data base locks.
                     62: DLOCKS is the maximum number of data base locks.  Only
                     63: DLOCKS INGRESes can be active at one time.
                     64: 
                     65: The following conditions must hold to protect against
                     66: deadlock due to lock table overflow:
                     67: 
                     68: .nf
                     69:        NLOCKS > PLOCKS > RLOCKS > DLOCKS + 6
                     70: 
                     71: .fi
                     72: The extra number of RLOCKS are required inorder
                     73: to be able to run 6-variable queries.
                     74: We recommend first setting DLOCKS and then setting the other parameters
                     75: as follows:
                     76: 
                     77: .nf
                     78:        RLOCKS = 2*DLOCKS + 6
                     79:        PLOCKS = RLOCKS + 3
                     80:        NLOCKS = PLOCKS + 1
                     81: .fi
                     82: 
                     83: For example, to reduce the size of the lock table, one could set
                     84: DLOCKS = 2, RLOCKS = 10, PLOCKS = 13, NLOCKS = 14.
                     85: In this case, only 2 people could be running ingres at one time.
                     86: 
                     87: As another example, to allow for more concurrent INGRESes, one could set
                     88: DLOCKS = 20, RLOCKS = 46, PLOCKS = 49, NLOCKS = 50.
                     89: This scenario would allow for twenty simultaneous INGRES users.
                     90: 
                     91: .sh
                     92: Copy the server
                     93: .PS
                     94: Copy the lock server to where the servers
                     95: are kept on your system.
                     96: 
                     97: .nf
                     98:        cp ingreslock  /etc/ingreslock
                     99: 
                    100: .fi
                    101: .sh 1
                    102: Add the service to /etc/services
                    103: .PS
                    104: You should have an entry
                    105: 
                    106: .nf
                    107: 
                    108:        ingreslock      1524/tcp                # Ingres concurrency driver
                    109: 
                    110: .fi
                    111: 
                    112: .PS
                    113: In your /etc/services file. Note that the number (in this case 1524) need only
                    114: be unique among your servers, and does NOT have to be 1524 (we use it though).
                    115: .sh 1
                    116: Put lock server in /etc/rc.local thusly:
                    117: 
                    118: .nf
                    119:        /etc/ingreslock & echo -n ' ingreslock' > /dev/console
                    120: .fi
                    121: 
                    122: .PS
                    123: This ensures that the lock server is always running when the system
                    124: is up.
                    125: .sh 1
                    126: Done.
                    127: .PS
                    128: INGRES will now use the "ingreslock" service for its
                    129: concurrency control.
                    130: A simple way to verify this is to try running
                    131: (for example) "purge" on a data base while
                    132: anyone is running "ingres" on the same data base.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.