Operating system - Interview Questions and Answers for 'Cognizant (cts)' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 2780 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Operating system - Interview Questions and Answers for 'Cognizant (cts)' - 2 question(s) found - Order By Newest

Frequently asked to fresh graduates.
 Q1. Explain Thread States ?Operating System
Admin
info@buggybread.com
Ans. Runnable - waiting for its turn to be picked for execution by the thread schedular based on thread priorities.

Running - The processor is actively executing the thread code. It runs until it becomes blocked, or voluntarily gives up its turn.

Waiting: A thread is in a blocked state while it waits for some external processing such as file I/O to finish.

Sleeping - Java threads are forcibly put to sleep (suspended) with Thread.sleep. they can resume using Thread.resume method.

Blocked on I/O - Will move to runnable after I/O condition like reading bytes of data etc changes.

Blocked on synchronization - Will move to Runnable when a lock is acquired.

Dead - The thread is finished working.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   threads   multi threading   scheduling   thread states   basic interview question     Cognizant (CTS)      basic        frequent

Try 2 Question(s) Test


Related Questions

  Which keyword is used to provide explicit access of a code block to single thread ?

a. Transient
b. Final
c. Explicit
d. Synchronized
  Explain multithreading in Java ?
  Can constructors be synchronized in Java ?
  What is the difference between time slicing and preemptive scheduling ?
  Why do we need Thread class even in case we execute thread using runnable interface ?
 If you need to consume messages from the queue faster, which approach will you recommend - batching or concurrency ?
  What is an object's lock and which object's have locks?
  Different ways of implementing Threads in Java ?
  Difference between Process and Thread ?


Usually asked only to fresh graduates.
 Q2. What is the initial state of a thread when it is created and started?
Anonymous
Ans. Ready state.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     operating system   threads   multi threading   java   thread states     Cognizant (CTS)      basic        frequent


Related Questions

  Explain Thread States ?
  What state does a thread enter when it terminates its processing?
  Difference between yield() and sleeping()?
  What is the initial state of a thread when it is created and started ?
  What state does a thread enter when it terminates its processing?
 Difference between Yielding and Sleeping ?




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: