You are on page 1of 6

NATIONAL INSTITUTE OF PUBLIC ADMISTRATION

NAME:

STUDENT NUMBER:

PROGRAMME: BACHELOR OF COMPUTER SCIENCE

COURSE: OPERATING SYSTEMS (2050)

YEAR: SECOND YEAR, FIRST SEMESTER

MODE OF STUDY: FULL TIME

LECTURER: MR NTAZANA KANCHULE

ASSIGNMENT 1
1. Explain the file concept.

in computing, a file is a collection of related information that is stored on a computer's


secondary storage, such as a hard disk drive or flash drive. A file can be a document,
an image, a video, an audio recording, or any other type of data. The concept of a file
is fundamental to the organization and manipulation of data in computer systems.
In practice, files are used in a wide range of applications, from word processing and
spreadsheet software to web browsers and email clients. For example, when you
create a new document in Microsoft Word or Google Docs, the software creates a new
file on your computer's hard drive that contains the text and formatting information
for that document. When you save the document, the software writes the contents of
the file back to the hard drive.
Files are usually organized into directories or folders, which are themselves files that
contain lists of other files. This hierarchical structure allows users to organize and
access their files in a logical and intuitive way.
In addition to storing data, files can also be used to share information between
different applications and users. For example, you can attach a file to an email
message, upload a file to a web server, or copy a file to a USB drive to share it with
someone else.
Overall, the concept of a file is a fundamental building block of modern computing,
and understanding how files work is essential for anyone who works with computers.

2.Define Raid.

Raid, redundant array of independent disk or redundant array of inexpensive disk is a


storage technology that combines multiple hardware disks units into a virtualized
logical unit to improve the performance, reliability and ease to rage of data. There are
many types of raid, these include; Raid 0, Raid1, Raid 5, Raid6, Raid10 which are
primary raid levels.
Raid0, sometimes referred to as stripped volume, heads at least two drives. The disks
are combined into a single big volume, in which data is disturbed uniformly
throughout the array’s disk.
Raid1, is an initial ideal option, when the main objective is data protection and
redundancy.
Raid5, this is a popular set up, that effectively balances security and performance.
Raid6, is comparable to raid5 only with the addition of double parity, consequently it
is known as double parity raid.
Raid 10, utilizes logical mirroring to duplicate data across two or more disks for
redundancy. if one disk fails the data is replicated and saved on another drive. some
examples of Raid applications or uses include; database servers, workstations and
hardware-based solutions such as servers and storage systems. (https//www.western
digital.com)

3. Define disk management.

disk management is a system utility in windows that enables you to perform advanced
storage tasks, it is the process of managing the physical storage devices (usually hard
disk drives or solid-state drives) connected to a computer system, this involves
organizing, partitioning, formatting, and optimizing the storage devices to make the
most efficient use of available space.
Here are some of the things disk management, is good for; to set up new drive, to
extend a volume into space that is not already part of a volume on the same drive. To
shrink a partition, usually so that you can extend a neighboring partition. And to
change a drive letter or assign a new drive letter. Disk management is an important
functionality provided by the operating system which ca be used to create, delete and
format disk partitions, examples include mini tool partition wizards, paragraph
partition managers. (www.learn.microsoft.com)

4. Explain deadlock detection and recovery.

Deadlock detection and recovery is the process of detecting and resolving deadlocks
in an operating system. A deadlock occurs when two or more process are blocked
waiting for each other to release the process are blocked waiting for each to release
the resource they need. This can lead to a system wide stall, where no process can
make progress. The deadlock detection algorithm checks for the existence of a
deadlock in a system by using various algorithms like wait-for-graph, resource
allocation graph, and bankers' algorithm. Once a deadlock is detected, the system can
use one of these techniques to resolve the deadlock,
 Resource preemption: The system can preempt some resources from one or
more processes to release them and allow other processes to continue
execution.
 process termination: The system can choose to terminate one or more of the
processes involved in the deadlock to release the resources they hold
For example, a Traffic Control system: Deadlocks can occur in traffic control
systems, when multiple vehicles are competing for the same intersection or
road. In such cases, deadlock detection can be used to avoid accidents or
traffic jams. For example, if two cars are approaching an intersection from
opposite directions and neither can move because of the other, a deadlock
occurs. Deadlock detection can help to detect such situations and initiate
recovery, such as signaling one of the cars to stop or move in a different
direction. (www.geeks for geeks.org)

5. Explain deadlock prevention and avoidance.

Deadlock prevention is a process that acquires all the needed resources,


simultaneously before it begins its execution therefore breaking the hold and wait
condition. The operating system takes steps to prevent deadlocks from occurring by
ensuring that the system is always in a safe state, where deadlocks cannot occur. This
is achieved using resource allocation algorithms such the banker’s algorithm.
Bankers algorithm Banker's Algorithm: Banker's algorithm is a
deadlock avoidance technique used in operating systems. In this
algorithm, the system keeps track of the resources allocated to each
process and the maximum resources each process can request. By
analyzing this information, the system can determine if a process's
resource request will result in a deadlock. If a deadlock is detected, the
system can recover by releasing the resources held by one of the
processes involved in the deadlock.

Deadlock avoidance is a technique used in operating systems to prevent deadlocks


from occurring. A deadlock is a situation in which two or more processes are waiting for each
other to release resources that they have acquired, and as a result, neither process can
proceed. Deadlocks can cause a system to become unresponsive, and they can be difficult to
detect and resolve. Deadlock avoidance works by analyzing the system's resource allocation
requests and determining whether a request would result in a deadlock. If a request would
cause a deadlock, the system does not grant the request and instead looks for an alternative
resource allocation that would not lead to a deadlock. There are several algorithms for
deadlock avoidance, including the Banker's Algorithm, which we discussed in a previous
question. Another popular algorithm is the Resource Allocation Graph (RAG) algorithm,
which is used to represent the allocation of resources in a system and identify potential
deadlocks. The RAG algorithm can be used to detect a deadlock before it occurs, and it can
also be used to determine the sequence in which resources should be released to avoid a
deadlock.

One of the advantages of deadlock avoidance is that it can prevent deadlocks from occurring
without the need for expensive system rollbacks or process termination. However, there are
some limitations to this technique, including the need for additional processing overhead to
analyze resource allocation requests and the potential for system performance degradation.

(www
References:
Tanenbaum, A. S., & Bos, H. (2014). Modern Operating Systems (4th ed.). Prentice
Hall.
Silberschatz, A., Galvin, P. B., & Gagne, G. (2012). Operating System Concepts (9th
ed.). Wiley.
Stevens, R. W. (2013). UNIX Network Programming (Volume 1, 3rd ed.). Addison-
Wesley.

You might also like