0% found this document useful (0 votes)
18 views36 pages

Aos Report (Group Ambot)

Uploaded by

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

Aos Report (Group Ambot)

Uploaded by

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

APPLIED IN OPERATING

SYSTEM

LESSON 6 :
RAID
REDUNDANT ARRAYS OF INEXPENSIVE DISKS
Modern hard drives are very reliable. We measure the
reliability in terms of the mean time between failures
or MTBF. However, we can improve on this reliability to
give even longer life times by using multiple drives in
special ways.

RAID This techniques we describe in this section are


called REDUNDANT ARRAYS of INEXPENSIVE
DISKS or RAID.

It is a technology that combines multiple


physical disk drives into a single logical unit
to enhance performance, reliability, or both.
The Original RAID specifications included six
configurations. They are called RAID 0 through RAID
5
RAID The following figures show several RAID configurations.
Each is intended to represent a storage system that
CONFIGURATIONS holds the same amount of user data.

The higher levels of OS will see each


configurations as a single drive with four times
the storage as the individual drives of which it is
made.
THREE MAIN TECHNIQUES
USED IN RAID :
Mirroring ( Copying data to more than
one drive )

Striping ( Breaking files across more


than one drive )

Error Correction ( Redundant data is


stored, allowing detection and possibly
fixing errors )
DIFFERENT RAID CONFIGURATIONS :

RAID 2 - ERROR
RAID 0 - STRIPED DISK RAID 1 - MIRRORING
CORRECTING
ARRAY ( a.k.a DUPLEXING )
CODING

RAID 4 - RAID 5 - BLOCK


RAID 3 - BIT INTERLEAVED
PARITY DEDICATED PARITY INTERLEAVED
DRIVE DISTRIBUTED PARITY
This configuration utilizes data striping, spreading out
blocks of each file across multiple disk drives, but no
redundancy.
RAID 0 -
The developers of the RAID technology used the term
strip rather than the term block, but in practice the
implementations are always based on blocks. It
STRIPED
improves performance because multiple reads and
multiple writes can be carried out in parallel. But it DISK ARRAY
does not increase fault tolerance.

See Figure 5.9. The numbers in the drives show the


WITHOUT
logical block numbers ( seen by the file system ) as
they are written to the drives.
PARITY
RAID 0 -
STRIPED
DISK ARRAY
WITHOUT
PARITY
In RAID 1 there is a duplicate set of disk
drives. When any data is written to one drive it
RAID 1 - is also written the duplicate (mirror) of that
drive.
MIRRORING See Figure 5.10. The shaded set of drives is

( a.k.a the mirror set. Assuming that a primary drive


and its mirror can be read at the same time, this

Duplexing ) configuration provides twice the read


transaction rate of single disks.
RAID 1 -
MIRRORING
( a.k.a
Duplexing )
RAID 2 -
These two techniques turned ERROR
out to be prohibitively expensive
and inferior to other techniques so
we will not describe them here. For CORRECTING
high performance they also
required that the spinning of the CODING and;
drives needed to be synchronized.
They are not in use today. RAID 3 - BIT
INTERLEAVED
PARITY
This configuration provides block-level striping (like
Level 0) with a parity disk. The parity block that is written
to this drive covers the other blocks in the stripe, in this
RAID 4 - case, blocks 1 - 4.

Dedicated See Figure 5.11. If a data fails, the parity data is used
to create a replacement disk. A disadvantage to RAID 4 is
Parity Drive that every time a block is written the parity block must
also be read, recalculated, and rewritten. The parity disk
therefore becomes an A/O bottleneck. It provides almost
the same reliability as RAID 1, but if a drive fails the
performance hit will be much worse.
RAID 4 -
Dedicated
Parity Drive

FIGURE 5.11 RAID 4 - DEDICATED PARITY DRIVE


RAID 5 is very much like RAID 4, except that
rather than keeping the parity block always on the
same drive the parity block is assigned to the drives RAID 5 -
in a round-robin fashion.
BLOCK
See Figure 5.12. This technique removes the
problem of excessive use of the parity drive that we INTERLEAVED
saw with RAID 4. Level 5 is one of the most popular
configurations of RAID. DISTRIBUTED
PARITY
RAID 5 -
BLOCK
INTERLEAVED
DISTRIBUTED
FIGURE 5.12 RAID 5 - BLOCK INTERLEAVED
DISTRIBUTED PARITY PARITY
THE FOLLOWING RAID CONFIGURATIONS WERE NOT PART OF THE ORIGINAL RAID SPECIFICATION.
THESE HAVE BEEN FAIRLY WIDELY ACCEPTED AND CAN BE REGARDED AS STANDARD.
Provides block-level striping with parity data distributed
across all disks as in RAID 5, but instead of a simple parity

RAID 6 - scheme it computes parity using two different algorithms


at the same time. Several methods of calculations,

INDEPENDENT including dual check data computations ( parity and Reed-


Solomom ), orthogonal dual parity check data, and
diagonal parity have been used to implement RAID 6
DATA DISKS configurations.

WITH DOUBLE See Figure 5.13. The two different parity blocks are
shown as P&Q functions of the blocks (or strips) in the
PARITY stripe and are shown in contrasting shades. RAID 6
requires an extra disk drive (ove RAID 5) but it will
tolerate the loss of two drives at the same time.
RAID 6 -
INDEPENDENT
DATA DISKS
WITH DOUBLE
PARITY
In this configuration two RAID 0 stripes
are created, and a RAID 1 mirror is
created over them.

This is shown in Figure 5.14. The


1 - MIRROR
striping provides improved performance
and the mirroring provides the reliability.
OF STRIPES
Generally, it will perform better than
RAID 5. RAID 1
1 - MIRROR
OF STRIPES
Multiple RAID 1 mirrored drive pairs are created, and a RAID
0 is created over these.

See Figure 5.15. This configuration has performance and


reliability characteristics similar to RAID 0.

0 (a.k.a RAID
10) - STRIPE
OF MIRRORS
RAID FAILURES
RAID 0 Configuration:
 In RAID 0, data is striped across multiple drives without redundancy.
 If one drive fails, all data is lost because each stripe depends on data from all drives.

RAID 1 Configuration:
 RAID 1 mirrors data across drives, so failure of one drive doesn’t lead to data loss.
 However, replacing a failed drive involves rebuilding data, which can be time-consuming.

Higher RAID Levels (RAID 6, etc.):


 With RAID configurations above RAID 0, the system can handle more drive failures.
 RAID 6, for instance, can tolerate up to two drive failures due to parity data spread across
drives.
 If a drive fails, performance is impacted because the system must read other drives to
reconstruct the missing data.
RAID FAILURES
"Hot-Swappable" Drives:
 These drives can be replaced without shutting down the system, critical for continuous
operations .
 Some setups may use "hot standby" drives that are plugged in but inactive, ready to take
over if another drive fails.

Performance Implications:
 Rebuilding or using standby drives can temporarily reduce system performance.
 However, these configurations are essential for balancing data safety and system availability.

This covers the basics of RAID configurations, their resilience to failure, and considerations
for performance during recovery.
APPLIED IN OPERATING
SYSTEM

UNIT 4 :
FILE
MANAGEMENT
LESSON 1 : FILES AND FILE SYSTEMS
The file systems permits users to create data collections, called
files, with desirable properties, such as :

SHARABLE BETWEEN
LONG-TERM STRUCTURE
PROCESSES
EXISTENCE
Depending on the
Files are stored on Files have names file system, a file
disk or other and can have can have an internal
secondary storage associated access structure that is
and do not permissions that convenient for
disappear when a permit controlled particular
user logs off. sharing. applications.
TYPICAL OPERATIONS INCLUDE THE FOLLOWING :

CREATE A NEW FILE IS DEFINED AND POSITIONED WITHIN THE STRUCTURE OF FILES.

DELETE A FILE IS REMOVED FROM THE FILE STRUCTURE AND SUBSEQUENTLY


PANHGF DESTROYED.

OPEN AN EXISTING FILE IS DECLARED TO BE “OPENED” BY A PROCESS, ALLOWING


THE PROCESS TO PERFORM FUNCTIONS ON THE FILE.

CLOSE THE FILE IS CLOSED WITH RESPECT TO A PROCESS, SO THE PROCESS NO LONGER
MAY PERFORM FUNCTIONS ON THE FILE, UNTIL THE PROCESS OPENS THE FILE
AGAIN.

READ A PROCESS READS ALL OR A PORTION OF THE DATA IN A FILE.


WAN
A PROCESS UPDATE A FILE, EITHER BY ADDING NEW DATA THAT EXPANDS THE SIZE
WRITE OF THE FILE, OR BY CHANGING THE VALUES OF EXISTING DATA ITEMS IN THE FILE.
FILE STRUCTURES :
1. FIELD 3. FILE
Is the basic element of data. An Is a collection of similar
individual field contains a single records. The file is treated as a
value, such as an employee’s last single entity by users and
name, a date, or the value of a applications and may be
sensor reading.It is characterized referenced by name. Files have
by it’s length and data type. file names and may be created
and deleted.

2. RECORD 4. DATABASE
Is a collection of related data. The essential
Is a collection of related aspects of a database are that the
fields that can be treated as relationships that exists among elements of
a unit by some application data are explicit, and that the database is
program. designed for use by a number of different
applications. A database may contain all of
the information related to an organization
or a project such as a business or a
scientific study.
TYPICAL OPERATIONS THAT MUST BE
SUPPORTED INCLUDE THE FOLLOWING :
 RETRIEVE_ALL: Retrieved all the records of a file. This will be required for an

application that must process all of the information in the file at one time.

 RETRIEVE_ONE : This requires the retrieval of just a single record. Interactive,

transaction oriented applications need this operation.

 RETRIEVE_NEXT : This requires the retrieval of the record that is “next” in some logical

sequence to the most recently retrieved record. Some interactive applications, such as
filling in forms, may require such an operation.

 RETRIEVE_PREVIOUS : Similar to Retrieve_Next, but in this case the record that is

“previous” to the currently accessed record is retrieved.


TYPICAL OPERATIONS THAT MUST BE
SUPPORTED INCLUDE THE FOLLOWING :
 INSERT_ONE : Insert a new record into the file. It may be necessary that the new

record into a particular position to preserve a sequencing of the file.

 DELETE_ONE : Delete an existing record. Certain linkages or other data structures

may need to be updated to preserved the sequencing of the file.

 UPDATE_ONE : Retrieve a record, update one or more of it’s fields, and rewrite the updated

record back into the file. Again, it may be necessary to preserve sequencing with this

operation. If the length of the record has changed, the update operation is generally more

difficult than if the length is preserved.


 RETRIEVE_FEW : Retrieve a number of records. For example, an application or user

may wish to retrieve all records that satisfy a certain set of criteria.
- is that set of system software that
provides services to users and
applications in the use of files. Typically,
the only way a user or application may
access files is through the file FILE
management system.
MANAGEMENT
- This relieves the user or or
programmer of the necessity of
developing special purpose software for
SYSTEMS
each application and provides the
system with a consistent, well-defined
means of controlling it’s most important
asset.
( Grosshans, D. File Systems: Design and
Implementation. Englewood Cliffs, NJ: Prentice Hall,
1986) suggests the following objectives for a file
management system:
 To meet the data management needs and requirements of the user, which include storage of
data and the ability to perform the aforementioned operations.
 To guarantee, to the extent possible, that the data in the file are valid.
 To optimized performance, both from the system point of view in terms of overall throughput,
and from the user’s point of view in terms of response time.
 To provide I/O support for a variety of storage device types.
 To minimize or eliminate the potential for lost or destroyed data.
 To provide I/O support for multiple users, in the case of multiple-user systems.
For an Interactive, general-purpose system, the
following constitute a minimal set of
requirements :
1. Each user should be able to create, delete, read, write, and modify files.
2. Each user may have controlled access to other user’s files.
3. Each user may control what types of accesses are allowed to the user’s files.
4. Each user should be able to move data between files.
5. Each user should be able to back up and recover the user’s files in case of damage.
6. Each user should be able to access his or her files by name rather than by numeric identifier.

These objectives and requirements should be kept in mind throughout our


discussion of file management systems.
- consists of the following layers from
bottom to top: disk device driver and
tape device driver; basic file system;
basic I O supervisor; logical I O ; pile, FILE
sequential, indexed sequential, indexed,
and hashed. The user program interacts SYSTEM
with the top layer of the architecture.
ARCHITECTURE
One way of getting a feel for
the scope of file management is
to look at a depiction of a typical
software organization, as
suggested in FIGURE 6.1. Of
course, different systems will be
organized differently, but this
organization is reasonably
representative. At the lowest
level, device drivers
communicate directly with
peripheral devices or their
controllers or channels.
The basic I/O supervisor is respoinsible for all file I/O initiation and
termination. At this level, control stuctures are maintained that deal
with device I/O, scheduling, and file status. The basic I/O supervisor
selects the device on which file I/O is to be performed, based on the
particular file selected

Logical I/O enables users and applications to access records. Thus,


whereas the basic file system deals with blocks of data, the logical I/O
module deals with file records. Logical I/O provides a general-purpose
record I/O capability and maintains basic data about files.
The level of the file system closest to the user is often termed the
access method.
Another way of viewing the functions of a file system is
shown in Figure 6.2.

FILE Let us follow this diagram from left to right. Users


and application programs interact with the file system

MANAGEMENT by means of commands for creating and deleting files


and for performing opearations on files. Before
performing any operation, the file system must identify
and locate the selected files. This requires the use of
some sort of directory that serves to describe the
location of all files, plus their attributes.
FILE MANAGEMENT
File Management is divided into file management
concerns and operating system concerns.

 File Management concerns: The user and program


commands provide the operation and file name with
input from from directory management and user
FILE access control. This information is input into the file
structure, producing file manipulation functions with
MANAGEMENT input from an access method, leading to the
production of records. The records are also part of
the operating system concerns.

 Operating System Concerns: Exchange occurs


between the records and the physical blocks in the
main memory buffers, with input from blocking.
Exchanges also occur between the main memory
buffer and the physical blocks in the secondary
storage, or disk, via the I O, with input from disk

You might also like