t is allowable for a mutex lock to be unlocked by a thread other than its current owner.  True  False What is the shortcoming of Peterson’s solution?

It is allowable for a mutex lock to be unlocked by a thread other than its current owner.

True

False

What is the shortcoming of Peterson’s solution?

It does not satisfy the property of progress
It does not satisfy the property of mutual exclusion
It does not satisfy the property of bounded waiting
It can only be utilized with two threads

Select all properties that may be modified using a properly initialized pthread_attr_t variable.

Set/get thread stack size
Get/set thread scheduling parameters
Set/get detachment state
Get/set thread contention scope

Because threads do not share a heap, any dynamic memory allocated and passed via argument to a thread function must be freed by both the newly-created thread as well as its creator.

True

False

pthread_cancel() returns upon the successful termination of the target thread.

True

False

Given a four-level page table, how many memory accesses are required to fulfill a single memory access in the worst case (e.g. in the event of a TLB miss)? Include the original program’s memory access in your total as well (i.e. your answer should be greater than 1).

Which of the following statements are true about the pthread_join() function?

Cannot be used on an already-detached thread
Terminates the target thread upon reaching a cancellation point
Blocks and waits for the specified thread to complete
Retrieves the return value of the target thread

Suppose we have a 48-bit virtual address space with a 64KB page size. Also suppose that page table entries in such a system require 8 bytes each. Fill in the blanks to design a three-level multi-level page table for this system:  –  –  – 16.

Which of the following are benefits of virtual memory?

Improved I/O efficiency
Decreased application load time
The ability to allocate more memory than is currently or physically available
Increased level of multiprogramming
Smaller virtual address space

Suppose we have a 32-bit virtual address space featuring a 10-10-12 split with a 4KB page size. Now suppose we wish to run a process that requires a maximum of 130MB of memory. What will be the minimum number of frames that would be required to support this amount of memory just accounting for the page tables themselves?

When a thread calls exit(), only the calling thread is terminated.

True

False

Suppose we have a 32-bit virtual address space and a 4KB page size. What is the number of pages required to support an 8MB working set?

In a system utilizing a 32-bit virtual address space, with a 4KB page size, how many virtual pages is it possible to address?
(Write answer as a single integer using only the characters in [0-9]

A first level page table can be stored discontiguously in memory (i.e. it can span multiple non-continuously-addressed pages).

True

False

Match each description of a synchronization primitive to its name.

  Used for mutual exclusion; caller blocks if lock already owned
  Used to order the execution of different threads (i.e. when parallel computations must “meet up”)
  A mutex lock that does not block if the lock is owned by another thread
  A mutex lock that performs busy waiting rather than sleeping
  Used to count the number of available shared resources; goes to sleep if <= 0
A. Barrier
B. Try lock
C. Spin lock
D. Semaphore
E. Mutex lock

Match each description of a synchronization primitive to its name.

  Used for mutual exclusion; caller blocks if lock already owned
  Used to order the execution of different threads (i.e. when parallel computations must “meet up”)
  A mutex lock that does not block if the lock is owned by another thread
  A mutex lock that performs busy waiting rather than sleeping
  Used to count the number of available shared resources; goes to sleep if <= 0
A. Barrier
B. Try lock
C. Spin lock
D. Semaphore
E. Mutex lock

The TLB is used to act as a cache for which of the following?

Page table contents
CPU data cache contents
Secondary storage (i.e. the backing store)
CPU instruction cache contents

Given a 32-bit virtual address space featuring a 10-10-12 split and a 4-byte PTE size, suppose a process requires 9MB of memory. Given these parameters, what are the minimum and maximum sizes of the page tables needed to support this, depending on the distribution of the 9MB of memory? Write your answer as an integer, representing the number of kilobytes.

Best case / minimal size:

Worst case / maximal size:

It is allowable for a thread that did not previously wait on a semaphore to signal the semaphore.

True

False

On which line is there a problem with the following concurrent code segment?

1. pthread_mutex_lock(&lock);
2. while(niters <= 0) {
3.    pthread_cond_wait(&noiters, &lock);
4.    pthread_mutex_lock(&lock);
5. }
6. niters–;
7. pthread_mutex_unlock(&lock);

A first level page table must be designed to fit within a single page/frame.

True

False

There are some circumstances in which the virtual page size will not equal the physical frame size of a system.

True

False

Complete the following code segment such that each new thread is passed a unique thread number, represented by i:

int i;
for(i = 1; i <= NUM_THREADS; i++) {
if(pthread_create(&threads[i-1], NULL, cthreadf, ______)) {
fprintf(stderr, “pthread_create failed\n”);
}
}

counting semaphore that is initialized with a value of 1 is considered a “mutex.”

True

False

In a system using virtual memory, in which the 32-bit virtual address space is divided into a 10-10-12 split, what is the maximum number of second-level page tables that could possibly exist?

Match each description of a concurrent programming solution requirement to its name.

  Only one thread may execute within its critical section at any given time.
  If a thread requests access to its critical section, it is allowed to enter, provided that all other threads are in their remainder sections. For those threads that are not in their remainder section, only they may determine which thread enters its critical section, and this decision cannot be postponed indefinitely.
  Upon a thread’s request to access to its critical section, other threads cannot continue to enter their critical section an indefinite number of times.
A. Bounded Waiting
B. Temporal allowance
C. Mutual exclusion
D. Progress

Which of the following is not shared amount threads running within the same process?

File descriptor table
Address space
Global variables/data
Stack

It is allowable for a mutex lock to be unlocked by a thread other than its current owner.

True

False

What is the shortcoming of Peterson’s solution?

It does not satisfy the property of progress
It does not satisfy the property of mutual exclusion
It does not satisfy the property of bounded waiting
It can only be utilized with two threads

Select all properties that may be modified using a properly initialized pthread_attr_t variable.

Set/get thread stack size
Get/set thread scheduling parameters
Set/get detachment state
Get/set thread contention scope

Because threads do not share a heap, any dynamic memory allocated and passed via argument to a thread function must be freed by both the newly-created thread as well as its creator.

True

False

pthread_cancel() returns upon the successful termination of the target thread.

True

False

Given a four-level page table, how many memory accesses are required to fulfill a single memory access in the worst case (e.g. in the event of a TLB miss)? Include the original program’s memory access in your total as well (i.e. your answer should be greater than 1).

Which of the following statements are true about the pthread_join() function?

Cannot be used on an already-detached thread
Terminates the target thread upon reaching a cancellation point
Blocks and waits for the specified thread to complete
Retrieves the return value of the target thread

Suppose we have a 48-bit virtual address space with a 64KB page size. Also suppose that page table entries in such a system require 8 bytes each. Fill in the blanks to design a three-level multi-level page table for this system:  –  –  – 16.

Which of the following are benefits of virtual memory?

Improved I/O efficiency
Decreased application load time
The ability to allocate more memory than is currently or physically available
Increased level of multiprogramming
Smaller virtual address space

Suppose we have a 32-bit virtual address space featuring a 10-10-12 split with a 4KB page size. Now suppose we wish to run a process that requires a maximum of 130MB of memory. What will be the minimum number of frames that would be required to support this amount of memory just accounting for the page tables themselves?

When a thread calls exit(), only the calling thread is terminated.

True

False

Suppose we have a 32-bit virtual address space and a 4KB page size. What is the number of pages required to support an 8MB working set?

In a system utilizing a 32-bit virtual address space, with a 4KB page size, how many virtual pages is it possible to address?
(Write answer as a single integer using only the characters in [0-9]

A first level page table can be stored discontiguously in memory (i.e. it can span multiple non-continuously-addressed pages).

True

False

Match each description of a synchronization primitive to its name.

  Used for mutual exclusion; caller blocks if lock already owned
  Used to order the execution of different threads (i.e. when parallel computations must “meet up”)
  A mutex lock that does not block if the lock is owned by another thread
  A mutex lock that performs busy waiting rather than sleeping
  Used to count the number of available shared resources; goes to sleep if <= 0
A. Barrier
B. Try lock
C. Spin lock
D. Semaphore
E. Mutex lock

Match each description of a synchronization primitive to its name.

  Used for mutual exclusion; caller blocks if lock already owned
  Used to order the execution of different threads (i.e. when parallel computations must “meet up”)
  A mutex lock that does not block if the lock is owned by another thread
  A mutex lock that performs busy waiting rather than sleeping
  Used to count the number of available shared resources; goes to sleep if <= 0
A. Barrier
B. Try lock
C. Spin lock
D. Semaphore
E. Mutex lock

The TLB is used to act as a cache for which of the following?

Page table contents
CPU data cache contents
Secondary storage (i.e. the backing store)
CPU instruction cache contents

Given a 32-bit virtual address space featuring a 10-10-12 split and a 4-byte PTE size, suppose a process requires 9MB of memory. Given these parameters, what are the minimum and maximum sizes of the page tables needed to support this, depending on the distribution of the 9MB of memory? Write your answer as an integer, representing the number of kilobytes.

Best case / minimal size:

Worst case / maximal size:

It is allowable for a thread that did not previously wait on a semaphore to signal the semaphore.

True

False

On which line is there a problem with the following concurrent code segment?

1. pthread_mutex_lock(&lock);
2. while(niters <= 0) {
3.    pthread_cond_wait(&noiters, &lock);
4.    pthread_mutex_lock(&lock);
5. }
6. niters–;
7. pthread_mutex_unlock(&lock);

A first level page table must be designed to fit within a single page/frame.

True

False

There are some circumstances in which the virtual page size will not equal the physical frame size of a system.

True

False

Complete the following code segment such that each new thread is passed a unique thread number, represented by i:

int i;
for(i = 1; i <= NUM_THREADS; i++) {
if(pthread_create(&threads[i-1], NULL, cthreadf, ______)) {
fprintf(stderr, “pthread_create failed\n”);
}
}

counting semaphore that is initialized with a value of 1 is considered a “mutex.”

True

False

In a system using virtual memory, in which the 32-bit virtual address space is divided into a 10-10-12 split, what is the maximum number of second-level page tables that could possibly exist?

Match each description of a concurrent programming solution requirement to its name.

  Only one thread may execute within its critical section at any given time.
  If a thread requests access to its critical section, it is allowed to enter, provided that all other threads are in their remainder sections. For those threads that are not in their remainder section, only they may determine which thread enters its critical section, and this decision cannot be postponed indefinitely.
  Upon a thread’s request to access to its critical section, other threads cannot continue to enter their critical section an indefinite number of times.
A. Bounded Waiting
B. Temporal allowance
C. Mutual exclusion
D. Progress

Which of the following is not shared amount threads running within the same process?

File descriptor table
Address space
Global variables/data
Stack

 

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:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
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
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 929 473-0077

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code GURUH