Threads, Concurrency, and Deadlocks

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Levi Joy B.

Lem-it BT303 November 26, 2022


MIDTERM REVIEW
A.
1.) Differentiate user-level thread and kernel-level thread using a Venn diagram.

User-level Threads Kernel-level Threads

• all the thread • all thread management is


• fundamental performed by the
management is
elements of operating system's
done by the process kernel.
application. execution. • can simultaneously
• does not require • They are schedule multiple
kernel-mode lightweight threads from the same
processes.’ process.
privileges
• Both are • If one thread in a process
• Scheduling can be responsible is blocked, this can
application specific. for tasks in schedule another thread
• can run on any the OS. from the same process.
operating system. • The kernel routines
themselves can be
multithreaded.

2.) In your perspective, is multithreading applicable to Android operating system?


Why or why not?
- Yes, it is applicable. As technology widens, the ability to multitask is being
maximized. There are phones that are even commercialized as tablets. And tablets
commercialized as an alternative to laptops. Multithreading is applicable to Android
operating systems because this system is constantly being modified where users can
maximize its use by making, creating, and doing many tasks at one time. For example,
the ability to place something that you are watching to a window, where you can still
watch while doing another task in your Android gadget.
3.) Would you consider the concept and functionalities of threads as an essential
part of an operating system? Rationalize your answer.
- Yes, because these threads are responsible for utilizing the CPU or the Central
Processing Unit. Both the user-level thread and the kernel -level threads have their own
objectives and responsibilities in the Operating Systems which makes them an essential
part of the Operating System.
B.
1.) Explain the relationship between concurrency and dreadlocks in operating
systems.
- Concurrency oversees the management of processes and threads in the
Operating System which makes concurrency the core of the OS. And as processes and
threads are being done, there are some processes that are being disturbed or processes
that compete for the systems resources. This is where the dreadlocks come in, because
dreadlocks are in charge of permanent blocking the set of processes that disturbs the
Operating System. These work hand in hand because as the concurrency manages,
dreadlocks are the one responsible for making sure that the process is being executed
well.
2.) In your perspective, what degree of process interaction best supports
synchronization?
- Cooperation by communication, because if the interaction needs to be
synchronized then both the processes needs to be aware of each other. Cooperation
by communication is a process designed to work jointly with each other.
3.) Which strategy is better, deadlock avoidance or deadlock prevention? Rationalize
your answer.
- Deadlock avoidance, because more concurrencies will be allowed, but the
decisions are made dynamically. And due to this, the knowledge of future processes
resource requests must be known. If the process will lead to a deadlock, then the
process will be stopped. It immediately shows or stops a process if it will lead to a
deadlock, but unless there are none, then the concurrency will continue.

You might also like