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

Search Java Interview Questions


 2137 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



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

Usually asked only to fresh graduates.
 Q1. What is the difference between time slicing and preemptive scheduling ?Operating System
Anonymous
Ans. In preemptive scheduling, highest priority task continues execution till it enters a not running state or a higher priority task comes into existence. In time slicing, the task continues its execution for a predefined period of time and reenters the pool of ready tasks.

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

   Like      Discuss      Correct / Improve     operating system   scheduling   threads   multi threading        rare


 Q2. What is meant by an "asynchronous event." Give some examples ?Operating System
Anonymous
Ans. An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running. It is not "synchronized" with the program.

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

   Like      Discuss      Correct / Improve     j2ee   internet   web application   asynchronus   asynchronus communication   architecture     Alten India


Frequently asked to fresh graduates.
  Q3. Difference between Process and Thread ?Operating System
Anonymous
Ans. Process is a program in execution whereas thread is a separate path of execution in a program.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   operating system   basic interview question     Walt Disney  Goldman Sachs  Nuance  Bank of America  Cogent Infotech  Sogeti  Siemens  Veritas  Vudu  One97 Communications  Riverbed Technology  TK20  MZ  Utopia  LogicMonitor  Lockheed Martin  Lab49  IGATE  Intel Corp  Verint Systems  Kronos  Amazon.com  Citrix  Persistent Systems      basic        frequent


Frequently asked to fresh graduates.
  Q4. What is a Deadlock ?Operating System
Anonymous
Ans. When two threads are waiting each other and cant precede the program is said to be deadlock.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   operating system   deadlock  concurrency     Lime Wire  Perfect Sense  QuantCast  Aequitas NEO Exchange  Akuna Capital  Juniper Networks  Casale Media  Netflix  NetApp  Apple  AIG  Cpart  SnapStream Media  Cumulus Systems  Wissen Infotech  HedgeServ Corp  KeyIdeas Infotech  Verint Systems  BlackBerry  EverQuote      basic        frequent


Frequently asked to fresh graduates.
 Q5. 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


 Q6. What is race condition ?Operating System
Admin
info@buggybread.com
Ans. A source of possible errors in parallel programming, where one thread can cause an error in another thread by changing some aspect of the state of the program that the second thread is depending on (such as the value of variable).

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

   Like      Discuss      Correct / Improve     java.threads   multithreading   race condition   parallel programming   synchronization   ebay   concurrency     ISB Vietnam  NetSpend  Polycom  Cerner  NVIDIA  US Bank  Amadeus  McKesson  Hulu  Neelkanth Digital


Frequently asked to fresh graduates.
 Q7. What are the difference between Threads and Processes ?Operating System
Anonymous
Ans. 1. when an OS wants to start running program it creates new process means a process is a program that is currently executing and every process has at least one thread running within it.
2). A thread is a path of code execution in the program, which has its own local variables, program counter(pointer to current execution being executed) and lifetime.
3. When the JavaVirtual Machine (JavaVM, or just VM) is started by the operating system, a new process is created. Within that process, many threads can be created.
4. Consider an example : when you open Microsoft word in your OS and you check your task manger then you can see this running program as a process. now when you write something in opened word document, then it performs more than one work at same time like it checks for the correct spelling, it formats the word you enter , so within that process ( word) , due to different path execution(thread) all different works are done at same time.
5. Within a process , every thread has independent path of execution but there may be situation where two threads can interfere with each other then concurrency and deadlock come is picture.
6. like two process can communicate ( ex:u open an word document and file explorer and on word document you drag and drop another another file from file explorer), same way two threads can also communicate with each other and communication with two threads is relatively low.
7. Every thread in java is created and controlled by unique object of java.lang.Thread class.
8. prior to jdk 1.5, there were lack in support of asynchronous programming in java, so in that case it was considered that thread makes the runtime environment asynchronous and allow different task to perform concurrently.

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

   Like      Discuss      Correct / Improve     java   operating system   threads   processes     Ciena  Walt Disney        frequent


Usually asked only to fresh graduates.
 Q8. Why threads block or enters to waiting state on I/O?Operating System
Anonymous
Ans. Threads enters to waiting state or block on I/O because other threads can execute while the I/O operations are performed.

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

   Like      Discuss      Correct / Improve     java   threads   multithreading   scheduling   operating system


Frequently asked to fresh graduates.
 Q9. What is the difference between yield() and sleep()?Operating System
Anonymous
Ans. When a object invokes yield() it returns to ready state. But when an object invokes sleep() method enters to not ready state.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   yield   sleep   scheduling   operating system     RedMane  Levi9  RedMane Technology  Time      basic        frequent



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



Usually asked only to fresh graduates.
 Q10. 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


 Q11. What is suspend() method used for ?
Admin
info@buggybread.com
Ans. suspend() method is used to suspend the execution of a thread for a period of time. We can then restart the thread by using resume() method.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   operating system   synchronization      basic        rare


Usually asked only to fresh graduates.
 Q12. Difference between suspend() and stop() ?
admin
info@buggybread.com
Ans. Suspend method is used to suspend thread which can be restarted by using resume() method. stop() is used to stop the thread, it cannot be restarted again.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   operating system   synchronization   suspend   stop      basic        rare


Usually asked only to fresh graduates and less experienced developers.
  Q13. What is a daemon thread? Give an Example ?
Admin
info@buggybread.com
Ans. These are threads that normally run at a low priority and provide a basic service to a program or programs when activity on a machine is reduced. garbage collector thread is daemon thread.

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

   Like      Discuss      Correct / Improve     java   threads   multi threading   operating system   daemon thread   garbage collection     Finnet  ServiceNow  MarketAxess Holdings  JP Morgan  Utopia  Samsung  CGI Group  Auriel Technologies      intermediate        frequent

Try 2 Question(s) Test


 Q14. Difference between PATH and CLASSPATH ?Operating System
Admin
info@buggybread.com
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ).

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

   Like      Discuss      Correct / Improve     java   path   classpath   byte code   jvm   basic interview question     CapitalOne  MathWorks  eG Innovations      intermediate        rare


 Q15. Should we create system software ( e.g Operating system ) in Java ?Core Java
Admin
info@buggybread.com
Ans. No, Java runs on a virtual machine called JVM and hence doesn't embed well with the underlying hardware. Though we can create a platform independent system software but that would be really slow and that's what we would never need.

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

   Like      Discuss      Correct / Improve     java   system software java   jvm   yes-no   yes no   java operating system   architecture


 Q16. What are the fail safe systems ?Operating System2016-06-09 09:29:43

Ans. Fail Safe systems are tolerant systems that continue processing even if they sense any problem. the objective here is to continue with the processing even if there are some problems instead of completely shutting it down. Example could be to catch an exception and still letting it complete with partial results.

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

   Like      Discuss      Correct / Improve     fail safe systems   system design   exception handling     Verilogue


 Q17. why should one we use 32 bit system instead of 64 bit?Operating System2017-03-27 08:52:35

Ans. Performance of a system doesn't solely rely on size of processor or it's communication size. It should also be compatible with other resources like memory, storage etc. Moreover it makes no sense to have 64 bit systems when there is hardly any software than can run on 64 bit system.

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

   Like      Discuss      Correct / Improve     


 Q18. What is ACL ?Operating System2017-03-01 09:45:12

Ans. Access Control List or ACL is the list of permissions attached to an object in the File System.

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

   Like      Discuss      Correct / Improve     acl  file system  file security  object security  operating system


 Q19. Difference between Mutex and Semaphore? Operating System2017-03-03 14:24:07

 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve     Mutex vs Semaphore     Veritas



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q20. Difference between Virtual Memory and Demand Paging?Operating System2017-03-03 14:24:34

 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve     Virtual Memory vs Demand Paging     Veritas


 Q21. Explain process life cycle.Operating System2017-03-03 14:25:20

 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve          Veritas


 Q22. What is an Operating system or OS ?Operating System2017-03-03 14:26:14

 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve          Veritas


 Q23. What is thrashing?Operating System2017-03-03 14:26:30

 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve          Veritas


 Q24. What is Priority inversion ?Operating System2017-03-08 12:19:40

Ans. Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a lower priority task effectively inverting the relative priorities of the two tasks.

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

   Like      Discuss      Correct / Improve          MathWorks  Qualcomm  Juniper Networks  Sling Media  ST Microelectronics


 Q25. What are the four situations that are required for deadlock to happen ?Operating System2017-05-07 16:38:57

Ans. mutual exclusion i.e the resource is not shareable and hence a process should have exclusive access to it at a particular time

Hold and Wait i.e the process doesn't release all existing resources held by it before requesting for another one.

No preemption i.e noone can forcefully release a resource held by another process and the process should voluntarily release the resource held by it.

Circular Wait - For ex, P1 is waiting on resource to be released by P2, P2 is waiting on resource to be released by P3 and P3 is waiting on the resource to be released by P1

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

   Like      Discuss      Correct / Improve     deadlock  process


 Q26. What is Livelock in relation to deadlock ?Operating System2017-05-07 16:40:25

Ans. Livelock is when two threads or processes get deadlocked because they try to perform the same action to come out of a potential deadlock.

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

   Like      Discuss      Correct / Improve     livelock  deadlock]


 Q27. What is the difference between CountingSemaphore and a CountDownLatch?Operating System2017-05-07 19:31:17

 This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve     CountingSemaphore  CountDownLatch


 Q28. What is a host file ?Operating System2017-05-24 13:08:27

Ans. It's an operating system file that maps IP address to host names. The hosts file assists the OS in addressing networked components and serves the function of translating human friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

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

   Like      Discuss      Correct / Improve     host file  operating system     Wayfair


 Q29. Solve the producer and consumer problemOperating System2017-06-15 08:18:53

 This question was recently asked at 'Dell'.This question is still unanswered. Can you please provide an answer.


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

   Like      Discuss      Correct / Improve     producer consumer problem  multi-process synchronization problem     Dell


 Q30. Semaphores are used to solve problem of ... Operating system
a. Race Condition
b. Process Synchronization
c. Mutual Exclusion
d. All of above

Ans.d. All of above



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: