Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Seminarie 4 OSPP (1)

Rating
-
Sold
-
Pages
3
Grade
A+
Uploaded on
11-08-2024
Written in
2024/2025

Seminarie 4 OSPP (1)

Institution
Course

Content preview

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

Written for

Course

Document information

Uploaded on
August 11, 2024
Number of pages
3
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
topgradesdr Jackson State University
Follow You need to be logged in order to follow users or courses
Sold
1549
Member since
2 year
Number of followers
9
Documents
16681
Last sold
3 weeks ago
TOPGRADES DOCTOR

Hi there! I'm an experienced academic professional specializing in exam preparation, test banks, and assignments. Whether you're gearing up for a big test, looking for top-notch study guides, or need expertly crafted assignments, I've got you covered. My materials are: Accurate and Comprehensive: Designed to help you excel in your studies. Tailored to Your Needs: Covering various subjects with real exam-style questions and solutions. Time-Saving: Concise, easy-to-understand resources to help you study smarter. Let me help you achieve your academic goals with confidence!

Read more Read less
4.8

302 reviews

5
262
4
24
3
8
2
2
1
6

Trending documents

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions