Virtualized Tasks in On-Demand Code Execution Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing computing systems face inefficiencies in executing code due to delays in initializing virtual machines and potential security risks from information sharing between multiple callers accessing common tasks.

Innovation Solution

The on-demand code execution system enables rapid execution of code by pre-warming virtual machine instances and allows users to define multiple virtual tasks from a common task, which can be executed independently with different parameters, reducing replication and improving fault tolerance and security through partitioning and colocation of tasks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If virtual machines are initialized on-demand to execute code, then resource utilization is improved, but execution latency increases due to initialization delays

Engineering Contradiction:
Improveresource utilizationVSAvoidexecution latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system pre-warms virtual machine instances by keeping them in a ready-state with code loaded in memory before actual execution requests arrive. This preliminary action eliminates initialization delays when code needs to be executed, as the virtual machines are already prepared and can start execution immediately upon receiving a request.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If multiple callers share common tasks to reduce replication, then device complexity is reduced, but security risks increase due to information sharing

Engineering Contradiction:
Improvesystem complexityVSAvoidsecurity risks
Core Design Contradiction:
Device complexityVSObject-affected harmful factors

Solution Approach 1:

The system segments callers into different groups based on their security contexts and assigns them to different virtual machine instances. Even though multiple callers may execute the same code, they are isolated in separate virtualized environments, preventing information leakage between callers while still allowing the system to share the underlying code base.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces a task management layer that acts as an intermediary between callers and virtual machine instances. This intermediary handles task assignment, ensures proper isolation, and manages the mapping between callers and virtualized environments, thereby maintaining security while enabling code sharing.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If code is executed serially on a single virtual machine, then security isolation is improved, but execution speed decreases

Engineering Contradiction:
Improvesecurity isolationVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The system merges multiple virtual machine instances into a shared pool that can execute code in parallel. By coordinating multiple isolated virtual machines to work simultaneously on different code executions, the system achieves both security isolation through virtualization and improved execution speed through parallel processing.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10318347B1Virtualized tasks in an on-demand network code execution system
Publication Date: 2019.06.11 AMAZON TECH INC
  • US10318347B1 patent drawing
  • US10318347B1 patent drawing
  • US10318347B1 patent drawing

AI summary

Systems and methods are described for implementing multiple virtual tasks, or task copies, in an on-demand code execution system or other distributed code execution environment, each virtual task or task copy corresponding to a common parent task and sharing executable code. Virtual tasks or task copies may be handled independently at the on-demand code execution system, enabling separated queuing, throttling, or logging, in a manner similar to two unrelated tasks. However, the on-demand code execution system may process calls to execute a first virtual task using knowledge of executions of other, related virtual tasks, in order to reduce or eliminate data duplication between executions of the first virtual task and the related virtual tasks. In this manner, the computational resources required to implement virtual tasks can be minimized or eliminated.