Inter-process Communication via Shared File System
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Multitasking computing devices face challenges in managing memory efficiently, leading to poor user experiences due to termination of applications under low-memory conditions, especially when devices with limited resources attempt to switch between applications, resulting in delays or loss of application state.
Innovation Solution
Refactoring applications to execute within multiple processes, where a lightweight process handles discrete tasks and a heavyweight process handles resource-intensive tasks, utilizing shared readable/writeable memory for inter-process communication, and employing a producer-consumer pattern to minimize memory usage and reduce the likelihood of application termination.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If applications are refactored to execute within multiple processes using shared memory, then memory efficiency is enhanced and application termination is reduced, but device complexity increases
Solution Approach 1:
The application is divided into multiple processes (lightweight and heavyweight) that can execute independently. The lightweight process handles discrete tasks while the heavyweight process handles resource-intensive tasks, allowing the system to manage memory more efficiently and reduce application termination under low-memory conditions.
Solution Approach 2:
Shared readable/writeable memory is introduced as an intermediary mechanism between processes to enable communication and data sharing. This allows processes to exchange information without requiring both to be fully loaded in memory simultaneously, reducing overall memory consumption and termination risk.
2Quantity of substance
If shared readable/writeable memory is used for inter-process communication, then memory efficiency improves, but device complexity increases
Solution Approach 1:
Instead of loading entire applications into memory, the system loads only the necessary portions (lightweight processes) into memory and uses shared memory segments for communication. This partial loading approach reduces memory consumption while maintaining functionality through selective process execution.
3Productivity
If lightweight and heavyweight processes are used to handle discrete and resource-intensive tasks respectively, then productivity improves, but device complexity increases
Solution Approach 1:
Different process types are assigned to different task categories based on their characteristics. Lightweight processes handle discrete, memory-sensitive tasks while heavyweight processes handle resource-intensive tasks. This local optimization allows each process type to be tailored for its specific function, improving overall system productivity.
Data Source
AI summary
Multiple processes of an application (or multiple applications capable of sharing private data) of a mobile device can communicate in a process-safe, secure, and efficient manner via a shared private file system. A first process can produce shared data for a second process to consume via the file system. For example, when the shared data changes, the first process can write a new file to the private file system and rename the new file to a specified file name. When the second process needs the shared data, the second process can evaluate certain metadata of the new file, such as a timestamp or a field comprising a monotonically increasing number. If a stored metadata value associated with the specified file name is less than the metadata value of the new file, the second process can safely retrieve the shared data from the new file.


