V Storage Manager - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

V Storage Manager

Description:

Title: PowerPoint Presentation Subject: Event Name Author: Vishal Thakkar Description: Template design: Polly M., Silver Fox Productions, Inc. Formatter: Event Date ... – PowerPoint PPT presentation

Number of Views:79
Avg rating:3.0/5.0
Slides: 13
Provided by: Vish62
Category:

less

Transcript and Presenter's Notes

Title: V Storage Manager


1
V Storage Manager
  • Shahram Ghandeharizadeh
  • Computer Science Department
  • University of Southern California

2
Traces
  • Make sure your persistent BDB is configured with
    256 MB of memory.
  • With a trace, say 21, use its 21Objs.Save to
    create and populate your persistent database.
    Subsequently, use its Trace21.1KGet to debug
    your software.
  • Start with 1 thread and expand to 2, 3, and 4.
  • Try to make your software as efficient as
    possible. If it is too slow (maybe because of
    low byte hit rates) then you may not be able to
    run Trace21.1MGet.

3
Questions
4
Questions
  • Will there be another release of the workload
    generator before Friday?
  • I do not anticipate one unless there is a bug
    report.
  • Is there an obvious item missing from the current
    workload generator?
  • Mandatory Invocation of the method to report
    cache and byte hit rates.
  • Optional Dump the content of the cache to
    analyze the behavior of your cache replacement
    technique.

5
Hints
  • BDB-Disk is a full-fledged storage manager with a
    buffer pool, locking, crash-recovery, index
    structures.
  • Configure its buffer pool size to be 256 MB.

V Functionalities
Cache Replacement
BDB-Disk
BDB-Mem
6
Hints
  • Your implementation may need to keep track of
    different counters. Example count the number
    of requests issued (and the number of requests
    serviced from the main-memory instance of BDB) to
    compute the cache hit rate.
  • How to do this with multiple worker threads?

7
Hints
  • Your implementation may need to keep track of
    different counters. Example count the number of
    requests issued to compute the cache hit rate.
  • How to do this with multiple worker threads?
  • The interlocked function provides a mechanism for
    synchronizing access to a variable that is shared
    by multiple threads.
  • You may define a long variable and use
    InterlockedIncrement long cntr
    InterlockedIncrement(cntr)
  • Make sure to include ltwindows.hgt

8
Hints
  • To compute byte hit rates, you need to maintain
    two counters and increment them by the size of
    the referenced object.
  • Use InterlockedExchangeAdd function to perform
    an atomic addition of two 32 bit values.
  • Example a a b
  • InterlockedExchangeAdd(a, b)
  • Other Interlocked methods might be useful to you,
    such as InterlockedExchangePointer.

9
Hints
  • With invocation of methods, local variables are
    pushed on the stack of a thread.
  • 4 different threads invoking a method will have 4
    different sets of mutually exclusive local
    variables as declared by that method.
  • Foo()
  • Char res200
  • Int cntr
  • A global variable is not part of the stack and
    must be protected when multiple threads are
    manipulating it. How?

10
Hints
  • With invocation of methods, local variables are
    pushed on the stack of a thread.
  • 4 different threads invoking a method will have 4
    different sets of mutually exclusive local
    variables as declared by that method.
  • Foo()
  • Char res200
  • Int cntr
  • A global variable is not part of the stack and
    must be protected when multiple threads are
    manipulating it. How?
  • Consider making it a variable local to a method.
    Ask Does this variable have to be global?
  • Use critical sections.
  • Manage memory.

11
Hints
  • With invocation of methods, local variables are
    pushed on the stack of a thread.
  • 4 different threads invoking a method will have 4
    different sets of mutually exclusive local
    variables as declared by that method.
  • Foo()
  • Char res200
  • Int cntr
  • Similarly, memory allocated from the heap
    (new/malloc) is not a part of the stack and must
    be managed.
  • No memory-leaks.

12
Hints
  • Consider an admission control technique.
  • Without admission control
  • Everytime an object is referenced and it is not
    in memory then you place it in memory.
  • With admission control
  • Every time a disk resident object is referenced,
    compare its Q value with the minimum Q value to
    see if it should be admitted into memory.
Write a Comment
User Comments (0)
About PowerShow.com