Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4973/src/gdk
Modified Files:
Tag: MonetDB_1-22
gdk.mx gdk_align.mx gdk_bbp.mx gdk_logger.mx gdk_rangejoin.mx
gdk_scanselect_defs.mx
Log Message:
fixing texi...
Index: gdk_logger.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_logger.mx,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- gdk_logger.mx 1 Feb 2008 12:21:37 -0000 1.14
+++ gdk_logger.mx 5 Feb 2008 21:53:29 -0000 1.14.2.1
@@ -18,7 +18,7 @@
@t Transactions
@a N. J. Nes
@v 2.0
[EMAIL PROTECTED]
+
@* Introduction
In the philosophy of MonetDB, transaction management overhead should only
be paid when necessary. Transaction management is for this purpose
Index: gdk.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk.mx,v
retrieving revision 1.248.2.1
retrieving revision 1.248.2.2
diff -u -d -r1.248.2.1 -r1.248.2.2
--- gdk.mx 5 Feb 2008 15:29:58 -0000 1.248.2.1
+++ gdk.mx 5 Feb 2008 21:53:28 -0000 1.248.2.2
@@ -88,7 +88,7 @@
. A BAT is a
self-descriptive main-memory structure that represents the @strong{binary
relationship} between two atomic types.
-@
+
The association can be defined over:
@table @code
@item void:
@@ -162,7 +162,7 @@
@end tex
. Alternatively, when the table is sorted, it will resort to merge-scan
operations or binary lookups.
-@
+
BATs are built on the concept of heaps, which are large pieces of main
memory. They can also consist of virtual memory, in case the working
set exceeds main-memory. In this case, GDK supports operations that
@@ -171,7 +171,6 @@
@- Rationale
-
The rationale for choosing a BAT as the building block for both
relational and object-oriented system is based on the following
observations:
@@ -293,7 +292,6 @@
and relational operators. They are implemented in terms of BAT- and
BUN-manipulation GDK primitives.
@end table
-@
@+ Interface Files
In this section we summarize the user interface to the GDK library.
@@ -450,7 +448,7 @@
@item int
@tab GDKexit (int status)
@end multitable
-@
+
The session is bracketed by @%GDKinit@ and @[EMAIL PROTECTED] Initialization
involves
setting up the administration for database access, such as memory allocation
for the database buffer pool.
@@ -712,7 +710,7 @@
referred to as @strong{Head Heap}s and @strong{Tail Heap}s). The BUN heap then
contains integer byte-offsets (fixed-sized, of course) into a head-
or tail-heap.
-@
+
The BUN heap contains a contiguous range of BUNs. It starts after
the @strong{first} pointer, and finishes at the end in the @strong{free}
area of the BUN. All BUNs after the @strong{inserted} pointer have been
@@ -726,7 +724,7 @@
may change between successive library routine invocations. Therefore, one
should avoid keeping references into the BAT storage area for long
periods.
-@
+
Passing values between the library routines and the enclosing C
program is primarily through value pointers of type @[EMAIL PROTECTED] Pointers
into the BAT storage area should only be used for retrieval. Direct
@@ -788,10 +786,9 @@
@}
@- The BAT record
-
The elements of the BAT structure are introduced in the remainder.
Instead of using the underlying types hidden beneath it, one should
-use a @%BAT@ type that is supposed to look like this:
+use a @emph{BAT} type that is supposed to look like this:
@verbatim
typedef struct {
/* static BAT properties */
Index: gdk_bbp.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_bbp.mx,v
retrieving revision 1.208.2.1
retrieving revision 1.208.2.2
diff -u -d -r1.208.2.1 -r1.208.2.2
--- gdk_bbp.mx 5 Feb 2008 15:29:58 -0000 1.208.2.1
+++ gdk_bbp.mx 5 Feb 2008 21:53:29 -0000 1.208.2.2
@@ -25,13 +25,13 @@
The BBP is a directory which contains status information about all known BATs.
This interface may be used very heavily, by data-intensive applications.
To eliminate all overhead, read-only access to the BBP may be done by
-table-lookups. The integer index type for these lookups is @%bat@, as
-retrieved by @%BBPcacheid(b)@. The @%bat@ zero is reserved for the nil bat.
+table-lookups. The integer index type for these lookups is @emph{bat}, as
+retrieved by @emph{BBPcacheid(b)}. The @emph{bat} zero is reserved for the nil
bat.
@item persistence
The BBP is made persistent by saving it to the dictionary file
called @emph{BBP.dir} in the database. The dictionary can always be
-reconstructed from the @emph{ .desc} files. Its main role is to
+reconstructed from the @emph{.desc} files. Its main role is to
speed-up system restart, because now it requires just a few IOs
instead of a complete directory scan and reading all descriptors
to find all BATs.
@@ -257,14 +257,14 @@
@table @code
@item GDKcacheLock]
this lock guards the free slot management in the BBP array. The BBP
-operations that allocate a new slot for a new BAT (@%BBPinit@,@%BBPcacheit@),
-delete the slot of a destroyed BAT (@%BBPreclaim@), or rename a BAT
-(@%BBPrename@), hold this lock. It also protects all BAT (re)naming actions
+operations that allocate a new slot for a new BAT
(@emph{BBPinit},@emph{BBPcacheit}),
+delete the slot of a destroyed BAT (@emph{BBPreclaim}), or rename a BAT
+(@emph{BBPrename}), hold this lock. It also protects all BAT (re)naming
actions
include (read and write) in the hash table with BAT names.
@item GDKswapLock
this lock guards the swap (loaded/unloaded) status of the BATs. Hence, all
BBP routines that influence the swapping policy, or actually carry out the
-swapping policy itself, acquire this lock (e.g. @%BBPfix@,@%BBPunfix@).
+swapping policy itself, acquire this lock (e.g. @emph{BBPfix},@emph{BBPunfix}).
Note that this also means that updates to the BBP\_status indicator array
must be protected by GDKswapLock.
@@ -282,7 +282,7 @@
operations may be ongoing while at the same time at most one BBP write
operation @strong{on a different BAT} is executing.
This holds for accesses to the public (quasi-)
-arrays @%BBPcache@, @%BBPstatus@, @%BBPrefs@, @%BBPlogical@ and @[EMAIL
PROTECTED] These
+arrays @emph{BBPcache}, @emph{BBPstatus}, @emph{BBPrefs}, @emph{BBPlogical}
and @emph{BBPphysical}. These
arrays are called quasi as now they are actually stored together in one big
BBPrec
array called BBP, that is allocated in anonymous VM space, so we can
reallocate
this structure without changing the base address (a crucial feature if read
@@ -1814,7 +1814,7 @@
We also refined the swap criterion. If the BBPtrim was initiated due to:
- too much descriptors: small bats are unloaded first (from LRU cold to hot)
- too little memory: big bats are unloaded first (from LRU cold to hot).
-Unloading-first is enforced by subtracting $2^31$ from the stamp in the
+Unloading-first is enforced by subtracting @math{2^31} from the stamp in the
field where the candidates are sorted on.
@{
@c
@@ -2185,7 +2185,6 @@
@}
@+ Small BAT Cache
[EMAIL PROTECTED]
PETER: rewrote the batcache to make it stable with views and actually faster
than allocating new bats (I guess that was the purpose of it)
@@ -2207,10 +2206,10 @@
module(alarm);
bbp_batcache_minsize(wrd(256));
-{ var t := time(), i := 0; while((i :+= 1) < 100000) bat(int,int);
print(time() - t); }
[EMAIL PROTECTED] var t := time(), i := 0; while((i :+= 1) < 100000)
bat(int,int); print(time() - t); @}
[ 490 ]
bbp_batcache_minsize(wrd(0));
-{ var t := time(), i := 0; while((i :+= 1) < 100000) bat(int,int);
print(time() - t); }
[EMAIL PROTECTED] var t := time(), i := 0; while((i :+= 1) < 100000)
bat(int,int); print(time() - t); @}
[ 847 ]
so with caching *some* MIL programs can be nearly twice as fast (optimized
compile),
@@ -2753,7 +2752,7 @@
It is now locked, to get proper file counters, and also to prevent
concurrent BBPrecovers, etc.
[EMAIL PROTECTED]
+
backup_dir == 0 => no backup BBP.dir
backup_dir == 1 => BBP.dir saved in BACKUP/
backup_dir == 2 => BBP.dir saved in SUBCOMMIT/
Index: gdk_rangejoin.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_rangejoin.mx,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -d -r1.7.2.1 -r1.7.2.2
--- gdk_rangejoin.mx 5 Feb 2008 15:29:58 -0000 1.7.2.1
+++ gdk_rangejoin.mx 5 Feb 2008 21:53:29 -0000 1.7.2.2
@@ -29,24 +29,28 @@
#include "gdk.h"
@- BAT range and band join operators
-@
The @%BATbandjoin@ produces the associations [A, D] such that S.C-c1 <=
R.b <= S.C + c2. The special case c1 = 0 and c2 = infinite leads to a
thetajoin.
@h
gdk_export BAT *BATrangejoin(BAT *l, BAT *rl, BAT *rh, bit li, bit hi);
-/* Join all BUNs of the BATs that have tail values: {rl <= l <= rh}. */
+@
+Join all BUNs of the BATs that have tail values: {rl <= l <= rh}.
[EMAIL PROTECTED]
gdk_export BAT *BATbandjoin(BAT *l, BAT *r, ptr mnus, ptr plus, bit li, bit
hi);
-/* Join all BUNs of the BATs that have tail values: {r-mnus <= l <= r+plus}. */
+@
+Join all BUNs of the BATs that have tail values: {r-mnus <= l <= r+plus}.
[EMAIL PROTECTED]
#endif /* GDK_RANGEJOIN_H */
@c
#include "monetdb_config.h"
#include "gdk_rangejoin.h"
[EMAIL PROTECTED]
BAT *BATrangejoin(BAT *l, BAT *rl, BAT *rh, bit li, bit hi)
{
BAT *bn;
@@ -214,8 +218,6 @@
return bn;
}
-
-@
@}
@-
The easiest case is to implement a nested loop for band operations.
@@ -254,7 +256,6 @@
@:bandjoin_nl_(@1,>,<)
break;
@
[EMAIL PROTECTED]
@= bandjoin_mj_loop
/* sliding window like solution */
@@ -404,3 +405,4 @@
BBPreclaim(r);
return bn;
}
[EMAIL PROTECTED]
Index: gdk_align.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_align.mx,v
retrieving revision 1.90
retrieving revision 1.90.2.1
diff -u -d -r1.90 -r1.90.2.1
--- gdk_align.mx 1 Feb 2008 12:21:33 -0000 1.90
+++ gdk_align.mx 5 Feb 2008 21:53:29 -0000 1.90.2.1
@@ -31,9 +31,9 @@
This operation will mark both columns of the first @emph{BAT} as synced with
the second (likewise, @emph{BATcopy()}, which makes a copy, instead of
in-place
shuffling, has the same alignment effect, @emph{BATmark()} marks the tail
column
-as synced with the head of the original @emph{BAT}, and for instance
[EMAIL PROTECTED]()} marks both return columns as aligned with its left
parameter).
-@
+as synced with the head of the original @emph{BAT}, and for
+instance @emph{BATsemijoin()} marks both return columns as aligned with its
left parameter).
+
Each alignment sequence is given a unique identifier, so as to easily
detect this situation. It is retained in the @emph{BAT descriptor}.
@+ Alignment Design Considerations
@@ -52,7 +52,7 @@
Alignment statuses must be
kept consistent under database commits and aborts.
@end itemize
-@
+
As for performance, the most important observation to make is that
operations that do not need alignment, will suffer most from
overheads introduced in the BUN update mechanism. For this reason,
@@ -192,11 +192,11 @@
BAT is @emph{VIEWcreate}. On this @emph{#read-only} BAT (there is kernel
support for this), you can then make vertical slices.
Use @emph{VIEWhead} for this.
-@
+
It is possible to create a view on a writable BAT. Updates
in the parent are then automatically reflected in the VIEW.
Note that the VIEW bat itself can never be modified.
-@
+
Horizontal views should only be given out on a view BAT, but
only if it is dead sure the parent BAT is read-only.
This because they cannot physically share the batBuns heap
Index: gdk_scanselect_defs.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_scanselect_defs.mx,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- gdk_scanselect_defs.mx 11 Jan 2008 10:37:00 -0000 1.2
+++ gdk_scanselect_defs.mx 5 Feb 2008 21:53:29 -0000 1.2.2.1
@@ -32,6 +32,7 @@
calls to these functions.
@c
[EMAIL PROTECTED]
@- The actual BAT_scanselect
@= seqscanPrologue
@@ -300,3 +301,5 @@
@c
@:DEFseqscanTTget(c)@
@-
+
[EMAIL PROTECTED]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins