Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Early Objects
Quiz 22: Multithreading
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
Multiple Choice
Suppose thread one is downloading a large file while another thread is processing the same file on a single CPU machine.The time required to download and process a portion of the file is the same.The second thread can process the file while it is incomplete.What is the main benefit of using two threads rather than using a single thread to do both parts of the job?
Question 22
Multiple Choice
The sleep method is terminated with a(n) __________ whenever a sleeping thread is interrupted.
Question 23
Multiple Choice
Suppose thread one is downloading a 800KB file while another thread is processing the same file on a multi-CPU machine.Suppose further that one time slice allows the first thread to download about 10KB and that the second thread can process 10KB of the file in one time slice.The second thread can process the file while it is incomplete.What is the minimum number of CPUs that will allow the job to be completed in roughly half the time of a single-CPU machine?
Question 24
Multiple Choice
Which of the following definitely indicates that a thread has been interrupted by another thread? i.The run method has completed II.The method Thread.interrupted returns true III.The run method catches an InterruptedException