When using POSIX threads, a thread’s start routine takes just one parameter. How do you pass in a…

When using POSIX threads, a thread’s start routine takes just one parameter. How do you pass in a value for this parameter?

a. You can’t provide a value for this parameter. It’s automatically set to null for the first thread that’s created. For each subsequent thread, it’s a pointer to a handle for the most recently created thread.

b. When you call the start routine from main(), you can provide a value for this parameter.

c. The last parameter to pthread_create() is passed in to the start routine.

d. You can’t pass in a value for this parameter. The operating system uses this parameter to give the thread a pointer to its own thread handle.

2. If you’re using POSIX threads, what happens when a thread returns from its start routine?

a. That thread returns back to main() and resumes executing there.

b. That thread goes back to the top of its start routine and continues executing from there.

c. That thread terminates.

d. Threads can’t return from their start routine. Instead, they have to call pthread_join() to wait until other threads are finished.

3. What are shared by threads? Select two answers that apply.

a. Program Counter

b. Opened files

c. Stack

d. Heap

4. Which of these best describes a difference between user-level and kernel-level threads running inside the same process? Pick the best answer.

a. User-level threads can share stack space, but kernel-level threads each need their own stack.

b. User-level threads each have a different heap and data section, but kernel-level threads can share these.

c. The maximum number of kernel-level threads is limited to the number of CPU cores, but a process can have any number of user-level threads.

d. Kernel-level threads require a system call to create a new thread, but user-level threads can make a new thread with a subroutine call.

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more
error: Content is protected !!