You are on page 1of 40

1 | M .

s c S e m 1 ADVANCED OPERATING SYSTEM

UNIT- IV l/O Management and File Management


(1) Disk Scheduling
Disk Scheduling Algorithms in OS (Operating
System)
As we know, a process needs two type of time, CPU time and IO time. For I/O, it requests the Operating
system to access the disk.

However, the operating system must be fare enough to satisfy each request and at the same time,
operating system must maintain the efficiency and speed of process execution.

The technique that operating system uses to determine the request which is to be satisfied next is called
disk scheduling.

Let's discuss some important terms related to disk scheduling.

Seek Time
Seek time is the time taken in locating the disk arm to a specified track where the read/write request will
be satisfied.

Rotational Latency
It is the time taken by the desired sector to rotate itself to the position from where it can access the R/W
heads.

Transfer Time
It is the time taken to transfer the data.

Disk Access Time


Disk access time is given as,

Disk Access Time = Rotational Latency + Seek Time + Transfer Time

Disk Response Time


It is the average of time spent by each request waiting for the IO operation.

Purpose of Disk Scheduling


The main purpose of disk scheduling algorithm is to select a disk request from the queue of IO requests
and decide the schedule when this request will be processed.
2 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Goal of Disk Scheduling Algorithm

o Fairness
o High throughout
o Minimal traveling head time

Disk Scheduling Algorithms


The list of various disks scheduling algorithm is given below. Each algorithm is carrying some advantages
and disadvantages. The limitation of each algorithm leads to the evolution of a new algorithm.

o FCFS scheduling algorithm


o SSTF (shortest seek time first) algorithm
o SCAN scheduling
o C-SCAN scheduling
o LOOK Scheduling
o C-LOOK scheduling

(2) l/O Devices


Introduction of Input-Output Management
 In general, when we say a computer, we understand a CPU + memory (cache main memory).
 But a computer does not serve any purpose if it cannot receive data from the outside world or cannot
transmit data to the outside world.
 Input and output or peripheral devices are those independent devices that serve this purpose.
 So, while designing input and output for a computer we must know the no. of input and output device and
the capacity of each device

Interface:

We cannot directory connect an input and output device to computer hierarchy because of the following
reason,

 Speed: The speed of the CPU and input and output device will usually different.
 Format: The data code and format of CPU and generate peripheral may be different eg. ASCIL Unicode.
 Physical orientation: Different devices have organizations like optical, magnetic, electrochemical, and
different controlling functions.
 Signal conversion: Peripheral are electromagnetic and electrochemical device and their manner of
operation is different from the option of CPU and memory which are an electronic device, the signal
conversion is required.
 Address bus: It is used to identify the correct input and output device among the number of input and
output device, so CPU put an address of a specific input and output device on the address line all device
keep monitoring this address bus and decode it and if it a match then it activates control and data lines.
3 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

 Control bus: After selecting a specific input and output device CPU sends a functional code on the control
line. The selected device (interface) reads that functional code and execute if eg. Input and output
command, control command, status command, etc.
 Data bus: In the final step depending on the operation either CPU will put data on the data line and the
device will store it or device will put data on the data line and CPU will store it.

Memory Mapped Input and Output


 Here there are no separate input and output instructions. The CPU can manipulate input and output data
residing in the interface register with the same instructions that are used to manipulate memory words.
 Here computers can use memory type instruct for input and output data.
Example: 8085

Advantages: In a typical computer, there is more memory reference instruction than input and output
instruction, but in memory-mapped input and output all instruction that refers to memory is also
available for input and output.

Disadvantages: Total address gets divided, some range in occupied by input and output while some
memory.

Isolated Input and Output


 Here the common bus to transfer data between memory or input and output and CPU. The distinction
between memory and input and output transfer is made through a separate read and write the line.
 Input and output read and input and output write control lines are enabled during an input and output
transfer.
 Memory read and memory write control lines are enabled during a memory transfer.

Advantages: Here memory is used efficiently as the same address can be used two times.
Example: 8085

Disadvantages: Need different control lines one for memory and others for input and output devices.

Input and Output Processor


 The computer has an independent set of data address and control buses, one for accessing memory and
the other. For input and output, this is done in a computer that provides separate input and output
processor other than CPU.
 Memory communication with both the CPU and l/O through a memory bus.
 Input-output communicate also with the input and output device through a separate input and output bus
with its own address, data, and control lines. The purpose of input-output is to provide an independent
pathway for the transfer of information between external devices and internal devices.
4 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

(3) Organization of the i/O Function


Introduction

Input/Output managment is the least organized of the components of a computer system.

Stallings identifies three general categories of I/O devices

 Human readable-- These devices are for the human interface: CRT, keyboard, mouse, printer,
etc.
 Machine readable-- Disk and tape drives, sensors, controllers, A/D, D/A
 Communications-- network devices and modems.

The following differences in characteristics contribute to the inconsistency of I/O devices.

 Data rate-- see Table 11.1 for Kbytes/sec ratings. Keyboard @ 0.01, video display @30000,
disk @ 2000
 Application-- the use of the device has impact on the scheduling policies
 Complexity of control-- printer vs disk
 Unit of transfer-- stream or block
 Data representation-- coding schemes, parity
 Error conditions-- nature of errors and the possible responses

Programmed I/O-- processor issues I/O initiation and then busy waits for the completion

 Interrupt-diven I/O-- the processor issues I/O initiation but then finds other work to do and is
interrupted when the I/O operation is completed.
 Direct Memory Access-- This is necessary for block oriented devices to perform the I/O
operation directly to the memory buffers. The devices interrupt the processor when
completed.
5 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Direct Memory Access

An I/O device that can perform DMA has a small


CPU to carry out the transfer of data and access
memory.

The diagram to the right shows the control, data and


address lines that are needed in the system

The next figure shows that an I/O operation can


break into the instruction cycle at a number of
different points.

DMA Breakpoints
6 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

DMA Design Alternatives


7 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Logical Structure of the I/O function

 Logical I/O-- open, close, read, write


 Device I/O-- buffering, controller
commands
 Scheduling and Control-- queuing and
scheduling, interrupts handled here
 Directory management-- symbolic names
converted to pointers, create, delete,
rename
 File system-- the logical operations on the
files, open, close, read, write, locate,
access rights.
 Physical organization-- mapping of the file
blocks to the device blocks

I/O Buffering

Stream oriented I/O -- data is transfered on a byte-by-byte basis; not fixed block oriented; may be
line oriented

Block oriented I/O -- a block of data is transfered in one operation, e.g., disk sector, tape block.

Rather than waiting for an I/O operation to be initiated and then for it to complete, have the system
pre-read the input stream.
8 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Single Buffering -- the process get a block of


input upon an input request and then can
proceed further with input operations without
waiting for the data. On output the process
collects a block of output before the data is
transfered

Double Buffering -- the process can be


processing one block while the system is
transfering another

(3) Operating System Design lssues


There are various types of Advanced Operating Systems. Though all the Major Design Issues will
be applicable to most of the Operating Systems. The important issues related to Operating system are
transparency, flexibility, reliability, performance, scalability, naming, replication, synchronization, security.

Let us understand the Different Types of Advanced Operating Systems to understand the Major Design
Issues better.

Transparency

Multiple Computers are used but the user gets a view of only single system being used. Makes the
network invisible to user/applications.

Various degrees of transparency are

• Access Transparency

• Location Transparency

• Name Transparency

• Data Transparency

• Execution Transparency
9 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

• Performance Transparency

Flexibility

Flexible operating systems are taken to be those whose designs have been motivated to some degree
by the desire to allow the system to be tailored, either statically or dynamically, to the requirements of
specific applications or application domains.

Reliability

In general, reliability is the ability of a person or system to perform and maintain its functions in routine
circumstances, as well as hostile or unexpected circumstances.

Reliability is generally considered important by end users. Not all companies making operating systems
have a similar standard. Even among operating systems where reliability is a priority, there is a range of
quality.

Also, an operating system may be extremely reliable at one kind of task and extremely unreliable at
another.Current operating systems have two characteristics that make them unreliable and insecure.

They are huge and have very poor fault isolation.

Performance

The performance of computer hardware typically increases monotonically with time. Even if the same
could be said of software, the rate at which software performance improves is usually very slow
compared to that of hardware.

In fact, many might opine that there is plenty of software whose performance has deteriorated
consistently with time.

Moreover, it is rather difficult to establish an objective performance metric for software as complex as an
operating system: a "faster OS" is a very subjective, context dependent phrase.

Scalability

Scalability is a desirable property of a system, a network, or a process, which indicates its ability to either
handle growing amounts of work in a graceful manner, or to be readily enlarged. A system whose
performance improves after adding hardware, proportionally to the capacity added, is said to be a
scalable system.

Naming

The resources in a distributed system are spread across different computers and a naming scheme has
to be devised so that users can discover and refer to the resources that they need.

An example of such a naming scheme is the URL (Uniform Resource Locator) that is used to identify
WWW pages. If a meaningful and universally understood identification scheme is not used then many of
these resources will be inaccessible to system users.

Replication
10 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Replication is one of the oldest and most important topics in the overall area of distributed
systems.Whether one replicates data or computation, the objective is to have some group of processes
that handle incoming events.

If we replicate data, these processes are passive and operate only to maintain the stored data, reply to
read requests, and apply updates. When we replicate computation, the usual goal is to provide fault-
tolerance.

Synchronization

Processes requires coordination to achieve synchronization.Process must reach a common


synchronization point before they can continue.

A process must wait for a condition that will be set asynchronously by other interacting processes to
maintain some ordering of execution.Concurrent processes must have mutual exclusion when accessing
a critical shared resource.

Security

Authentication: Clients, Servers and messages must be authenticated

Authorization: Access control has to be performed across a physical network with heterogeneous
components under different administrative units using different security models.

Operating system authentication (OS authentication) is a way of using operating system login credentials
to authenticate database users. One aspect of OS authentication can be used to authenticate database
administrators.

OS authentication is needed because there must be a way to identify administrative users even if the
database is shut down.

(4) l/O Buffering


Buffering in Operating System
The buffer is an area in the main memory used to store or hold the data temporarily. In other words,
buffer temporarily stores data transmitted from one place to another, either between two devices or an
application. The act of storing data temporarily in the buffer is called buffering.

A buffer may be used when moving data between processes within a computer. Buffers can be
implemented in a fixed memory location in hardware or by using a virtual data buffer in software, pointing
at a location in the physical memory. In all cases, the data in a data buffer are stored on a physical storage
medium.

Most buffers are implemented in software, which typically uses the faster RAM to store temporary data
due to the much faster access time than hard disk drives. Buffers are typically used when there is a
difference between the rate of received data and the rate of processed data, for example, in a printer
spooler or online video streaming.
11 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

A buffer often adjusts timing by implementing a queue or FIFO algorithm in memory, simultaneously
writing data into the queue at one rate and reading it at another rate.

Purpose of Buffering
You face buffer during watching videos on YouTube or live streams. In a video stream, a buffer represents
the amount of data required to be downloaded before the video can play to the viewer in real-time. A
buffer in a computer environment means that a set amount of data will be stored to preload the required
data before it gets used by the CPU.

Computers have many different devices that operate at varying speeds, and a buffer is needed to act as a
temporary placeholder for everything interacting. This is done to keep everything running efficiently and
without issues between all the devices, programs, and processes running at that time. There are three
reasons behind buffering of data,

1. It helps in matching speed between two devices in which the data is transmitted. For example, a hard disk
has to store the file received from the modem. As we know, the transmission speed of a modem is slow
compared to the hard disk. So bytes coming from the modem is accumulated in the buffer space, and when
all the bytes of a file has arrived at the buffer, the entire data is written to the hard disk in a single operation.
2. It helps the devices with different sizes of data transfer to get adapted to each other. It helps devices to
manipulate data before sending or receiving it. In computer networking, the large message is fragmented
into small fragments and sent over the network. The fragments are accumulated in the buffer at the receiving
end and reassembled to form a complete large message.
3. It also supports copy semantics. With copy semantics, the version of data in the buffer is guaranteed to be
the version of data at the time of system call, irrespective of any subsequent change to data in the buffer.
Buffering increases the performance of the device. It overlaps the I/O of one job with the computation of the
same job.

Types of Buffering
There are three main types of buffering in the operating system, such as:

1. Single Buffer

In Single Buffering, only one buffer is used to transfer the data between two devices. The producer
produces one block of data into the buffer. After that, the consumer consumes the buffer. Only when the
buffer is empty, the processor again produces the data.
12 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Block oriented device: The following operations are performed in the block-oriented device,

o System buffer takes the input.


o After taking the input, the block gets transferred to the user space and then requests another block.
o Two blocks work simultaneously. When the user processes one block of data, the next block is being read in.
o OS can swap the processes.
o OS can record the data of the system buffer to user processes.

Stream oriented device: It performed the following operations, such as:

o Line-at a time operation is used for scroll made terminals. The user inputs one line at a time, with a carriage
return waving at the end of a line.
o Byte-at a time operation is used on forms mode, terminals when each keystroke is significant.

2. Double Buffer

In Double Buffering, two schemes or two buffers are used in the place of one. In this buffering, the
producer produces one buffer while the consumer consumes another buffer simultaneously. So, the
producer not needs to wait for filling the buffer. Double buffering is also known as buffer swapping.

Block oriented: This is how a double buffer works. There are two buffers in the system.

o The driver or controller uses one buffer to store data while waiting for it to be taken by a higher hierarchy
level.
o Another buffer is used to store data from the lower-level module.
o A major disadvantage of double buffering is that the complexity of the process gets increased.
o If the process performs rapid bursts of I/O, then using double buffering may be deficient.

Stream oriented: It performs these operations, such as:

o Line- at a time I/O, the user process does not need to be suspended for input or output unless the process
runs ahead of the double buffer.
o Byte- at time operations, double buffer offers no advantage over a single buffer of twice the length.
13 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

3. Circular Buffer

When more than two buffers are used, the buffers' collection is called a circular buffer. Each buffer is being
one unit in the circular buffer. The data transfer rate will increase using the circular buffer rather than the
double buffering.

o In this, the data do not directly pass from the producer to the consumer because the data would change due
to overwriting of buffers before consumed.
o The producer can only fill up to buffer x-1 while data in buffer x is waiting to be consumed.

How Buffering Works


In an operating system, buffer works in the following way:

o Buffering is done to deal effectively with a speed mismatch between the producer and consumer of the data
stream.
o A buffer is produced in the main memory to heap up the bytes received from the modem.
o After receiving the data in the buffer, the data get transferred to a disk from the buffer in a single operation.
o This process of data transfer is not instantaneous. Therefore the modem needs another buffer to store
additional incoming data.
o When the first buffer got filled, then it is requested to transfer the data to disk.
o The modem then fills the additional incoming data in the second buffer while the data in the first buffer gets
transferred to the disk.
o When both the buffers completed their tasks, the modem switches back to the first buffer while the data
from the second buffer gets transferred to the disk.
o Two buffers disintegrate the producer and the data consumer, thus minimising the time requirements
between them.
o Buffering also provides variations for devices that have different data transfer sizes.

Advantages of Buffer
14 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Buffering plays a very important role in any operating system during the execution of any process or task.
It has the following advantages.

o The use of buffers allows uniform disk access. It simplifies system design.
o The system places no data alignment restrictions on user processes doing I/O. By copying data from user
buffers to system buffers and vice versa, the kernel eliminates the need for special alignment of user buffers,
making user programs simpler and more portable.
o The use of the buffer can reduce the amount of disk traffic, thereby increasing overall system throughput and
decreasing response time.
o The buffer algorithms help ensure file system integrity.

Disadvantages of Buffer
Buffers are not better in all respects. Therefore, there are a few disadvantages as follows, such as:

o It is costly and impractical to have the buffer be the exact size required to hold the number of elements. Thus,
the buffer is slightly larger most of the time, with the rest of the space being wasted.
o Buffers have a fixed size at any point in time. When the buffer is full, it must be reallocated with a larger size,
and its elements must be moved. Similarly, when the number of valid elements in the buffer is significantly
smaller than its size, the buffer must be reallocated with a smaller size and elements be moved to avoid too
much waste.
o Use of the buffer requires an extra data copy when reading and writing to and from user processes. When
transmitting large amounts of data, the extra copy slows down performance.

(5) Disk Scheduling


Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk.
Disk scheduling is also known as I/O scheduling.
Disk scheduling is important because:

 Multiple I/O requests may arrive by different processes and only one I/O request can be
served at a time by the disk controller. Thus other I/O requests need to wait in the waiting
queue and need to be scheduled.
 Two or more request may be far from each other so can result in greater disk arm
movement.
15 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

 Hard drives are one of the slowest parts of the computer system and thus need to be
accessed in an efficient manner.
There are many Disk Scheduling Algorithms but before discussing them let’s have a quick look
at some of the important terms:

 Seek Time:Seek time is the time taken to locate the disk arm to a specified track where the
data is to be read or write. So the disk scheduling algorithm that gives minimum average
seek time is better.
 Rotational Latency: Rotational Latency is the time taken by the desired sector of disk to
rotate into a position so that it can access the read/write heads. So the disk scheduling
algorithm that gives minimum rotational latency is better.
 Transfer Time: Transfer time is the time to transfer the data. It depends on the rotating
speed of the disk and number of bytes to be transferred.
 Disk Access Time: Disk Access Time is:

Disk Access Time = Seek Time +


Rotational Latency +
Transfer Time

 Disk Response Time: Response Time is the average of time spent by a request waiting to
perform its I/O operation. Average Response time is the response time of the all
requests. Variance Response Time is measure of how individual request are serviced with
respect to average response time. So the disk scheduling algorithm that gives minimum
variance response time is better.
Disk Scheduling Algorithms

1. FCFS: FCFS is the simplest of all the Disk Scheduling Algorithms. In FCFS, the requests
are addressed in the order they arrive in the disk queue.Let us understand this with the help
of an example.

Example:
1. Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is : 50
16 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

1. So, total seek time:


=(82-50)+(170-82)+(170-43)+(140-43)+(140-24)+(24-16)+(190-16)
=642

Advantages:

 Every request gets a fair chance


 No indefinite postponement
Disadvantages:

 Does not try to optimize seek time


 May not provide the best possible service

1. SSTF: In SSTF (Shortest Seek Time First), requests having shortest seek time are executed
first. So, the seek time of every request is calculated in advance in the queue and then they
are scheduled according to their calculated seek time. As a result, the request near the disk
arm will get executed first. SSTF is certainly an improvement over FCFS as it decreases the
average response time and increases the throughput of system.Let us understand this with
the help of an example.

Example:
1. Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is : 50
17 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

1.
So, total seek time:
1. =(50-43)+(43-24)+(24-16)+(82-16)+(140-82)+(170-140)+(190-170)
=208

Advantages:

 Average Response Time decreases


 Throughput increases
Disadvantages:

 Overhead to calculate seek time in advance


 Can cause Starvation for a request if it has higher seek time as compared to incoming
requests
 High variance of response time as SSTF favours only some requests

1. SCAN: In SCAN algorithm the disk arm moves into a particular direction and services the
requests coming in its path and after reaching the end of disk, it reverses its direction and
again services the request arriving in its path. So, this algorithm works as an elevator and
hence also known as elevator algorithm. As a result, the requests at the midrange are
serviced more and those arriving behind the disk arm will have to wait.

Example:
1. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write
arm is at 50, and it is also given that the disk arm should move “towards the larger
value”.
18 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

1.
Therefore, the seek time is calculated as:
1. =(199-50)+(199-16)
=332

Advantages:

 High throughput
 Low variance of response time
 Average response time
Disadvantages:

 Long waiting time for requests for locations just visited by disk arm

1. CSCAN: In SCAN algorithm, the disk arm again scans the path that has been scanned, after
reversing its direction. So, it may be possible that too many requests are waiting at the other
end or there may be zero or few requests pending at the scanned area.
These situations are avoided in CSCAN algorithm in which the disk arm instead of reversing its
direction goes to the other end of the disk and starts servicing the requests from there. So, the
disk arm moves in a circular fashion and this algorithm is also similar to SCAN algorithm and
hence it is known as C-SCAN (Circular SCAN).

Example:
Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write arm
is at 50, and it is also given that the disk arm should move “towards the larger value”.
19 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Seek time is calculated as:


=(199-50)+(199-0)+(43-0)
=391
Advantages:

 Provides more uniform wait time compared to SCAN

1. LOOK: It is similar to the SCAN disk scheduling algorithm except for the difference that the
disk arm in spite of going to the end of the disk goes only to the last request to be serviced
in front of the head and then reverses its direction from there only. Thus it prevents the extra
delay which occurred due to unnecessary traversal to the end of the disk.

Example:
1. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write
arm is at 50, and it is also given that the disk arm should move “towards the larger
value”.

1.
So, the seek time is calculated as:
1. =(190-50)+(190-16)
=314

1. CLOOK: As LOOK is similar to SCAN algorithm, in similar way, CLOOK is similar to CSCAN
disk scheduling algorithm. In CLOOK, the disk arm in spite of going to the end goes only to
the last request to be serviced in front of the head and then from there goes to the other
end’s last request. Thus, it also prevents the extra delay which occurred due to unnecessary
traversal to the end of the disk.
20 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Example:
1. Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write
arm is at 50, and it is also given that the disk arm should move “towards the larger value”

1.
So, the seek time is calculated as:
1. =(190-50)+(190-16)+(43-16)
=341
2. RSS– It stands for random scheduling and just like its name it is nature. It is used in
situations where scheduling involves random attributes such as random processing time,
random due dates, random weights, and stochastic machine breakdowns this algorithm sits
perfect. Which is why it is usually used for and analysis and simulation.
3. LIFO– In LIFO (Last In, First Out) algorithm, newest jobs are serviced before the existing
ones i.e. in order of requests that get serviced the job that is newest or last entered is
serviced first and then the rest in the same order.
Advantages
 Maximizes locality and resource utilization
 Can seem a little unfair to other requests and if new requests keep coming in, it cause
starvation to the old and existing ones.
4. N-STEP SCAN – It is also known as N-STEP LOOK algorithm. In this a buffer is created for
N requests. All requests belonging to a buffer will be serviced in one go. Also once the
buffer is full no new requests are kept in this buffer and are sent to another one. Now, when
these N requests are serviced, the time comes for another top N requests and this way all
get requests get a guaranteed service
Advantages
 It eliminates starvation of requests completely
5. FSCAN– This algorithm uses two sub-queues. During the scan all requests in the first
queue are serviced and the new incoming requests are added to the second queue. All new
requests are kept on halt until the existing requests in the first queue are serviced.
Advantages
 FSCAN along with N-Step-SCAN prevents “arm stickiness” (phenomena in I/O
scheduling where the scheduling algorithm continues to service requests at or near the
current sector and thus prevents any seeking)
Each algorithm is unique in its own way. Overall Performance depends on the number and type
of requests.

(6) LINUX l/O


What is Linux Operating System
Linux is an open-source operating system like other operating systems such as Microsoft Windows, Apple
Mac OS, iOS, Google android, etc. An operating system is a software that enables the communication
between computer hardware and software. It conveys input to get processed by the processor and brings
output to the hardware to display it. This is the basic function of an operating system. Although it performs
many other important tasks, let's not talk about that.
21 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Linux is around us since the mid-90s. It can be used from wristwatches to supercomputers. It is everywhere
in our phones, laptops, PCs, cars and even in refrigerators. It is very much famous among developers and
normal computer users.

Evolution of Linux OS
The Linux OS was developed by Linus Torvalds in 1991, which sprouted as an idea to improve the UNIX
OS. He suggested improvements but was rejected by UNIX designers. Therefore, he thought of launching
an OS, designed in a way that could be modified by its users.

Nowadays, Linux is the fastest-growing OS. It is used from phones to supercomputers by almost all major
hardware devices.

Structure Of Linux Operating System


An operating system is a collection of software, each designed for a specific function.

Linux OS has following components:

1) Kernel
Linux kernel is the core part of the operating system. It establishes communication between devices and
software. Moreover, it manages system resources. It has four responsibilities:
22 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

o device management: A system has many devices connected to it like CPU, a memory device, sound cards,
graphic cards, etc. A kernel stores all the data related to all the devices in the device driver (without this kernel
won't be able to control the devices). Thus kernel knows what a device can do and how to manipulate it to
bring out the best performance. It also manages communication between all the devices. The kernel has
certain rules that have to be followed by all the devices.
o Memory management: Another function that kernel has to manage is the memory management. The kernel
keeps track of used and unused memory and makes sure that processes shouldn't manipulate data of each
other using virtual memory addresses.
o Process management: In the process, management kernel assigns enough time and gives priorities to
processes before handling CPU to other processes. It also deals with security and ownership information.
o Handling system calls: Handling system calls means a programmer can write a query or ask the kernel to
perform a task.

2) System Libraries
System libraries are special programs that help in accessing the kernel's features. A kernel has to be
triggered to perform a task, and this triggering is done by the applications. But applications must know
how to place a system call because each kernel has a different set of system calls. Programmers have
developed a standard library of procedures to communicate with the kernel. Each operating system
supports these standards, and then these are transferred to system calls for that operating system.

The most well-known system library for Linux is Glibc (GNU C library).

3) System Tools
Linux OS has a set of utility tools, which are usually simple commands. It is a software which GNU project
has written and publish under their open source license so that software is freely available to everyone.

With the help of commands, you can access your files, edit and manipulate data in your directories or files,
change the location of files, or anything.
23 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

4) Development Tools
With the above three components, your OS is running and working. But to update your system, you have
additional tools and libraries. These additional tools and libraries are written by the programmers and are
called toolchain. A toolchain is a vital development tool used by the developers to produce a working
application.

5) End User Tools


These end tools make a system unique for a user. End tools are not required for the operating system but
are necessary for a user.

Some examples of end tools are graphic design tools, office suites, browsers, multimedia players, etc.

Why use Linux?


This is one of the most asked questions about Linux systems. Why do we use a different and bit complex
operating system, if we have a simple operating system like Windows? So there are various features of
Linux systems that make it completely different and one of the most used operating systems. Linux may
be a perfect operating system if you want to get rid of viruses, malware, slowdowns, crashes, costly
repairs, and many more. Further, it provides various advantages over other operating systems, and we don't
have to pay for it. Let's have a look at some of its special features that will attract you to switch your
operating system.

Free & Open Source Operating System


Most OS come in a compiled format means the main source code has run through a program called a
compiler that translates the source code into a language that is known to the computer.

Modifying this compiled code is a tough job.

On the other hand, open-source is completely different. The source code is included with the compiled
version and allows modification by anyone having some knowledge. It gives us the freedom to run the
program, freedom to change the code according to our use, freedom to redistribute its copies, and freedom
to distribute copies, which are modified by us.

In short, Linux is an operating system that is "for the people, by the people."

And we can dive in Linux without paying any cost. We can install it on Multiple machines without paying
any cost.

It is secure
Linux supports various security options that will save you from viruses, malware, slowdowns, crashes.
Further, it will keep your data protected. Its security feature is the main reason that it is the most favorable
option for developers. It is not completely safe, but it is less vulnerable than others. Each application needs
to authorize by the admin user. The virus cannot be executed until the administrator provides the access
password. Linux systems do not require any antivirus program.
24 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Favorable choice of Developers


Linux is suitable for the developers, as it supports almost all of the most used programming languages
such as C/C++, Java, Python, Ruby, and more. Further, it facilitates with a vast range of useful applications
for development.

Developers find that the Linux terminal is much better than the Windows command line, So, they prefer
terminal over the Windows command line. The package manager on Linux system helps programmers to
understand how things are done. Bash scripting is also a functional feature for the programmers. Also, the
SSH support helps to manage the servers quickly.

A flexible operating system


Linux is a flexible OS, as, it can be used for desktop applications, embedded systems, and server
applications. It can be used from wristwatches to supercomputers. It is everywhere in our phones, laptops,
PCs, cars and even in refrigerators. Further, it supports various customization options.

Linux Distributions
Many agencies modified the Linux operating system and makes their Linux distributions. There are many
Linux distributions available in the market. It provides a different flavor of the Linux operating system to
the users. We can choose any distribution according to our needs. Some popular distros are Ubuntu,
Fedora, Debian, Linux Mint, Arch Linux, and many more.

For the beginners, Ubuntu and Linux Mint are considered useful and, for the proficient developer, Debian
and Fedora would be a good choice. To Get a list of distributions, visit Linux Distributions.

How does Linux work?


Linux is a UNIX-like operating system, but it supports a range of hardware devices from phones to
supercomputers. Every Linux-based operating system has the Linux kernel and set of software packages to
manage hardware resources.

Also, Linux OS includes some core GNU tools to provide a way to manage the kernel resources, install
software, configure the security setting and performance, and many more. All these tools are packaged
together to make a functional operating system.

How to use Linux?


We can use Linux through an interactive user interface as well as from the terminal (Command Line
Interface). Different distributions have a slightly different user interface but almost all the commands will
have the same behavior for all the distributions. To run Linux from the terminal, press the "CTRL+ALT+T"
keys. And, to explore its functionality, press the application button given on the left down corner of your
desktop.
25 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

(7) Windows l/O


A computer consists of various devices that provide input and output (I/O) to and from the outside world.
Typical devices are keyboards, mice, audio controllers, video controllers, disk drives, networking ports, and so on.
Device drivers provide the software connection between the devices and the operating system. For this reason, I/O
is very important to the device driver writer.

The Windows kernel-mode I/O manager manages the communication between applications and the interfaces
provided by device drivers. Because devices operate at speeds that may not match the operating system, the
communication between the operating system and device drivers is primarily done through I/O request packets
(IRPs). These packets are similar to network packets or Windows message packets. They are passed from operating
system to specific drivers and from one driver to another.

The Windows I/O system provides a layered driver model called stacks. Typically IRPs go from one driver to
another in the same stack to facilitate communication. For example, a joystick driver would need to communicate to
a USB hub, which in turn would need to communicate to a USB host controller, which would then need to
communicate through a PCI bus to the rest of the computer hardware. The stack consists of joystick driver, USB
hub, USB host controller, and the PCI bus. This communication is coordinated by having each driver in the stack
send and receive IRPs.

It cannot be stressed enough that your driver must send and receive IRPs on a timely basis for the whole stack to
operate efficiently. If your driver is part of a stack and does not properly receive, handle, and pass on the
information, your driver may cause system crashes.

For more information about IRPs, see Handling IRPs.

For more information about driver stacks, see Device Objects and Device Stacks.

For programming techiques related to I/O management, see I/O Manager Programming Techniques.

Routines that provide a direct interface to the I/O manager are usually prefixed with the letters "Io"; for
example, IoCreateDevice. For a list of I/O manager routines, see I/O Manager Routines.

For lists of routines that relate to IRPS, see IRPs.

The I/O manager has two subcomponents: the Plug and Play manager and power manager. They manage the I/O
functionality for the technologies of Plug and Play and power management. For more information about
Plug and Play management, see Windows Kernel-Mode Plug and Play Manager and for more information about
power management, see Windows Kernel-Mode Power Manager.

Recommended content

Write a Universal Windows driver (KMDF) based on a template - Windows drivers

This topic describes how to write a Universal Windows driver using Kernel-Mode Driver Framework
(KMDF). You'll start with a Microsoft Visual Studio template and then deploy and install your driver on a
separate computer.

From Sample Code to Production Driver - What to Change in the Samples - Windows drivers
26 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

This topic provides information for developers about how to change WDK sample drivers before
releasing device drivers based on these samples.

Write a Hello World Windows Driver (KMDF) - Windows drivers

How to write a Windows driver using Kernel-Mode Driver Framework (KMDF). You'll start with a Microsoft
Visual Studio template and then deploy and install your driver on a separate computer.

(8) File Organization


27 | M . s c S e m 1 ADVANCED OPERATING SYSTEM
28 | M . s c S e m 1 ADVANCED OPERATING SYSTEM
29 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

(9) File Directories

File
File is nothing but a collection of information. The information can be of numbers, characters, graphs,
images, etc. Every file should be stored under a unique name for its future reference. Every file should be
saved along with an extension. Some of the extensions and their description are given below −

Sr.No. Extension & Description

1
.avi
Microsoft videos for Windows movie

2
.dbf
dbase II, III, IV data file

3
.doc(x)
Microsoft word for windows

4
.gif
Graphics Interchange Format

5
.htm
Hypertext Markup Language

6
.html
Hypertext Markup Language

7
.jpg
JPEG graphics file

8
.mpg
MPEG video file

9
.mid
MIDI music file
30 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

10
.mov
QuickTime movie

Representation
File should be represented in address bar along with path of the file, filename and extension.
For example: C:\Windows\system32\Hello.html
In which C:\Windows\system32 → path
Hello → filename
.html → extension.
Directory Management
Directory is a place/area/location where a set of file(s) will be stored. It is a folder which contains details
about files, file size and time when they are created and last modified. The different types of directories
are discussed below −

Root Directory
Root Directory is created when we start formatting the disk and start putting files on it. In this, we can
create new directories called "sub-directories". Root directory is the highest level directory and is seen
when booting a system.

Subdirectory
Subdirectory is a directory inside root directory, in turn, it can have another sub-directory in it.
Personal computer has advanced a lot in a short period of time, and much of the advancement is due to
ongoing progresses in operating systems. Evolution of operating systems had made PCs easier to use
and understand, flexible and reliable. This chapter is the study of primary operating systems currently used
in personal computers and network servers, and their basic features.
This topic presents a broad survey of concepts and terminologies related to operating systems like: Basics
of operating system, user interface, basic settings of operating system, file & directory management, and
types of files.

Basics of Operating System


Operating System
Operating system is a software that controls system’s hardware and interacts with user and application
software.
In short, an operating system is computer’s chief control program.
Functions of Operating System
The operating system performs the following functions −
 It offers a user interface.
 Loads program into computer’s memory.
 Coordinates how program works with hardware and other software.
 Manages how information is stored and retrieved from the disk.
 Saves contents of file on to disk.
 Reads contents of file from disk to memory.
 Sends document to the printer and activates the printer.
 Provides resources that copy or move data from one document to another, or from one program to
another.
 Allocates RAM among the running programs.
 Recognizes keystrokes or mouse clicks and displayes characters or graphics on the screen.
31 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Sr.No. Operating System Concepts & Description

1 Types of Operating System


There are four types of operating systems.

2 Basics of Popular Operating Systems


Windows Operating System is developed by Microsoft Corporation, Linux is a
multitasking operating system that supports various users and numerous
tasks. It is open source, i.e., code for Linux is available for free of cost

3 User Interface
While working with a computer, we use a set of items on screen called "user
interface". In simple terms, it acts as an interface between user and software
application or program

4 Running an Application
The operating system offers an interface between programs and user, as well
as programs and other computer resources such as memory, printer and other
programs.

5 Operating System Simple Setting


We will learn different settings in Operating System such as changing system
date and time, changing display properties, etc.

6 File and Directory Management


File is nothing but a collection of information. The information can be of
numbers, characters, graphs, images, etc. Directory is a place/area/location
where a set of file(s) will be stored.

7 File Management System


The file management system is a software which is used to create, delete,
modify and control access and save files.

8 Types of Files
There are five types of files such as Ordinary files, Directory files, Device files,
FIFO files

Summary
This topic had given a detailed description of operating system, user interface, changing simple settings in
the operating system, files & directory management and types of files.

(10) Record Blocking


32 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

6. Records, blocks, and record formats of the tapes are basic concepts that you need to understand
when you use tape files.
7. Records
8. Records are logical mappings of the data on a tape. It typically maps directly to the records in a database
file.
9. Blocks
10. Blocks are physical units of data on a tape. Blocks can include a record, part of a record, or multiple
records.
11. Record block format
12. The record block format allows the system and user to interpret the data on a tape.
13. To understand records, blocks, and record block formats, you must know a few key terms:
14. Block Descriptor Word (BDW)
15. One or more logical records or record segments follow a block descriptor word (BDW) in a variable
length block.
16. Blocked records
17. Blocking is the process of grouping records into blocks before the system writes records on a volume. A
block consists of one or more logical records. Blocking conserves storage space on a volume by reducing
the number of interblock gaps in the data set. This increases processing efficiency by reducing the number
of I/O operations that are required to process the data set.
18. Deblocked records
19. One record exists per block.
20. Fixed length
21. The blocks on a tape have an exact (or fixed) length.
22. Interblock gap
23. Interblock gap is the physical gap on tape between two data blocks.
24. Record Descriptor Word (RDW)
25. Data follows a record descriptor word (RDW) in a variable length logical record. The RDW describes the
record.
26. Record Segment
27. As spanned records occupy more than one block, each part of the record is a record segment.
28. Segment Descriptor Word (SDW)
29. Data follows a segment descriptor word (SDW) in each record segment. The SDW, similar to the RDW,
describes the record segment.
30. Spanned records
31. The system splits a single record (spans) into two different data blocks and writes them on the tape.
32. Undefined length
33. The blocks on a tape have no defined length; each block can be different; and the program application
interprets each block correctly.
34. Unspanned records
35. Each record is contained within one data block.
36. Variable length
37. The blocks on a tape have a variable length. The block contains a header with the length of the block.
Each block in a file might or might not have the same length.
38. In sorting out these terms, the program supports and translates certain combinations into record
block formats

(11) File Sharing


File sharing is the public or private sharing of files or folders on a computer
connected to a network. Files can easily be shared outside a network via removable
media, but the term file sharing almost always refers to sharing files on a network. File
sharing allows several people to use the same file data.
33 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

What is file sharing?


File sharing is the public or private sharing of files or folders on a computer connected to a
network. Files can easily be shared outside a network via removable media, but the term file
sharing almost always refers to sharing files on a network.

File sharing allows several people to use the same file data. Some users may be able to create and
modify files depending on access permissions, while others may only have read access or even no
access.

Types of file sharing


There are countless file sharing varieties, but most of the file sharing systems available fall into one of
two categories -- operating system file sharing or internet file sharing.

Operating system file sharing


Nearly any modern operating system provides integrated file sharing capabilities. For example,
Windows supports file sharing using server message block (SMB). An administrator can share a folder
on Microsoft's Resilient File System (ReFS), which makes the folder accessible through the SMB
protocol

There are typically numerous additional features available, although the specific sharing options vary
by operating system. In addition to specifying user permissions for shared folders, it's also possible to
impose storage quotas that limit the amount of data a user can store within the file share. Additionally,
Windows Server offers a feature where an administrator can specify what types of data can be stored
where. For example, if an admin designates a shared folder for Microsoft Office documents, they can
prevent users from storing music or video files in that location.

Internet file sharing


There are several types of internet file sharing, which each serve a specific purpose, but the most
common include the following:

 Peer-to-peer (P2P) file sharing is a consumer-level technology in which each participant's PC acts
as a client in a much larger file sharing network. When a participant downloads files from this
network, the P2P software identifies where the data resides and then facilitates the download
process. While there are legitimate uses for P2P networks, they have gained a reputation for
being used primarily for the distribution of pirated media.

 Enterprise file sync and share services have gained popularity for remote work because they
enable files to be saved in the cloud and accessed via a desktop or mobile device. If the user
34 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

updates a file or creates a new file while working offline, that file is automatically synchronized to
the main storage repository the next time the user is online. These storage services retain data in
a centralized location where the organization can properly secure and back it up. Any data
downloaded to or created on an end user's device should be stored in a special encrypted folder
(often referred to as a vault) to keep the data from being compromised if a device is lost or stolen.

 Portal websites, such as Microsoft's SharePoint Online, allow users to share files and folders with
co-workers and, in some cases, people residing outside of the organization via a shared link. These
portal-based file sharing services provide real-time, collaborative access through a web browser
or mobile app, which means users can access files from anywhere, using nearly any device.
How does file sharing work?
To organize files in an enterprise file sharing tool, an administrator creates a folder and grants access
to the appropriate users. Doing so usually means creating one or more groups and then adding the
groups to the folder's access control list. This allows the administrator to set read/write access to apply
to entire groups or individual users, as needed.

Then, users can access files from the folders they have access to. Files are stored on another computer
or hosted on a physical or cloud-based server. Users click on files that they have access to and open
them on their local desktops. Accessing files via another computer works through P2P file sharing
where each computer is a client in a larger network. Server-based file sharing, on the other hand, is a
product of the File Transfer Protocol (FTP), where access can be restricted based on permissions set by
the administrator.

Typically, a user can view and edit a stored file, save any changes, and those changes will appear the
next time they open the file. All users who have access to a shared folder or file will see the latest
updates to that folder or file.

How to choose file sharing software


Choosing file sharing software ultimately comes down to matching features with the organization's
needs. If the highest priority is providing access to multiple files within one or more folders, the
organization may be able to use the built-in operating system or cloud computing capabilities. It's
possible that the network-attached storage (NAS) already has file sharing capabilities, eliminating the
need for software. However, depending on the general business use case, a portal site might be a good
alternative to a traditional file server. Likewise, an enterprise file sync and share system such
as Box, Citrix ShareFile or Egnyte might be a good option if many remote users frequently work
offline.
35 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

An organization doesn't have to use only a single type of file sharing software. Instead, organizations
should explore using multiple file sharing tools, each targeted at a particular use case where they're
most appropriate

(12) Secondary Storage Management


Secondary Storage Devices in Computer Organization
You know that processor or primary memory is very expensive and has limited storage capacity because
of its volatile nature. If we need to store large amounts of data or programs permanently, we need a
cheaper and permanent memory. Secondary memory overcomes this limitation by providing permanent
storage of data in bulk quantity.

A secondary storage device refers to any non-volatile storage device that is internal or external to the
computer. It can be any storage device beyond the primary storage that enables permanent data storage.
A secondary storage device is also known as an auxiliary storage device, backup storage device, tier 2
storage, or external storage. These devices store virtually all programs and applications on a computer,
including the operating system, device drivers, applications and general user data.

The Secondary storage media can be fixed or removable. Fixed Storage media is an internal storage
medium like a hard disk that is fixed inside the computer. A storage medium that is portable and can be
taken outside the computer is termed removable storage media. The main advantage of using secondary
storage devices is:

o In Secondary storage devices, the stored data might not be under the direct control of the operating system.
For example, many organizations store their archival data or critical documents on secondary storage drives,
which their main network cannot access to ensure their preservation whenever a data breach occurs.
o Since these drives do not interact directly with the main infrastructure and can be situated in a remote or
secure site, it is unlikely that a hacker may access these drives unless they're physically stolen.

Why do we need Secondary Storage?


Computers use main memory such as random access memory (RAM) and cache to hold data that is being
processed. However, this type of memory is volatile, and it loses its data when the computer is switched
off. General-purpose computers, such as personal computers and tablets, need to store programs and data
for later use.

That's why secondary storage is needed to keep programs and data long term. Secondary storage is non-
volatile and able to keep data as long term storage. They are used for various purposes such as backup
data used for future restores or disaster recovery, long-term archiving of data that is not frequently
accessed, and storage of non-critical data in lower-performing, less expensive drives.

Without secondary storage, all programs and data would be lost when the computer is switched off.

Characteristics of Secondary Storage Devices


36 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

These are some characteristics of secondary memory, which distinguish it from primary memory, such as:

o It is non-volatile, which means it retains data when power is switched off


o It allows for the storage of data ranging from a few megabytes to petabytes.
o It is cheaper as compared to primary memory.
o Secondary storage devices like CDs and flash drives can transfer the data from one device to another.

Types of Secondary Storage Device


Here are the two types of secondary storage devices, i.e., fixed storage and removable storage.

1. Fixed Storage

Fixed storage is an internal media device used by a computer system to store data. Usually, these are
referred to as the fixed disk drives or Hard Drives.

Fixed storage devices are not fixed. These can be removed from the system for repairing work, maintenance
purposes, and also for an upgrade, etc. But in general, this can not be done without a proper toolkit to
open up the computer system to provide physical access, which needs to be done by an engineer.

Technically, almost all data, i.e. being processed on a computer system, is stored on some built-in fixed
storage device. We have the following types of fixed storage:

o Internal flash memory (rare)


o SSD (solid-state disk) units
o Hard disk drives (HDD)

2. Removable Storage

Removable storage is an external media device that is used by a computer system to store data. Usually,
these are referred to as the Removable Disks drives or the External Drives. Removable storage is any storage
device that can be removed from a computer system while the system is running. Examples of external
devices include CDs, DVDs, Blu-ray disk drives, and diskettes and USB drives. Removable storage makes it
easier for a user to transfer data from one computer system to another.

The main benefit of removable disks in storage factors is that they can provide the fast data transfer rates
associated with storage area networks (SANs). We have the following types of Removable Storage:

o Optical discs (CDs, DVDs, Blu-ray discs)


o Memory cards
o Floppy disks
o Magnetic tapes
o Disk packs
o Paper storage (punched tapes, punched cards)
37 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Classification of Secondary Storage Devices


The following image shows the classification of commonly used secondary storage devices.

Sequential Access Storage Device


It is a class of data storage devices that read stored data in a sequence. This is in contrast to random access
memory (RAM), where data can access in any order, and magnetic tape is the common sequential access
storage device.

i. Magnetic tape: It is a medium for magnetic recording, made of a thin, magnetizable coating on a long,
narrow strip of plastic film. Devices that record and play audio and video using magnetic tape are tape
recorders and videotape recorders. A device that stores computer data on magnetic tape is known as a tape
drive.
It was a key technology in early computer development, allowing unparalleled amounts of data to be
mechanically created, stored for long periods, and rapidly accessed.

Direct Access Storage Devices


A direct-access storage device (DASD) is another name for secondary storage devices that store data in
discrete locations with a unique address, such as hard disk drives, optical drives and most magnetic storage
devices.

1. Magnetic disks: A magnetic disk is a storage device that uses a magnetization process to write, rewrite
and access data. It is covered with a magnetic coating and stores data in the form of tracks, spots and
sectors. Hard disks, zip disks and floppy disks are common examples of magnetic disks.
38 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

i. Floppy Disk: A floppy disk is a flexible disk with a magnetic coating on it, and it is packaged inside a
protective plastic envelope. These are among the oldest portable storage devices that could store up to 1.44
MB of data, but now they are not used due to very little memory storage.
ii. Hard Disk Drive (HDD): Hard disk drive comprises a series of circular disks called platters arranged one
over the other almost ½ inches apart around a spindle. Disks are made of non-magnetic material like
aluminium alloy and coated with 10-20 nm magnetic material. The standard diameter of these disks is 14
inches, and they rotate with speeds varying from 4200 rpm (rotations per minute) for personal computers to
15000 rpm for servers.
Data is stored by magnetizing or demagnetizing the magnetic coating. A magnetic reader arm is used to
read data from and write data to the disks. A typical modern HDD has a capacity in terabytes (TB).

2. Optical Disk: An optical disk is any computer disk that uses optical storage techniques and technology
to read and write data. It is a computer storage disk that stores data digitally and uses laser beams to read
and write data.

i. CD Drive: CD stands for Compact Disk. CDs are circular disks that use optical rays, usually lasers, to read and
write data. They are very cheap as you can get 700 MB of storage space for less than a dollar. CDs are inserted
in CD drives built into the CPU cabinet. They are portable as you can eject the drive, remove the CD and carry
it with you. There are three types of CDs:
o CD-ROM (Compact Disk - Read Only Memory): The manufacturer recorded the data on these CDs.
Proprietary Software, audio or video are released on CD-ROMs.
o CD-R (Compact Disk - Recordable): The user can write data once on the CD-R. It cannot be deleted
or modified later.
o CD-RW (Compact Disk - Rewritable): Data can repeatedly be written and deleted on these optical
disks.
ii. DVD Drive: DVD stands for digital video display. DVD is an optical device that can store 15 times the data
held by CDs. They are usually used to store rich multimedia files that need high storage capacity. DVDs also
come in three varieties - read-only, recordable and rewritable.
iii. Blu Ray Disk: Blu Ray Disk (BD) is an optical storage media that stores high definition (HD) video and other
multimedia files. BD uses a shorter wavelength laser than CD/DVD, enabling the writing arm to focus more
tightly on the disk and pack in more data. BDs can store up to 128 GB of data.

3. Memory Storage Devices: A memory device contains trillions of interconnected memory cells that store
data. When switched on or off, these cells hold millions of transistors representing 1s and 0s in binary code,
allowing a computer to read and write information. It includes USB drives, flash memory devices, SD and
memory cards, which you'll recognize as the storage medium used in digital cameras.

i. Flash Drive: A flash drive is a small, ultra-portable storage device. USB flash drives were essential for easily
moving files from one device to another. Flash drives connect to computers and other devices via a built-in
USB Type-Aor USB-C plug, making one a USB device and cable combination.
Flash drives are often referred to as pen drives, thumb drives, or jump drives. The terms USB drive and solid-
39 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

state drive (SSD) are also sometimes used, but most of the time, those refer to larger, not-so-mobile USB-
based storage devices like external hard drives.
These days, a USB flash drive can hold up to 2 TB of storage. They're more expensive per gigabyte than an
external hard drive, but they have prevailed as a simple, convenient solution for storing and transferring
smaller files.
Pen drive has the following advantages in computer organization, such as:
o Transfer Files: A pen drive is a device plugged into a USB port of the system that is used to transfer
files, documents, and photos to a PC and vice versa.
o Portability: The lightweight nature and smaller size of a pen drive make it possible to carry it from
place to place, making data transportation an easier task.
o Backup Storage:Most of the pen drives now come with the feature of having password encryption,
important information related to family, medical records, and photos can be stored on them as a
backup.
o Transport Data: Professionals or Students can now easily transport large data files and video, audio
lectures on a pen drive and access them from anywhere. Independent PC technicians can store work-
related utility tools, various programs, and files on a high-speed 64 GB pen drive and move from one
site to another.
ii. Memory card: A memory cardor memory cartridge is an electronic data storage device used for storing
digital information, typically using flash memory. These are commonly used in portable electronic devices,
such as digital cameras, mobile phones, laptop computers, tablets, PDAs, portable media players, video game
consoles, synthesizers, electronic keyboards and digital pianos, and allow adding memory to such devices
without compromising ergonomy, as the card is usually contained within the device rather than protruding
like USB flash drives.

Difference between Primary and Secondary Memory


Below are some main differences between primary and secondary memory in computer organization.

Primary Memory Secondary Memory

Primary memory is directly accessed by the Central Secondary memory is not accessed directly by the Central
Processing Unit (CPU). Processing Unit (CPU). Instead, data accessed from a
secondary memory is first loaded into Random Access
Memory (RAM) and then sent to the Processing Unit.

RAM provides a much faster-accessing speed to Secondary memory is slower in data accessing. Typically
data than secondary memory. Computers can primary memory is six times faster than secondary memory.
quickly process data by loading software programs
and required files into primary memory (RAM).
40 | M . s c S e m 1 ADVANCED OPERATING SYSTEM

Primary memory is volatile and gets completely Secondary memory provides a feature of being non-
erased when a computer is shut down. volatile, which means it can hold on to its data with or
without an electrical power supply.

You might also like