IP Library Granted Patent US 9,003,131
Granted Patent B1
US 9,003,131 · App. 13/851,154 · Granted Apr 7, 2015

Method and system for maintaining context event logs without locking in virtual machine

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,003,131
App. No.
13/851,154
Granted
Apr 7, 2015
Kind
B1
Abstract

System for working with shared memory includes a plurality of contexts, each having executable processes writing and reading data; a ring buffer in the shared memory for writing and reading data by the contexts; a software primitive manages access attempts by the contexts to the ring buffer. Each context, upon writing to the ring buffer, is allocated an amount of space up to a maximum available at that moment. The software primitive guarantees consistency of the data written to the ring buffer. The software primitive permits simultaneous writing into the buffer by multiple contexts. After finishing writing to the buffer, the context updates a state of the buffer by decrementing the count of the active writers and/or by shifting the permitting pointers for communicating with writers and readers. A context can read from the buffer only data is marked as valid for reading by the context that wrote that data.

Claims (31)

1. A system for working with shared memory of a computer, comprising:

a) a plurality of contexts, each having executable processes writing and reading log data;

b) a ring buffer in the shared memory for writing and reading log data by the plurality of contexts;

c) a software primitive for managing access attempts by the contexts to the ring buffer;

d) wherein each context, upon writing to the ring buffer, is allocated an amount of space requested by the context, up to a maximum available amount of space in the ring buffer at any moment in time;

e) wherein the software primitive guarantees consistency of the log data written to the ring buffer, where entries from the same context are grouped together for writing and reading;

f) wherein the software primitive permits simultaneous writing into the ring buffer by multiple contexts;

g) wherein a context that finished writing last opens for reading log data of all other contexts in the ring buffer;

h) wherein a context that finished writing can open its log data for reading by other contexts;

i) wherein, after finishing writing to the ring buffer, the context updates a state of the buffer by decrementing the count of the active writers and/or by shifting the permission pointers for communicating with writers and readers; and

j) wherein a context can read from the buffer only the log data that is marked as valid for reading by the context that wrote that data.

2. The system of claim 1 , wherein the ring buffer is a First In, First Out (FIFO) buffer.

3. The system of claim 1 , wherein ring buffer writes and reads are done without utilizing spinlocks.

4. The system of claim 1 , wherein space in the ring is allocated within a guaranteed write cycle with no more iterations than a number of contexts waiting for their turn to write to the ring buffer.

5. The system of claim 1 , wherein, after registering with the ring buffer and after exiting writing to the buffer, each context reads global variables representing a state of the ring buffer, and updates the global variables based on his local variables,

wherein the global variables include an address of a next write and a number of contexts currently writing to the ring buffer.

6. The system of claim 1 , wherein, after registering with the ring buffer, each context updates global variables of the ring buffer that are also visible to other contexts, the updates including:

incrementing a number of contexts writing to the ring buffer; and

modifying an address of a next write.

7. The system of claim 1 , wherein, after exiting writing from the ring buffer, the context updates a global state of the ring buffer, including:

decrementing a number of contexts writing to the ring buffer; and

modifying an address of a read.

8. The system of claim 1 , further comprising deleting of the log data from the ring buffer after reading it, and modifying an address of a data that have been read already, thereby freeing up this space for writing to it.

9. The system of claim 1 , wherein multiple contexts can write concurrently to the ring buffer with multiple contexts reading from the buffer without conflicts.

10. The system of claim 1 , wherein the log data includes any data of the context.

11. The system of claim 1 , wherein the context is any of:

a virtual machine (VM) process;

a user application;

a user space process;

a Virtual Machine Monitor process; and

a process within a Hypervisor.

Assignments (3)
SECURITY INTEREST IN TRADEMARK, PATENT, AND COPYRIGHT RIGHTS Recorded Dec 22, 2022
From: VIRTUOZZO INTERNATIONAL GMBH; ONAPP LIMITED
To: WILMINGTON TRUST (LONDON) LIMITED
Reel/Frame 062206/0557 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 29, 2018
From: PARALLELS IP HOLDINGS GMBH
To: VIRTUOZZO INTERNATIONAL GMBH
Reel/Frame 045179/0537 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 27, 2013
From: LUNEV, DENIS
To: PARALLELS IP HOLDINGS GMBH
Reel/Frame 030092/0955 →