Docsity

Program Committee Member Cloud Native Rust Day Practice Exam, Exams of Technology

Toggle sidebar
bg1
Program Committee Member Cloud
Native Rust Day Practice Exam
**Question 1.** Which of the following statements best describes Rust’s ownership model?
A) Multiple mutable references are allowed simultaneously
B) Ownership can be transferred but not borrowed
C) Each value has a single owner, and the compiler enforces borrowing rules at compile time
D) Ownership is irrelevant because Rust relies on a garbage collector
Answer: C
Explanation: Rust enforces that each value has one owner; references can be borrowed
immutably or mutably, but the borrow checker ensures no data races or dangling references at
compile time.
**Question 2.** In Rust, what does the `Send` trait guarantee?
A) The type can be safely shared between threads without synchronization
B) The type can be transferred to another thread
C) The type implements the `Clone` trait automatically
D) The type is immutable
Answer: B
Explanation: `Send` indicates that ownership of the type can be moved to another thread safely.
It does not guarantee thread‑safe shared access (that’s `Sync`).
**Question 3.** Which Rust feature prevents use‑after‑free bugs?
A) Lifetime annotations
B) The `unsafe` keyword
C) The `match` statement
D) The `Result` type
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Program Committee Member Cloud Native Rust Day Practice Exam and more Exams Technology in PDF only on Docsity!

Native Rust Day Practice Exam

Question 1. Which of the following statements best describes Rust’s ownership model? A) Multiple mutable references are allowed simultaneously B) Ownership can be transferred but not borrowed C) Each value has a single owner, and the compiler enforces borrowing rules at compile time D) Ownership is irrelevant because Rust relies on a garbage collector Answer: C Explanation: Rust enforces that each value has one owner; references can be borrowed immutably or mutably, but the borrow checker ensures no data races or dangling references at compile time. Question 2. In Rust, what does the Send trait guarantee? A) The type can be safely shared between threads without synchronization B) The type can be transferred to another thread C) The type implements the Clone trait automatically D) The type is immutable Answer: B Explanation: Send indicates that ownership of the type can be moved to another thread safely. It does not guarantee thread‑safe shared access (that’s Sync). Question 3. Which Rust feature prevents use‑after‑free bugs? A) Lifetime annotations B) The unsafe keyword C) The match statement D) The Result type

Native Rust Day Practice Exam

Answer: A Explanation: Lifetimes let the compiler track how long references are valid, ensuring that a reference cannot outlive the data it points to, thus eliminating use‑after‑free. Question 4. When is it appropriate to use unsafe Rust in a cloud driver? A) To bypass the borrow checker for performance‑critical sections that have been manually verified as safe B) To avoid writing any tests C) To allow null pointer dereferencing safely D) To automatically generate API documentation Answer: A Explanation: unsafe blocks let developers perform operations the compiler cannot verify, such as raw pointer manipulation, but they must guarantee safety manually, often for low‑level performance reasons. Question 5. How does Rust achieve “zero‑cost abstractions”? A) By compiling to interpreted bytecode at runtime B) By eliminating all abstractions in the language design C) By generating code that is as efficient as hand‑written low‑level code, with no runtime overhead D) By using a just‑in‑time (JIT) compiler Answer: C

Native Rust Day Practice Exam

A) It can be sent to another thread B) It can be safely referenced from multiple threads simultaneously C) It implements the Copy trait D) It is immutable Answer: B Explanation: Sync indicates that a reference to the type (&T) can be shared across threads safely, meaning the type’s internal implementation handles concurrent access correctly. Question 9. In a Rust microservice container, which base image typically yields the smallest attack surface? A) ubuntu:latest B) alpine with musl static linking C) centos:7 D) debian:buster Answer: B Explanation: Alpine is a minimal Linux distribution, and static linking with musl removes dynamic library dependencies, resulting in a tiny, low‑attack‑surface image. Question 10. How does static linking with MUSL benefit cold‑start times in server‑less Rust functions? A) It forces the runtime to load many shared libraries at startup B) It eliminates the need to resolve dynamic symbols, reducing startup overhead C) It disables all optimizations, making the binary larger D) It requires a separate container per function

Native Rust Day Practice Exam

Answer: B Explanation: Static linking bundles all dependencies into the binary, so the runtime does not need to locate and load external libraries, leading to faster cold starts. Question 11. Which crate is commonly used to interact with the Kubernetes API from Rust? A) serde_json B) kube-rs C) reqwest D) tokio Answer: B Explanation: The kube crate (often referred to as kube-rs) provides high‑level abstractions for talking to the Kubernetes API, including CRD handling and controller scaffolding. Question 12. When developing a custom controller in Rust for Kubernetes, which trait must your reconciler implement? A) Controller B) Reconcile C) Operator D) Watch Answer: B Explanation: The kube-runtime crate defines a Reconcile trait that the reconciler struct implements to handle the desired state logic for a custom resource.

Native Rust Day Practice Exam

C) It only supports interpreted Wasm, not compiled D) It automatically converts Wasm to native machine code at compile time Answer: B Explanation: Wasmtime is a lightweight, embeddable runtime that JIT‑compiles Wasm to native code on the fly, offering fast startup and strong sandboxing—ideal for edge. Question 16. Which of the following best describes WASI? A) A JavaScript framework for building web apps B) An interface that allows WebAssembly modules to safely access host resources like files and network C) A container orchestration platform D) A Rust crate for building HTTP servers Answer: B Explanation: WASI (WebAssembly System Interface) defines a set of system calls that let Wasm modules interact with the host environment in a secure, sandboxed way. Question 17. How does the WebAssembly Component Model improve cross‑language interoperability? A) By forcing all components to be written in Rust B) By defining a binary interface that can be compiled from many source languages, allowing components to be linked together at runtime C) By eliminating the need for any compilation step D) By providing a built‑in garbage collector for all languages

Native Rust Day Practice Exam

Answer: B Explanation: The Component Model specifies a language‑agnostic binary interface (WIT) that enables components compiled from different languages to interoperate without language‑specific glue code. Question 18. Which cloud provider currently supports running Rust‑compiled Wasm directly in its serverless platform? A) AWS Lambda (via custom runtime) B) Google Cloud Functions (native) C) Azure Functions (native) D) None Answer: A Explanation: AWS Lambda can run Rust‑compiled Wasm by using a custom runtime that loads the Wasm module, whereas other providers still require a wrapper or do not yet support native Wasm execution. Question 19. Which crate is used to emit OpenTelemetry traces from a Rust application? A) tracing-opentelemetry B) log C) env_logger D) metrics Answer: A Explanation: tracing-opentelemetry bridges the tracing ecosystem with OpenTelemetry, allowing Rust programs to export structured traces to OTel back‑ends.

Native Rust Day Practice Exam

B) Ensure the abstract clearly explains core concepts and challenges addressed C) Accept any talk that mentions “Rust” regardless of substance D) Reject all beginner‑level submissions Answer: B Explanation: A good proposal should demonstrate clear technical depth by outlining the problem, solution approach, and expected contributions, not just hype. Question 23. What does the “Benevolent Cascade” refer to in the context of conference PC diversity? A) A waterfall model for paper submission B) The phenomenon where a diverse program committee leads to a more diverse speaker lineup and audience C) A rule that forces all reviewers to be from different continents D) A scheduling algorithm for talks Answer: B Explanation: The “Benevolent Cascade” describes how diversity at the decision‑making level propagates to broader inclusion throughout the event ecosystem. Question 24. Which action is appropriate when a reviewer discovers a conflict of interest with a submission? A) Vote against the paper to avoid bias accusations B) Recuse themselves from reviewing and inform the PC chair C) Ignore the conflict and proceed D) Edit the submission to remove the conflict

Native Rust Day Practice Exam

Answer: B Explanation: Ethical reviewing requires recusal from any paper where a real or perceived conflict exists, and the PC chair should be notified. Question 25. When providing feedback to a rejected speaker, which approach is considered most constructive? A) Giving a one‑sentence “No thanks” reply B) Offering specific, actionable suggestions for improvement and highlighting strengths C) Criticizing the author’s background D) Ignoring the submission entirely Answer: B Explanation: Constructive feedback helps the author improve future submissions and maintains a professional, supportive community atmosphere. Question 26. Which Rust feature enables “fearless concurrency” by preventing data races at compile time? A) The async keyword alone B) The borrow checker combined with Send/Sync traits C) The unsafe block D) The match statement Answer: B Explanation: The borrow checker enforces borrowing rules, and the Send/Sync traits encode thread‑safety guarantees, together eliminating data races without runtime checks.

Native Rust Day Practice Exam

A) They automatically encrypt network traffic B) They contain no package manager or shell, reducing the attack surface C) They enable runtime code generation D) They guarantee zero‑day vulnerability protection Answer: B Explanation: Distroless images include only the application binary and its runtime dependencies, omitting shells, package managers, and other tools that could be exploited. Question 30. Which of the following crates is most suitable for building a high‑performance, async HTTP server in Rust? A) reqwest B) hyper C) std::net::TcpListener D) serde_json Answer: B Explanation: hyper is a low‑level, async HTTP library built on top of tokio, designed for high throughput and low latency. Question 31. In the context of Wasm edge computing, why might a developer choose Wasm over a traditional container? A) Wasm images are larger, providing more features B) Wasm offers faster cold starts, lower memory footprints, and stronger sandbox isolation C) Wasm requires a full OS kernel to run D) Wasm does not support networking

Native Rust Day Practice Exam

Answer: B Explanation: Wasm modules are compact, start in milliseconds, consume less memory, and run in a sandboxed environment, making them ideal for edge scenarios with limited resources. Question 32. Which Rust attribute is used to expose a function as a C‑compatible entry point for an unsafe FFI library? A) #[no_mangle] B) #[derive(Copy)] C) #[inline] D) #[test] Answer: A Explanation: #[no_mangle] prevents name mangling, ensuring the function name remains unchanged for external callers, which is essential for C FFI. Question 33. When measuring tail latency of a Rust microservice, which metric is most indicative of worst‑case performance? A) Average response time (mean) B) 50th percentile (p50) C) 95th percentile (p95) D) 99th percentile (p99) Answer: D Explanation: The p99 latency captures the response time that 99% of requests meet, highlighting outliers and worst‑case behavior crucial for latency‑sensitive services.

Native Rust Day Practice Exam

D) Converting all errors to strings manually Answer: B Explanation: The ? operator propagates errors, and anyhow::Context allows attaching additional information, producing richer error messages without boilerplate. Question 37. When deploying a Rust‑based service to Kubernetes, which of the following ensures the pod restarts automatically on failure? A) Setting restartPolicy: Never B) Using a Deployment controller with default restartPolicy: Always C) Adding a livenessProbe that always fails D) Disabling health checks Answer: B Explanation: A Deployment creates ReplicaSets that enforce restartPolicy: Always, ensuring pods are restarted if they exit unexpectedly. Question 38. Which crate can be used to generate OpenAPI specifications from Rust code automatically? A) rocket B) paperclip C) actix-web D) serde_yaml Answer: B

Native Rust Day Practice Exam

Explanation: paperclip integrates with web frameworks (e.g., actix-web) to generate OpenAPI (Swagger) docs from annotated Rust handlers. Question 39. In the context of PC ethics, what is “unconscious bias”? A) An intentional decision to favor a particular author B) Implicit attitudes or stereotypes that affect judgment without the reviewer’s awareness C) A rule that forces reviewers to accept all submissions from their institution D) A coding style preference Answer: B Explanation: Unconscious bias refers to hidden preferences that can influence decisions despite the reviewer’s belief in objectivity, requiring mitigation strategies. Question 40. Which of the following is a common method to mitigate unconscious bias during proposal review? A) Reviewing proposals anonymously (double‑blind) B) Giving higher scores to well‑known speakers C) Ignoring diversity statements D) Assigning reviewers based on personal friendships Answer: A Explanation: Double‑blind review hides author identity, reducing the impact of gender, affiliation, or reputation biases. Question 41. Which Rust feature allows compile‑time generation of efficient parsers for binary formats?

Native Rust Day Practice Exam

Answer: B Explanation: Static dispatch means the compiler generates specialized versions of generic functions for each used type, allowing inlining and zero‑cost abstraction. Question 44. What is the main advantage of using Arc over Rc in a multithreaded context? A) Arc provides atomic reference counting, making it safe across threads, while Rc is not thread‑safe B) Arc is faster than Rc in single‑threaded code C) Arc automatically encrypts data D) Arc does not require the Clone trait Answer: A Explanation: Arc (Atomic Reference Counted) uses atomic operations to manage reference counts safely across threads, whereas Rc is only for single‑threaded scenarios. Question 45. In a Rust library that provides a custom error type, which crate helps reduce boilerplate for implementing std::error::Error? A) anyhow B) thiserror C) failure (deprecated) D) log Answer: B Explanation: thiserror provides macros (#[derive(Error)]) that automatically implement Display and Error traits for custom error enums/structs.

Native Rust Day Practice Exam

Question 46. Which of the following is a key reason to prefer Result<T, E> over panicking in production Rust services? A) Panics are more performant than returning errors B) Result enables graceful error handling and recovery without crashing the whole process C) Panics automatically log to Prometheus D) Result hides all error information Answer: B Explanation: Using Result lets the application decide how to handle failures, preserving uptime and allowing structured error propagation, whereas a panic aborts the thread/process. Question 47. When building a Rust binary for deployment in a minimal container, which compiler flag is commonly used to strip symbols and reduce size? A) --release only B) -C opt-level=0 C) -C strip=symbols D) -C debuginfo=2 Answer: C Explanation: -C strip=symbols tells the compiler to remove debug symbols from the final binary, decreasing its size for production containers. Question 48. Which of the following best explains why Rust does not need a garbage collector? A) It uses reference counting exclusively