|
|
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 7.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 lockd
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: The memory required by the lockdriver is
92: 1008 bytes in the text segment and
93: 36 + 18 * NLOCKS in the data and BSS segments.
94:
95: .sh
96: Copy the server
97: .PS
98: Copy the lock server to where the servers
99: are kept on your system.
100:
101: .nf
102: cp lockd /etc/lockd
103:
104: .fi
105: .sh 1
106: Add the service to /etc/services
107: .PS
108: You should have an entry
109:
110: .nf
111:
112: ingreslock 1524/tcp # Ingres concurrency driver
113:
114: .fi
115:
116: .PS
117: In your /etc/services file. Note that the number (in this case 1524) need only
118: be unique among your servers, and does NOT have to be 1524 (we use it though).
119: .sh 1
120: Put lock server in /etc/rc.local thusly:
121:
122: .nf
123: /etc/lockd & echo -n ' lockd' > /dev/console
124: .fi
125:
126: .PS
127: This ensures that the lock server is always running when the system
128: is up.
129: .sh 1
130: Done.
131: .PS
132: INGRES will now use the "ingreslock" service for its
133: concurrency control.
134: A simple way to verify this is to try running
135: (for example) "purge" on a data base while
136: anyone is running "ingres" on the same data base.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.