发明名称 Method and system for maintaining context event logs without locking in virtual machine
摘要 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.
申请公布号 US9003131(B1) 申请公布日期 2015.04.07
申请号 US201313851154 申请日期 2013.03.27
申请人 Parallels IP Holdings GmbH 发明人 Lunev Denis
分类号 G06F12/10;G06F3/06 主分类号 G06F12/10
代理机构 Bardmesser Law Group 代理人 Bardmesser Law Group
主权项 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.
地址 Schaffhausen CH