Threading in .NET - placement questions

Threading in .NET - placement questions


Q.1 Which are the two important predefined delegate in Threading?

A DelegateThreadStart and Thread.
B) ThreadStart and ParameterizedThreadStart.
C) Thread and ThreadStart.
D) None of the above.

View Answer / Hide Answer

ANSWER: B




Q.2 The types of multitasking are

A) Thread-based and process-based
B) Process-based and program-based .
C) Hardware based.
D) None of the above.

View Answer / Hide Answer

ANSWER: A




Q.3 Choose the correct option according to given below statement.

Statement 1: A program in execution is called Thread.
Statement 2: A program in execution is called Process.
Statement 3: The main purpose of threading is to perform multiple operations concurrently.
Statement 4: Thread is a light weight process.

A) Statement 1 is correct.
B) Only statement 2, and 3 are correct.
C) Statement 2, 3, and 4 are correct.
D) Only Statement 4 is correct.

View Answer / Hide Answer

ANSWER: C




Q.4 What are the two types of thread that .NET Framework supports?

A) Foreground and background.
B) Running and waiting thread.
C) Running and suspended thread.
D) None of the above.

View Answer / Hide Answer

ANSWER: A




Q.5 What method stops a running thread?

A) Thread.Suspend
B) Thread.Resume
C) Thread.Abort
D) Thread.Join

View Answer / Hide Answer

ANSWER: C




Q.6 By default, when you create a thread, What is its type?

A) Normal.
B) Background.
C) Foreground.
D) None of the above.

View Answer / Hide Answer

ANSWER: C




Q.7 Choose the correct option according to given below statement.
Statement 1: Processes does not have any thread.
Statement 2: All processes have at least two thread of execution.
Statement 3: All processes have at most one thread of execution.
Statement 4: All processes have at least one thread of execution.

A) Statement 1 is correct.
B) Only statement 2, and 3 are correct.
C) Statement 2, 3, and 4 are correct.
D) Only Statement 4 is correct.

View Answer / Hide Answer

ANSWER: D




Q.8 What type of object is required when starting a thread that requires a single parameter?

A) ThreadStart delegate
B) ParameterizedThreadStart delegate
C) ExecutionContext class
D) None of the above.

View Answer / Hide Answer

ANSWER: B




Q.9 Thread class is available in which namespace?

A) System.Thread
B) System.Threading
C) System.ThreadStart
D) None of the above.

View Answer / Hide Answer

ANSWER: B




Q.10 The default priority for a thread is.

A) Normal
B) AboveNormal
C) Highest
D) Lowest

View Answer / Hide Answer

ANSWER: A




Q.11 Suppose that there is no writer lock in place, how many readers can simultaneously read data with a ReaderWriterLock?

A) 0
B) 1
C) 2
D) Unlimited

View Answer / Hide Answer

ANSWER: D




Q.12 When two or more threads need access to a shared resource that can be used by only one thread at a time, is called

A) Sharing
B) Asynchronization.
C) Synchronization.
D) None of the above.

View Answer / Hide Answer

ANSWER: C




Q.13 Which condition occurs when two (or more) threads attempt to access a shared resource at the same time, without proper synchronization?

A) Race Condition.
B) Run Condition.
C) Wait Condition.
D) None of the above.

View Answer / Hide Answer

ANSWER: A




Q.14 Which of the following can be used to synchronize threads across AppDomain and process boundaries?

A. Monitor class
B. Mutex class
C. SyncLock
D. None of the above.

View Answer / Hide Answer

ANSWER: D




Q.15 To lock data where multiple readers can access data at once but one writer at a time can change data, then which class will you use?

A) Mutex.
B) Monitor.
C) ReaderWriterLock
D) None of the above.

View Answer / Hide Answer

ANSWER: C


Post your comment