View Count: 0
Duration: 52 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 44 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 18 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 29 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 25 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 36 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 31 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 24 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 37 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 28 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 37
Which of the following is true about threads? 
Options:
  1. Threads are similar to processes, but differ in the way that they share resources.
  2. Threads consumes less processor time.
  3. Threads are different from processes.
  4. Thread execution is scheduled more frequently.
View Answer/Explanation:
a
Explanation:
Processes are independent state information and separate address spaces. Threads share the memory belonging to its parent process.

Question No: 2 of 37
How to set thread to highest priority? 
Options:
  1. ThreadPriority.AboveNormal.
  2. ThreadPriority.High.
  3. ThreadPriority.Normal.
  4. ThreadPriority.Highest.
View Answer/Explanation:
d
Explanation:
Thread Priority can be changed by using Threadname.Priority = ThreadPriority.Highest. In the sample provided look out for code where the second thread is ran with a high priority. Following are different levels of Priority provided by .NET as ThreadPriority enum :- - ThreadPriority.Highest - ThreadPriority.AboveNormal - ThreadPriority.Normal - ThreadPriority.BelowNormal - ThreadPriority.Lowest

Question No: 3 of 37
What is the output of the following program?
class ThreadNaming 
{
  static void Main() 
  {
    Thread.CurrentThread.Name = "main";
    Thread worker = new Thread (Go);
    worker.Name = "worker";
    worker.Start();
    Go();
  }

  static void Go()
  {
    Console.WriteLine ("Hello from " + Thread.CurrentThread.Name);
  }
} 
Options:
  1. Hello from Main Method
  2. Hello from Main Hello from Worker.
  3. Hello from Worker
  4. Hello from Worker Hello from Main
View Answer/Explanation:
b
Explanation:
Main thread is the parent thread which executes first later child threads So the output is Hello from Main which is because of parent thread (main). Hello from Worker which is because of child thread (worker).

Question No: 4 of 37
Types of scheduling ____________ 
Options:
  1. Preemptive
  2. Non-Premptive
  3. Preemptive and Non-Premptive
  4. None
View Answer/Explanation:
c
Explanation:
Preemptive: Operating System can un-schedule a thread even if it is not completed its task. Non-preemptive: Operating System cannot unschedule the thread which is not completed.A thread should either unschedule itself or should complete its task.

Question No: 5 of 37
In _____________ scheduling, OS can unschedule a thread even if it did not complete its task. 
Options:
  1. Preemptive
  2. Non-preemptive
  3. Primitive
  4. Non-primitive.
View Answer/Explanation:
a
Explanation:
Preemptive: Operating System can un-schedule a thread even if it is not completed its task. Non-preemptive: Operating System cannot unschedule the thread which is not completed.A thread should either unschedule itself or should complete its task.

Question No: 6 of 37
If multiple threads exist with same priority then a __________ is assigned to each thread. 
Options:
  1. slice
  2. time pulse
  3. pulse
  4. time slice
View Answer/Explanation:
d
Explanation:
If multiple threads are with same priority then the execution will be based on time slice allocated for them. Order of execution of thread is based on following criteria. Preemptive Scheduling -> Priority -> Time Slice.

Question No: 7 of 37
A thread is waiting for processor to be allocated to it in __________ state. 
Options:
  1. Running
  2. Suspended
  3. Blocked
  4. Ready
View Answer/Explanation:
d
Explanation:
Thread waits for processor allocation in ready state ,it is the only entry point to running state,when thread is unscheduled it returns from running state to ready state.

Question No: 8 of 37
After the execution of all the instructions in the thread it goes to __________state. 
Options:
  1. Running
  2. Suspended
  3. Blocked
  4. Dead
View Answer/Explanation:
d
Explanation:
.

Question No: 9 of 37
A thread is said to be in ___________ state when the resources are not available to it and it is waiting for them. 
Options:
  1. Sleeping
  2. Suspended
  3. Blocked
  4. Dead
View Answer/Explanation:
c
Explanation:
The thread resumes back once the resource is made available.

Question No: 10 of 37
In .Net every thread has two objects associated with it. Custom object and object of type _____________ . 
Options:
  1. System.Threads
  2. System.Threading
  3. System.Threading.Thread
  4. Threading.Threads
View Answer/Explanation:
c
Explanation:
The two objects associated with threads are: 1)An object of type System.Threading.Thread and it is responsible for managing the lifetime and the states of the thread. 2)A Custom Object which is responsible for providing the instructions and data which the thread has to manage during its lifetime.

  1