English
Review questions
Questions for self-check and exam preparation, grouped by course topic.
Topic 1. Fundamentals of parallel computing
- What are parallel and distributed computing? Compare parallelism and concurrency.
- Describe the architectures of shared-memory and distributed-memory computing systems. What are SMP and NUMA?
- Explain Flynn’s taxonomy: SISD, SIMD, MISD, MIMD. Give examples of modern systems.
- What are the speedup and efficiency of a parallel algorithm? How are they measured?
- Explain Amdahl’s law. How does the fraction of sequential code limit speedup?
- Explain Gustafson’s law and compare it with Amdahl’s law. What are strong and weak scaling?
Topic 2. Processes and threads
- Compare operating system processes and threads. What is a context switch?
- How does the operating system schedule threads? Explain priorities and time slices.
- What is processor affinity, and how is it configured?
- How do you create and start threads with the Thread class in C#? Compare background and foreground threads.
- What is a thread pool (ThreadPool)? What advantages does it offer over creating threads?
- What is thread-local storage (ThreadLocal, the ThreadStatic attribute)?
Topic 3. Thread synchronization
- What is a race condition? Give an example and ways to eliminate it.
- What is a critical section? Explain the lock statement and the Monitor class.
- Explain the atomic operations of the Interlocked class.
- Compare the Mutex, Semaphore, SemaphoreSlim, and ReaderWriterLockSlim synchronization primitives.
- What are deadlock, starvation, and livelock? What are the conditions for a deadlock, and how can it be prevented?
- Explain the ManualResetEventSlim, AutoResetEvent, and Barrier signaling primitives.
Topic 4. Thread-safe collections
- What thread-safe collections does the System.Collections.Concurrent namespace provide? Explain how ConcurrentDictionary and ConcurrentQueue work.
- What is the producer–consumer pattern? How do you implement it with BlockingCollection?
- What are channels (System.Threading.Channels)? Compare bounded and unbounded channels.
- What is false sharing? How does it affect performance?
- How do you detect and eliminate false sharing in a parallel program?
Topic 5. TPL tasks and async/await
- What is the TPL? Compare tasks (Task) and threads.
- How do you create and start tasks (Task.Run), wait for them to finish (Wait, WhenAll, WhenAny), and set up continuations (ContinueWith)?
- How do you cancel a task with a CancellationToken?
- How are exceptions handled in tasks? What is AggregateException?
- Compare asynchronous programming with async/await and parallel computing.
Topic 6. Data parallelism and PLINQ
- What is data parallelism? Explain the Parallel.For and Parallel.ForEach methods.
- How do you set the degree of parallelism (ParallelOptions) and terminate a parallel loop early?
- What is PLINQ? Explain the AsParallel, AsOrdered, and WithDegreeOfParallelism methods.
- What is data partitioning? Compare range and chunk partitioning.
- Explain parallel sorting algorithms (parallel merge sort, quicksort).
- What is a reduction? How do you perform a parallel sum with thread-local results?
Topic 7. SIMD vectorization
- What is SIMD vectorization? Which instruction sets (SSE, AVX, AVX-512, NEON) do you know?
- How do you use the Vector<T> type in .NET for vector computations? What are hardware intrinsics (System.Runtime.Intrinsics, Vector256)?
- How do you combine SIMD vectorization and multithreading to speed up computations?
- Explain parallel matrix multiplication algorithms. How do the traversal order and cache blocking affect performance?
- Which parallel algorithms for solving systems of linear equations do you know?
Topic 8. Parallel algorithms
- Which levels of parallelism do you know (bit, instruction, data, thread and task, process, job)? What is the granularity of parallelism?
- Explain the PRAM and BSP models of parallel computation and the work–span model. What does Brent’s theorem state?
- What are a grid system and a virtual organization? Compare a cluster, a grid, and a cloud; give examples of grid infrastructures (EGI, WLCG, BOINC).
- Explain Foster’s PCAM methodology. Which vector and matrix decomposition schemes (block, cyclic, stripes, checkerboard) do you know?
- How do you parallelize numerical integration and root finding for a nonlinear equation? Compare static and dynamic load balancing.
Topic 9. Multithreading in C++
- How do you create threads in C++ with std::thread and std::jthread?
- Explain the C++ synchronization facilities: std::mutex, std::lock_guard, std::scoped_lock, std::atomic.
- What are condition variables (std::condition_variable)? How do you implement a task queue?
- Explain std::async, std::future, and std::promise.
- What are the parallel algorithms of the C++ standard library and execution policies (std::execution::par, par_unseq)?
- How do you build a C++ project with CMake and Ninja in JetBrains CLion with the GCC compiler?
Topic 10. OpenMP
- What is OpenMP? Explain the fork-join model and the pragma omp parallel and omp parallel for directives.
- Explain the OpenMP variable scopes: shared, private, firstprivate.
- What is a reduction in OpenMP? Give an example of a parallel sum.
- Explain the loop iteration scheduling strategies: static, dynamic, guided.
- What are OpenMP tasks (task, taskwait)? How do you parallelize recursive algorithms?
- How do you bind threads to cores (OMP_PROC_BIND, OMP_PLACES) taking the NUMA architecture into account?
Topic 11. GPU computing
- Describe the architecture of a graphics processor. Compare GPUs and CPUs for parallel computing.
- What is CUDA? Explain the concepts of a kernel, the host and the device, and the hierarchy of threads, blocks, and grids.
- Explain the GPU memory hierarchy and data transfer between the host and the device.
- How do you write and run a simple CUDA C++ program with the NVIDIA CUDA Toolkit?
- What is the ILGPU library? How do you run computations on a GPU from a C# program?
- Which problems are efficiently solved on a GPU, and which factors limit the speedup?
Topic 12. MPI message passing
- What is the MPI standard? Explain a communicator, a process rank, and launching a program (mpirun).
- Explain the point-to-point operations MPI_Send and MPI_Recv. What are blocking and nonblocking operations?
- What is a deadlock in MPI programs, and how can it be avoided?
- Explain the collective operations MPI_Bcast, MPI_Scatter, and MPI_Gather and the reduction operations MPI_Reduce and MPI_Allreduce.
- What are hybrid MPI + OpenMP programs? What advantages do they offer on clusters?
- How do you measure the execution time and evaluate the scalability of an MPI program?
Topic 13. Clusters and the Slurm scheduler
- Describe the architecture of a computing cluster: the head and compute nodes, the network, and the shared file system.
- What is the Slurm job scheduler? Explain the concepts of a partition, a job, and resources, and the sbatch, srun, squeue, and scancel commands.
- How do you write a Slurm job script for an MPI program?
- How do you configure the Linux operating system for high-performance computing?
- How do you work with a cluster remotely over SSH and transfer files?
Topic 14. Sockets, RPC, and gRPC
- Describe the models of distributed computing: client–server, peer-to-peer, remote procedure call.
- How do you implement network communication with TCP sockets in .NET?
- What is a remote procedure call (RPC)? Compare WCF and CoreWCF.
- What is gRPC? Explain the Protocol Buffers interface definition language (the .proto file) and the kinds of calls: unary, server streaming, client streaming, and bidirectional streaming.
- Compare gRPC and REST in terms of performance and areas of application.
Topic 15. The RabbitMQ broker
- What is a message broker? Describe the AMQP model: exchanges, queues, bindings.
- How do you implement a work queue with several workers in RabbitMQ?
- Explain the RabbitMQ exchange types: direct, fanout, topic, headers.
- How do you implement the publish–subscribe pattern with RabbitMQ?
- Explain message delivery guarantees: acknowledgments, durable queues, redelivery.
- How do you work with RabbitMQ from a .NET program with the RabbitMQ.Client library?
Topic 16. Actors and Microsoft Orleans
- What is the actor model? What are its advantages for distributed systems?
- What is the Microsoft Orleans framework? Explain the concepts of virtual actors (grains) and silos.
- How is the state of a grain stored and restored in Orleans?
- Explain the CAP theorem. Give examples of CP and AP systems.
- What is fault tolerance? Explain replication, retries, and the circuit breaker pattern.
- What is consensus in distributed systems? Explain the general idea of the Raft algorithm.
Topic 17. Docker, Kubernetes, Aspire
- What is containerization? Compare containers and virtual machines.
- How do you create a container image for a .NET application with a Dockerfile and run several services with Docker Compose?
- What is Kubernetes? Explain the concepts of a Pod, a Deployment, and a Service.
- How do you scale an application in Kubernetes and ensure its fault tolerance?
- What is .NET Aspire? How does it simplify the development and orchestration of distributed applications?
Topic 18. Microservice architecture
- Compare monolithic and microservice architectures. How do you decompose a system by bounded contexts?
- What are an API gateway and a BFF? What functions does YARP perform in a microservice system?
- Why are distributed transactions (2PC) avoided in microservices? Explain the Saga pattern: choreography, orchestration, compensating actions.
- Explain the Transactional Outbox and Inbox patterns. How do you ensure the idempotency of message consumers?
- What is observability? How do OpenTelemetry and the Aspire dashboard help trace requests across services?