100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSC 246 Exam 2 Terms in this set (76) thread Sequential flow of action executed by a process; executes only one task at a time, while a multithreaded process can execute a task per thread. Multithread Multiple tasks can be implemented by separate $5.99   Add to cart

Exam (elaborations)

CSC 246 Exam 2 Terms in this set (76) thread Sequential flow of action executed by a process; executes only one task at a time, while a multithreaded process can execute a task per thread. Multithread Multiple tasks can be implemented by separate

 4 views  0 purchase
  • Course
  • CGFO - Certified Government Finance Officer
  • Institution
  • CGFO - Certified Government Finance Officer

CSC 246 Exam 2 Terms in this set (76) thread Sequential flow of action executed by a process; executes only one task at a time, while a multithreaded process can execute a task per thread. Multithread Multiple tasks can be implemented by separate threads; more efficient than creati...

[Show more]

Preview 2 out of 5  pages

  • August 3, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CGFO - Certified Government Finance Officer
  • CGFO - Certified Government Finance Officer
avatar-seller
Denyss
8/3/24, 2:02 PM




CSC 246 Exam 2
Jeremiah




Terms in this set (76)

Sequential flow of action executed by a process; executes only one task at a time, while
thread
a multithreaded process can execute a task per thread.

Multiple tasks can be implemented by separate threads; more efficient than creating
Multithread
multiple processes

Responsiveness (continues execution if part of process is blocked), Resource Sharing
Benefits (Threads share resources of process), Economy (cheaper than process creation),
Scalability (process can take advantage of multiprocessor architectures)

Parallelism System can perform more than one task simultaneously

Concurrency executing multiple tasks simultaneously in an overlapping manner

Threads share code, data, and files in multithreaded process, but not stacks, registers,
What threads share and don't
and state.

speedup is less than or equal to 1 / S + (1-S)/N. S is serial portion, N is processing cores.
Amdahl's Law
Identifies performance gains from adding additional cores to an application.

User threads Threads implemented by user software

Kernel threads Supported by the Kernel

Many-to-One Many user-level threads mapped to single kernel thread; one thread block blocks all

Each user-level thread maps to kernel thread (more concurrent than many-to-one)
One-to-One
(creating a user-level thread creates a kernel thread)

Allows many user level threads to be mapped to many kernel threads

Many-to-Many
Allows the operating system to create a sufficient number
of kernel threads

Two-level Similar to many-to-many; except it allows a user thread to be bound to kernel thread

Create a number of threads in a pool where they await work (slightly faster than
Thread pools
creating a new thread to service request)

Threading issues Signal handling, Fork() and exec() calls, thread cancellation of target thread




Signals Notify a process that a particular event has occurred

1/5

, 8/3/24, 2:02 PM
User-defined or default; Used to process signals; generated by a particular event or
Signal handler delivered to a process; default handler run by kernel when handling signal (can be
overridden by user-defined signal handler)

Target thread Thread that is to be canceled

Asynchronous cancellation Terminates target thread immediately

Deferred cancellation allows the target thread to periodically check if it should be cancelled

Cancellation point Cancellation occurs when thread reaches this point, then cleanup handler is invoked

Thread-local storage Allows each thread to have its own copy of data

Context of thread register set, stacks, and private storage area

A thread contains Thread id, register set, separate user and kernel stacks, private data storage area

A process that can be affected or affect other processes executing in the system.
Cooperating process
Concurrent access to shared data may result in data inconsistency.

Producer produces item in buffer; consumer removes/decrements item from buffer.
Consumer-Producer problem Concurrent execution of statements can lead to inconsistent data (count++ and count--
when count is equal to 5 results in 4 and 6)

Race condition Situation where two threads are concurrently trying to change a variable's value

Process Synchronization Coordination of access to data by two or more threads or processes.

Consider a system consisting of n processes (p0, p1, ..., pn-1). Each process has a
segment of code called a critical section (A section of code responsible for changing
Critical Section Problem data that must only be executed by one thread or process at a time to avoid a race
condition). When one process is executing in its critical section, no other process is
allowed to execute in its critical section at the same time.

Entry section Section of code requesting permission to enter the critical section

Exit section The section of code within a process that cleanly exits the critical section

Remainder section Whatever code remains to be processed after critical and exit sections

Must satisfy:
mutual exclusion (if one process is executing in its critical section, no other process can
execute in their critical sections)


progress (If no process is executing in its critical section and some processes wish to
Solution to Critical Section Problem enter their critical sections, then those processes that are not executing in their
remainder sections can participate in deciding which will enter its critical section next


bounded waiting (there exists a bound on the number of times that other processes are
allowed to enter their critical sections after a process has made a request and before
that request is granted)

Kernel is preemptive Allows preemption of process when running in kernel mode

Kernel is non-preemptive Runs until exits kernel mode, blocks, or yields CPU




CSC 246 Exam 2
https://quizlet.com/925837246/csc-246-exam-2-flash-cards/ 2/5

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 Denyss. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62555 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
$5.99
  • (0)
  Add to cart