0
0
GCPcloud~20 mins

Function runtime environments in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Function Runtime Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
Function Runtime Environment Memory Allocation Impact

You deploy a Google Cloud Function with 256MB memory. You notice it runs slower than expected. You increase memory to 2GB. What is the most likely effect on the function's runtime environment?

AThe function will run faster because it uses a newer runtime version automatically.
BThe function will run slower because more memory causes more garbage collection.
CThe function runtime environment remains the same; only memory size changes.
DThe function will have more CPU power and run faster because CPU scales with memory.
Attempts:
2 left
💡 Hint

Think about how Google Cloud Functions allocate CPU relative to memory.

Architecture
intermediate
2:00remaining
Choosing Runtime Environment for Cloud Functions

You want to deploy a Cloud Function that processes images using Python 3.9 libraries. Which runtime environment should you select to ensure compatibility?

AUse the Python 3.9 runtime environment to match your libraries.
BUse the Go 1.16 runtime and rewrite the code in Go.
CUse the Node.js 16 runtime and call Python scripts externally.
DUse the Python 3.7 runtime environment because it is the most stable.
Attempts:
2 left
💡 Hint

Match your code libraries with the runtime environment version.

security
advanced
2:00remaining
Runtime Environment Security Isolation

Which statement best describes how Google Cloud Functions isolate runtime environments to enhance security?

AFunctions share the same runtime environment but use different user accounts.
BFunctions run in isolated containers with limited access to the host system.
CEach function runs in a separate virtual machine with full OS isolation.
DFunctions run directly on the host OS without isolation to improve speed.
Attempts:
2 left
💡 Hint

Think about container technology and how cloud providers isolate workloads.

Best Practice
advanced
2:00remaining
Managing Dependencies in Function Runtime Environments

You have a Cloud Function that uses several third-party libraries. What is the best practice to manage these dependencies in the runtime environment?

AInclude all dependencies in the function deployment package to ensure they are available at runtime.
BInstall dependencies manually on the runtime environment after deployment.
CUse only standard libraries to avoid managing dependencies.
DDownload dependencies at runtime from the internet each time the function runs.
Attempts:
2 left
💡 Hint

Consider how Cloud Functions access libraries during execution.

🧠 Conceptual
expert
2:00remaining
Cold Start Behavior in Function Runtime Environments

What is the primary cause of a cold start in Google Cloud Functions, and how does the runtime environment contribute to it?

ACold start occurs when the function code has errors; the runtime environment retries initialization.
BCold start is caused by network latency; the runtime environment caches responses to reduce it.
CCold start happens when a new container is created; the runtime environment must initialize before handling requests.
DCold start happens when the function exceeds memory limits; the runtime environment restarts automatically.
Attempts:
2 left
💡 Hint

Think about what happens when a function is called after being idle.