.NET - MCSD 70-483 C#

.NET - MCSD 70-483 C#

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Mutual Exclusion

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (16)

Section 1

(16 cards)

Mutual Exclusion

Front

Ensures only one thread at a time can access a shared resource.

Back

Delegate vs Event

Front

...

Back

Thread

Front

Smallest unit of execution that can be independently scheduled by the OS

Back

Misc - Cores / Hyperthreading

Front

Hyperthreading - Every core has 2 isntruction pipelines, but only one execution engine Hyperthreading improves performance by 30% Every core improves performance by 70%

Back

Lock keyword

Front

Maps to the Monitor class

Back

Threads in all .NET Applications

Front

Garbage Collector thread: Responsible for the garbage collection. Finalizer thread: Responsible to run the Finalize method of your objects. Main thread: Responsible to run your main application's method. UI thread: WinForms, WPF, and Windows Store applications have one thread dedicated to update the user interface.

Back

Interlocked Class

Front

Provides atomic operations for variables that are shared by multiple threads Add, Read, Increment, Decrement, Exchange, CompareExchange

Back

Tasks in TPL

Front

Way to abstract away the need for threads from the programmer

Back

Atomic Operation

Front

Operation ca be started and finished as a single step without other threads interfering

Back

Parallel Classes

Front

For, ForEach, Invoke

Back

?? Operator

Front

Null-Coalescing Operator Set y to the value of x if x is NOT null; otherwise, if x = null, set y to -1. int y = x ?? -1;

Back

Race Condition

Front

When two threads try to update the same data

Back

Thread vs Threadpool

Front

1. All threads created from a Threadpool are background threads, manually created threads are foreground by default and can be set to background 2. Can't abort or interrupt a thread from the thread pool. 3. You can't join a thread from the thread pool. 4. Threads from the thread pool are reused when they finish their work, whereas the normal threads are destroyed. 5. You can't control the priority of a thread from the thread pool.

Back

For, Foreach, While, Do While

Front

...

Back

Covariance and Contravariance

Front

http://tomasp.net/blog/variance-explained.aspx/

Back

Concurrent Collections

Front

BlockingCollection<T> ConcurrentBag<T> - Add, TryTake, TryPeak ConcurrentDictionary<TKey,T> - ConcurrentQueue<T> - Enqueue, TryDequeue ConcurrentStack<T> - Push, TryPop

Back