educative.io

C# Concurrency for Senior Engineering Interviews (C. H. Afzal)


The End - Epilogue Acknowledgements and credits. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5776892981411840). Basics - Program vs Process vs Thread This lesson discusses the differences between a program, process, and a thread. Also included is an psuedocode-example of a thread-unsafe program. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5837878435250176). Basics - Introduction This lesson introduces concurrency and provides motivational examples to further our understanding of concurrent systems. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4984175486566400). Basics - Concurrency vs Parallelism This lesson clarifies the common misunderstandings and confusions around concurrency and parallelism. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5527923312295936). Basics - Cooperative Multitasking vs Preemptive Multitasking This lesson details the differences between the two common models of multitasking. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4774091003265024). Basics - Moore’s Law Discusses impact of Moore's law on concurrency. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5556128223068160). Interview Practice Problems - Blocking Queue | Bounded Buffer | Consumer Producer Classical synchronization problem involving a limited size buffer which can have items added to it or removed from it by different producer and consumer threads. This problem is known by different names: consumer producer problem, bounded buffer problem or blocking queue problem. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5847124677754880). API Overview - Tasks This lesson discusses the Task class in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6087227341799424). API Overview - Volatile This section discusses the volatile keyword. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6208724207140864). Interview Practice Problems - Multithreaded Merge Sort Merge sort using multiple threads. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6357548791758848). Brief Intro to Asynchronous Programming - Awaitable This lesson explains the awaitable concept in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5205110542041088). API Overview - Atomicity This lesson discusses the concept of atomic operations and how that affects multithreaded programs. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5459346903269376). API Overview - Acquire Release Semantics This lesson explains what is meant by acquire and release semantics. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4889044074889216). Interview Practice Problems - Asynchronous to Synchronous Problem A real-life interview question asking to convert asynchronous execution to synchronous execution. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6083195239923712). Interview Practice Problems - ReadWrite Lock We discuss a common interview question involving synchronization of multiple reader threads and a single writer thread. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5059108103258112). Interview Practice Problems - Dining Philosophers This chapter discusses the famous Dijkstra's Dining Philosopher's problem. Two different solutions are explained at length. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4883918803173376). Interview Practice Problems - Unisex Bathroom Problem A synchronization practice problem requiring us to synchronize the usage of a single bathroom by both the genders. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6742531473670144). API Overview - Working with Threads This lesson discusses the various ways in which we can create and run threads. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5574926427750400). Interview Practice Problems - Rate Limiting Using Token Bucket Filter Implementing rate limiting using a naive token bucket filter algorithm. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4937076506099712). Brief Intro to Asynchronous Programming - Introduction This lesson gives a gentle introduction to asynchronous programming in C#. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4728150976102400). Brief Intro to Asynchronous Programming - Caveats This lesson explains that asynchronous invocation don't create any new threads and the concept of synchronization context. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6310590664409088). API Overview - Semaphore In this lesson, we discuss the Semaphore class in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5052211191087104). Basics - Hoare vs Mesa Monitors This lesson looks at the different designs for implementing monitors. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5597136307617792). Interview Practice Problems - Implementing Semaphore Learn how to design and implement a simple semaphore class in C#. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5855715920969728). Brief Intro to Asynchronous Programming - Quiz This lesson challenges the reader on some of the concepts covered under asynchronous programming. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5731027408388096). Basics - Mutex vs Monitor Learn what a monitor is and how it is different than a mutex. Monitors are advanced concurrency constructs and specific to languages frameworks. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5292765967548416). Basics - Throughput vs Latency This lessons discusses throughput and latency in the context of concurrent systems. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6627752499216384). API Overview - lock Statement This lesson discusses the lock statement. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5224223817596928). API Overview - SpinLock & SpinWait This lesson discusses the SpinLock and SpinWait classes in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5640620938887168). API Overview - CountdownEvent This lesson discusses the CountdownEvent class in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4752022605660160). API Overview - ThreadLocal This lesson discusses the ThreadLocal class in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5631119934357504). API Overview - Memory Model This lesson discusses C#'s memory model. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6024477601169408). Basics - Semaphore vs Monitor This lesson discusses the differences between a monitor and a semaphore. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5732267957682176). Interview Practice Problems - ... continued This lesson explains implementing a bounded buffer using the Monitor class. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4790997319942144). API Overview - Monitor This lesson explains how the Monitor class in C# works and its related caveats. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4534888420081664). Basics - Mutex vs Semaphore The concept of and the differences between a mutex and a semaphore will befuddle most developers. In this lesson, we discuss the differences between the two most fundamental concurrency constructs offered by almost all language frameworks. Difference between a mutex and a semaphore makes a pet interview question for senior engineering positions! View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4606368050839552). Interview Practice Problems - Uber Ride Problem This lesson solves the constraints of an imaginary Uber ride problem where Republicans and Democrats can't be seated as a minority in a four passenger car. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6561942812491776). API Overview - Barrier This lesson discusses the Barrier class in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5974304061652992). Interview Practice Problems - Thread Safe Deferred Callback Asynchronous programming involves being able to execute functions at a future occurrence of some event. Designing a thread-safe deferred callback class becomes a challenging interview question. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4744748239683584). Basics - Amdahl's Law Blindly adding threads to speed up program execution may not always be a good idea. Find out what Amdahl's Law says about parallelizing a program. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6745429536407552). Interview Practice Problems - Superman Problem Correctly implementing a singleton pattern in C#. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4594956591169536). Basics - Critical Sections & Race Conditions This lesson exhibits how incorrect synchronization in a critical section can lead to race conditions and buggy code. The concepts of critical section and race condition are explained in depth. Also included is an executable example of a race condition. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4610229494874112). API Overview - Mutex This lesson explains how the Mutex class in C# works and its related caveats. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6382306728083456). Brief Intro to Asynchronous Programming - ... continued Continues the explanation on async and await keywords. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4839717138857984). Brief Intro to Asynchronous Programming - Async/Await This lesson introduces the async and await keywords and works through an example using the two. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6711837724770304). API Overview - Wait Handles This lesson discusses the abstract class WaitHandle and its derived classes in C# View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6298337332428800). Basics - Synchronous vs Asynchronous This lesson discusses the differences between asynchronous and synchronous programming which are often talked about in the context of concurrency. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4634812042182656). API Overview - ... continued This section discusses topics such as using lambda expressions to create threads, pausing and interrupting threads. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6485045869019136). API Overview - Interlocked This lesson explains how the Interlocked class in C# works and its related caveats. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5738592095698944). Basics - I/O Bound vs CPU Bound In this lesson, we delve into the characteristics of programs with different resource-use profiles and how that can affect program design choices. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6337176419696640). Basics - Deadlocks, Liveness & Reentrant Locks We discuss important concurrency concepts such as deadlock, liveness, live-lock, starvation and reentrant locks in depth. Also included are executable code examples for illustrating these concepts. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6410074631176192). Interview Practice Problems - Implementing a Barrier This lesson discusses how a barrier can be implemented in C#. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/6650923076026368). Interview Practice Problems - Barber Shop This lesson visits the synchronization issues when programmatically modeling a hypothetical barber shop and how they are can be solved using C#'s concurrency primitives. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/5307698193104896). Interview Practice Problems - Implementing AutoResetEvent This lesson demonstrates how to implement a limited version of the AutoResetEvent class. View the lesson [here](https://www.educative.io/collection/page/5307417243942912/6345276711239680/4966917301338112).
About the C# Concurrency for Senior Engineering Interviews (C. H. Afzal) category [C# Concurrency for Senior Engineering Interviews (C. H. Afzal)] (1)