Professional Documents
Culture Documents
MCQs
i) Namespaces for TPL is/are
(a) System.Threading
(b) System.Threading.Tasks
(c) System.Tasks
(d) Both a and b
ii) TPL handles the scheduling of threads on which class
(a) ThreadPool
(b) ThreadLocal(T)
(c) Both a and b
(d) None of them
iii) The ____ method provides a convenient way to run any number of
arbitrary statements concurrently.
(a) Parallel.Invoke
(b) Parallel.Execute
(c) None of them
iv) A task that does not return a value is represented by the ___ class.
(a) System.Threading.Tasks.Task
(b) System.Threading.Tasks.Task<TResult>
(c) None of them
xiii)
Which of the following is correct way to temporarily stop
execution of a thread object named as "myThread" for 500
millisecond ?
(a) myThread.Sleep(0.05);
(b) myThread.Stop(0.05);
(c) myThread.Sleep(500);
(d) myThread.Stop(500);
xiv) ______________ is more than one thing happening at the same time.
(a)
Cohesion
(b)
Congruence
(c)
Coherence
(d)
Concurrency
xv) Which of the following class supports data parallelism in "Task
Parallel Library"?
(a)
System.Threading.Tasks
(b)
System.Task.Parallel
(c)
System.threading.Task.Parallel
(d)
System.Task.Threading.Parallel
xvi) The "Task Based Asynchronous pattern" method returns either a
"Task" or a "Task<TResult>" based on whether the corresponding
__________ method returns "void" or a type "TResult".
(a) Callback
(b) Return
(c) Asynchronous
(d) Synchronous
xvii) Which of the following is not a part of "cancellation" task?
(a) The calling thread does forcibly end the task
(b) Notice and respond to the cancellation request in your user
delegate
(c) Both
(d) None of them
xxiv) You can execute your LINQ queries in parallel using
(a) Parallel LINQ (PLINQ)
(b) Multithread LINQ (MLINQ)
(c) Both
(d) None of them
(a) task.Destroy()
(b) Task.Exit()
(c) task.Dispose()
(d) Task.Release()
xxix) In .NET a task represent a/an ___ operation
(a) Synchronous
(b) Asynchronous
(c) Parallel
References
http://www.infoworld.com/article/2888469/microsoft-net/a-deep-dive-insidethe-task-parallel-library-features-in-net-framework.html
http://stackoverflow.com/questions/2521840/multithreading-or-task-parallellibrary
https://msdn.microsoft.com/en-us/library/dd537609%28v=vs.110%29.aspx
10
https://msdn.microsoft.com/en-us/library/dd460717%28v=vs.110%29.aspx
http://vustudents.ning.com/group/cs411-visual-programming/forum/topics/quiz4-february-27-2015-february-27-2015-from-32-to-42lectures?commentId=3783342%3AComment%3A4947917&xg_source=activity
&groupId=3783342%3AGroup%3A4194109
11