100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Seminarie 4 OSPP (1) $7.99   Add to cart

Exam (elaborations)

Seminarie 4 OSPP (1)

 9 views  0 purchase
  • Course
  • Institution

Seminarie 4 OSPP (1)

Preview 1 out of 3  pages

  • August 11, 2024
  • 3
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
avatar-seller
Seminarie 4 OSPP
Creating new threads is less time consuming and less resource intensive compared to creating
new processes. Threads share a PMI (process memory image) within a process, while
processes run on different memory segments. Threads run within a process.
Threads share data, processes don't (easily) share data.
Threads share everything in the PMI but not the stack and context. - ANS-How do threads differ
from processes?

Creating a new thread within a program does not create a new PMI.
Because threads share the same memory, context switching is more efficient than between
processes. - ANS-Why is it more expensive to create a new process compared to creating a
new thread?

Many user-level threads mapped to a single kernel thread* . Thread management is done by the
thread library in user space.
*Threads mapped to a single kernel thread meaning they are scheduled as a single process by
CPU. - ANS-In short, explain the many-to-one user level thread model.

Thread management is done by the thread library in user space but the entire process will block
if a thread makes a blocking system call. Only one thread can access the kernel at a time,
hence threads cannot run in parallel on multiprocessors. ONE BLOCKS ALL - ANS-Explain
what happens if one of the threads makes a blocking system call in the many-to-one user level
thread model.

Atomic operations in concurrent programming are program operations that run completely
independently of any other processes
An atomic operation is an operation that will always be executed without any other process
being able to read or change state that is read or changed during the operation
‣ Additionally, atomic operations commonly have a succeed-or-fail definition—they either
successfully change the state of the system, or have no apparent effect. - ANS-What is meant
by an atomic operation?

counter = counter + 1 - ANS-Give examples of non-atomic operations

A race condition or race hazard is the behaviour of an electronic, software or other system
where the output is dependent on the sequence or timing of other uncontrollable events. It
becomes a bug when events do not happen in the intended order. - ANS-Define Race condition

A data race occurs when two instructions from different threads access the same memory
location and:
‣ at least one of these accesses is a write

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller topgradesdr. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.99
  • (0)
  Add to cart