Permalink
Browse files

virtual memory design doc typos

  • Loading branch information...
antirez committed Dec 1, 2009
1 parent 9c21a51 commit 380bf0802a7d30381588993f0b3cb153d5d923c5
Showing with 4 additions and 4 deletions.
  1. +4 −4 design-documents/VIRTUAL-MEMORY
@@ -1,9 +1,9 @@
- Use N working childs (fork at startup) in order to implement async I/O.
- The swap file is opened at startup and unlink(2)-ed
-- Swap file free/used block bitmap is taken on memory
-- When a child is saving on background or rewriting the append only log the swap file gets freezed (no writes from the parent).
-- When Redis is low on memory keys not recently used and big enough will be trasnfered on Disk by one of the child processes doing async I/O. Only when the transfer finishes the parent will mark the value as swapped out and will free the associated value.
-- When Redis is going to process a command will first check that all the keys involved are in memory. If not will send a request to an async I/O child in order to load this keys in memory. When the operation finished Redis will "resume" the client opreation (just the client structure will hold the arguments of the suspended command, Redis will execute the command and unmask the read/write events in the client socket).
+- Swap file free/used blocks bitmap is taken in memory
+- When a child is saving on background or rewriting the append only log the swap file gets frozen (no writes from the parent).
+- When Redis is low on memory keys not recently used and big enough will be transfered on Disk by one of the child processes doing async I/O. Only when the transfer finishes the parent will mark the value as swapped out and will free the associated value (if didn't changed in the meantime).
+- When Redis is going to process a command will first check that all the keys involved are in memory. If not will send a request to an async I/O child in order to load this keys in memory. When the operation finished Redis will "resume" the client operation (just the client structure will hold the arguments of the suspended command, Redis will execute the command and unmask the read/write events in the client socket).
- async I/O childs and parent communicate via pipes, so while Redis is blocked in the event loop can be resumed by an async child I/O just writing a message in the pipe.
- Every Redis type should have a function to guess the max space needed to serialized an object.
- The swap file is divided into blocks.

0 comments on commit 380bf08

Please sign in to comment.