0% found this document useful (0 votes)
29 views12 pages

Operating System: Final Exam

Uploaded by

imtihanrahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views12 pages

Operating System: Final Exam

Uploaded by

imtihanrahman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

OPERATING SYSTEM

FINAL EXAM

Name: Imtihan Rahman


Matric No. 17206029/1
Tutorial Group: 4
Question 1. Research the problem of starvation in a networked environment. Describe how its
consequences differ from those of deadlock and detail a real-life example of the problem. Cite
your sources.

Answer:

Starvation:

Starvation is the problem when high priority processes continue to execute while low priority
processes are stalled for an indeterminate amount of time. A continual stream of higher-priority
processes can prevent a low-priority processes from receiving the CPU time in a densely loaded
computer system. In starvation, resources are continuously used up by high priority processes
and a job with low priority keeps waiting for resources that never become available. This
happens mostly in greedy threads which would never give a chance to other threads to proceed.

Figure 1.1 Starvation.

As you can see in figure 1.1 the required resource has already been allocated to Process A
which has a higher priority than Process B. Therefore, Process B never has the chance to get
executed since Process A does not release the resource.

Livelock:

A livelock is a condition that takes place when two or more programs change their condition
continuously, with neither making the progress. Then the processes enter a state of livelock
where they clash with each other’s state at a given time. A livelock is one, where a request for
exclusive lock is denied continuously because a series of overlapping shared locks keeps on
interfering each other and to adapt from each other they keep on changing the status which
further prevents them to complete the task.

Because each process is pursuing the same technique to avoid the lock, livelock is a special
form of resource starvation in which two processes follow an algorithm for resolving a situation
of deadlock, resulting in a cycle of different locked states. Starvation can occur for one process
without another process being cyclically blocked; in this case no livelock exists; just a unlucky
process that gets no resource allocated the process scheduler.

Let us say, an object which has a synchronized method that frequently takes a long time to
return any allocated resource. If one thread continuously calls that function, other threads that
also need frequent access to that resource are blocked.

Deadlock:

A deadlock ensues when each process holds on to a resource and waits for another resource
held by another process which they need to finish the execution. This is also termed as deadly
embrace. The necessary conditions for deadlock to occur are Mutual Exclusion, Hold and
Wait, No Preemption and Circular Wait. In this way both processes hold each other’s
resources and waits for another to get executed.

For example, let us consider two processes A and B, and two resources C and D. Suppose
that each process needs access to both resources to execute the part of its function. Thus, it
is possible to have the following situation. The OS assigns resource C to A, and D to B. After a
while, when each process is done using the assigned resource and waits for one another to
release that resource. But neither will release the resource that they already own until it has
acquired the other resource and performed the function with both. The situation is illustrated
below in figure 1.2.
Figure 1.2 Deadlock.

Let us investigate two real life-based example of both starvation and deadlock.

Let us say a person works in a big company. Each day during the lunch period there is a rush
hour when everyone wants to get in the canteen line which is at the bottom floor. The person’s
office is at the topmost floor and the only way to get down to the first floor is to use a lift.
Therefore, the person calls a lift and wait. The person keeps waiting but the lift never arrives.
The waiting time could be infinite because everyone in the bottom floor is filling up the lift, so it
never reaches top and even if it does reach there is no room for that person. Because of this
the person decides to starve due to lack of resource to get him down to the first floor. If we
compare the person as a process and the lift as the required resource to get the process
executed, this is a real life-based example of starvation.

Let us say, two persons are taking a shortcut through a narrow lane. The lane is only wide
enough to fit one person at a time. Both the persons started walking through the lane at the
same time and at one point they meet in the middle. Now for at least one of them to pass, any
one of them must decide to go back the way they came. But both are firm in their position and
refuses to move and let the other person pass through. If we compare the persons as
processes and the narrow lane as the required resource to finish the process, we get an
example of a deadlock situation.

Another real-life example of starvation is The Dining Philosophers problem introduced by


Edsger W. Dijkstra.
The five philosophers sit at a round table and at the center is a bowl of noodles that is
available to everyone. There are forks between the philosophers. The philosophers must use
two forks available to them on both sides to eat the noodles, but there are only five chopsticks
instead of ten. A philosopher can only eat or think at the same time but cannot do both. The
following figure describes the situation.

Figure 1.3 The Dining Philosophers.

P1 starts eating using C1 and C5. P3 does the same using C2 and C3. P2 decides to join but
is unable due to unavailability of chopsticks. Therefore, P2 must wait. P3 finishes eating and
puts down his chopstick to start thinking. Now P2 can start eating if P1 also decides to stop
eating so that C1 is also available for using. If P1 does stop the situation could slip into an
unsafe stage. Now, P4 and P5 are still thinking and P1 has not finished eating. P3 decides to
eat again as the chopsticks (C2 and C3) are free to use. Sonn, P1 finishes and releases C1
and C5 but P2 is not able to eat due to unavailable C2. The scenario can continue forever and
P2 can end up starving since the required resources are never released.

The problem of starvation generally occurs in priority scheduled algorithm. In this algorithm,
the process with the higher priority is always allocated the resource to execute their function.
This prevents the lower priority process from getting the required resource. Starvation only
occurs when the low priority processes are not able to execute, but the higher priority
processes keep running. Since, the low priority programs are not interacting with anything, it is
not possible for starvation to start a deadlock. However, starvation is a failsafe technique to get
out of a deadlock situation, making it much more important how it affects the system.

Deadlock and starvation both are conditions where the processes requesting for a resource has
been delayed for a long time. But there are differences between the situation which are
mentioned below.

No. Deadlock Starvation


1. Deadlock is a situation where no process Starvation is where low priority processes
proceeds, and both get blocked. get blocked, and high priority process
continues.
2. The occurrence of Mutual Exclusion, Hold Enforcement of priorities, uncontrolled
and Wait, No-preemption and Circular resource management can cause
Wait can arise a condition for deadlock. starvation.
3. Another name of deadlock is Circular Starvation can also be known as Livelock.
Wait.
4. In a deadlock situation, requested In starvation, requested resources are
resources are blocked by the other continuously used by high priority
processes. processes.
5. It can be prevented by avoiding the It can be prevented by Aging process.
necessary conditions for deadlock.

Both deadlock and starvation delay the process execution by blocking it and therefore crashing
the whole system. On one hand where deadlock can cause process to starve, starvation can be
a solution to get the processes out of the deadlock.
Question 2. Over the past decades, advances in technology for data storage has rapidly
evolved from paper tape to magnetic storage to optical discs and beyond. Identify and research
a recent advancement in temporary or permanent data storage. Identify the need that this
device is designed to address and explain how integration of this innovation might affect the
operating system’s hardware or software. Cite your academic sources.

Answer:

Computer storage has included a wide range of technologies over the years, including punch
cards, floppy disks, tape, hard drives, and flash memory. The objective is same every time,
which is keep data accessible and available for the future. These advances in speed and
capacity are the pioneer for today’s sophisticated computing framework. Investors and
researchers keep on pushing the advancement when it comes to capacity, performance, and
the physical size of our storage media.

In terms of temporary or permanent data storage Helium Drives is one of the great inventions
which we are going to discuss about today.

Helium Drives:

A helium drive is a hard disk that exploits the characteristic lightness of that gas to increase the
medium’s potential speed and storage density. This hard drive technology replaces the air
inside the HDD with helium and is sealed during manufacturing. HGST, a Western Digital
affiliate, released the first commercially accessible helium-filled hard drive in November 2013.
Hard drives that are filled with helium have recently pushed the capacity limits of hard drives
that are normally filled with air. The invention of these drives came after countless efforts by the
researchers. The 6 TB drive was not only unique in that it was helium-filled, but it was also the
greatest capacity hard drive on the market at the time. After four years, double the capacity 12
TB helium drives and later 14 TB drives were made available in the same year.

Challenge of Helium Drives:

The read/write heads inside of a hard drive fly over the disk surface on what is known as an “air-
bearing”. The heads will collide with the disk if there is not enough air. The issue with air,
though, is that it causes turbulence. As a result, engineers sought a less dense element. The
least dense element is hydrogen. But it is not going to work. The Hindenburg tragedy in 1937
serves as a good example of why using flammable hydrogen is a bad idea. Helium is the
second lightest and most abundant element. Helium does not react with anything because it is
inert. Because helium has a density of 1/7 that of air, it minimizes turbulence inside the drive,
providing a variety of benefits.

As it is known, helium-filled balloon sinks to the ground after a few days. So, one of the main
challenges was to keep the helium tightly sealed inside the container, as helium tends to escape
out of any container even if those are tightly sealed. Helium atoms are so small that they can
seep through almost any material. It took years for the HDD manufactures to create a
sustainable container that can contain the helium while functioning as a hard drive.

Hardware Advantages of Helium Drives:

• More Capacity: The helium filled data center drives squeezes the tracks together inside
which means more data tracks per disk. The capacity is drastically increased by 40%
due to this, which means more data storage capability per HDD. By increasing the
number of platters from 5 to 7 disks per HDD, the capacity increased from 6 to 10 TB.
Using even thinner media, and incredible mechanical ingenuity, 8 disks was packed in
12 TB version.
• Less Energy: Inside of an air-filled hard drive there are rapidly spinning disk platters
that rotate at a givens speed of 7200 rpm for example. The air inside creates an
appreciable amount of drag which requires more energy to spin the platters. By
replacing the air inside with Helium reduces the amount of drag. This resulted a 20%
reduction of energy consumption against air-filled drives.
• Cooler Drives: Due to lesser drag and power consumption, the helium filled drives are
almost 4-5 degrees cooler compared to air filled drives according to tests. As the
turbulence is lower, there is less friction inside the hard drives.
• Less Noise: Once again since the drag gets lower, the noise the platter creates while
spinning gets lower as well, which makes the sound less annoying to the users.
• Sealed Drive: The sealed drives keep helium in and containments like humidity and
dust out which increases the durability of the HDD. This is expected to reduce drive
failure rates and increase the average life expectancy of the helium drive. Sealed drives
also make the HDD submersible, which simplifies the usage of liquid cooling in the
system.
• Lower Turbulence: Compared to air, helium’s lower density allows the drive to spin with
much less turbulence. Lower turbulence means less power consumption. The lower level
of turbulence allows seven platters in a one-inch hard drives, instead of five.

Software Advantages of Helium Drives:

• Multi-level Caching: The helium drives technology brings, and additional benefit of an
exceptional media cache technology known as multi-tier caching. Multilevel cache is one
of the techniques to improve cache performance by reducing the miss penalty. The
term miss penalty refers to the extra time required to bring the data into cache from the
main memory whenever there is a miss in cache. This brings performance
enhancement which is a best option for the servers and data centers.
• Data Recovery: In terms of data recovery there are more benefits of helium drives. For
the current time being, the types of organizations that helium-filled hard drives are
targeted at are large corporations, who wants to safeguard their data up to a high scale.
The reduced turbulence means the read/write operations are smoother, which reduced
the chance of having a head crash. As the chassis is already tightly contained, this
reduces the need for data recovery even further. According to reports of few failures,
data recovery has been much easier to handle.
• Reduced Failure Rates: Through comparing helium filled drives against air filled drives
by putting them under use for a similar number of hours based on Annualized Failure
Rates (AFR), the helium drive had a failure rate of 1.06% while the failure rate of the air-
filled drive was 1.61% as it is shown in figure 2.1.
Figure 2.1 Helium vs Air-filled Drives.
• Enhanced Performance: According to IHS, due to non-reactive nature and lower
density, these will improve the speed of the HDD tracking arm, which will cause faster
reading/writing speed in file management system. The new 10 TB helium drive ensures
high standards and offers 2.5 million mean time between failures. The higher capacity
drives expect to take fewer servers to fill data. It has an average latency of 4.16 platers,
and 249 MB/second read speed or 225 MB/second of writing speed and seek time of
8ms.
• Encryption and Security: The new helium filled drives offer encryption and data
security to prevent unauthorized usage of data.
• Read-Write Cycle: The new He-10 uses PMR (Perpendicular Magnetic Recording)
which is much faster than SMR (Shingled Magnetic Technique). The aerial density of
PMR hard disks is in 100 Gigabits per square inch.

Today, several hard drive manufacturers, including Western Digital, Seagate and Toshiba offer
helium hard disk drives. Even though this technology is still expensive, these high performances
drive will slowly but surely only get cheaper and more accessible while being even more
expansive in time. This technology will vastly change the file organization and management
system that we know today and will possibly open new horizons.

References

1. GeeksforGeeks. (2019, September 30). Difference between Deadlock and Starvation in OS.
https://www.geeksforgeeks.org/difference-between-deadlock-and-starvation-in-os/

2. B. (2019, December 26). Difference Between Deadlock and Starvation in OS (with


Comparison Chart). Tech Differences. https://techdifferences.com/difference-between-
deadlock-and-starvation-in-os.html

3. Dining Philosophers Problem (DPP). (n.d.). https://www.tutorialspoint.com/dining-


philosophers-problem-dpp.

4. Greengard, S. (2019, April 1). The Future of Data Storage. April 2019 | Communications of
the ACM. https://cacm.acm.org/magazines/2019/4/235573-the-future-of-data-
storage/fulltext

5. Klein, A. (2021, June 3). The Helium Factor and Hard Drive Failure Rates. Backblaze Blog |
Cloud Storage & Cloud Backup. https://www.backblaze.com/blog/helium-filled-hard-
drive-failure-rates/

6. I. (2019b, August 13). What Is A Helium Hard Drive? How Does it Work? Plus Best Drives
List. Faces of IT. https://www.faceofit.com/what-is-a-helium-hard-drive-how-does-it-work/

7. A New Use for Helium. geology. (n.d.). https://geology.com/stories/13/new-uses-of-helium/.

8. How good are the Helium Filled Hard disk? (2019, September 11). Stellar Data Recovery
Blog - Tips and Solutions. https://www.stellarinfo.co.in/blog/new-hard-disks-storage-
technology/

You might also like