Os Unit-5
Os Unit-5
Os Unit-5
2 SSTF: In SSTF (Shortest Seek Time First), requests having shortest scck time are cxccuted first.
So, the seck time of every request is calculated in advance in the queue and then they are scheduled
according to their calculated scck time. As a result, the request ncar the disk arm will get cxccuted
first. SSTF is certainly an improvement over FCFS as it dccrcases the average response time and
increases the throughput of system.
Example:
3 SCAN: In SCAN algorithm the disk arm moves into a particular direction and services the
requests coming in its path and after reaching the cnd of disk, it reverses its dircction and again
services the request arriving in its path. So, this algorithm works as an clevator and hence also
known as elevator algorithm. As a result, the requests at the midrange are serviced more and those
arriving bchind the disk arm will have to wait.
Example:
4 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 cnd or
there may be zero or few requests pending at the scanned area.These situations are avoided
in CSAN algorithm in which the disk arm instead of reversing its dircction 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:
5. 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 dircction from there only. Thus it prevents the extra delay which
occurred due to unnccessary traversal to the end of the disk.
6 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.
Example:
Kernel I/OSubsystem is responsible to provide many services related to I/O. Following are some of the
services provided.
Disk
Standard RAID Levels RAID devices use much different architccture, called levels, depending on
the desired balance between performance and fault tolerance. RAID levels describe how data is
distributed across thc drives. Standard RAID levels include the following:
RAID levels.
Problems with RAID: RAID does not always assure that data are available for the operating system and
its users.
Directory: Information about files is maintained by Directories. Adirectory can contain multiple
files. It can even have directories inside of them. In Windows we also call these directories as
folders.
Following is the information maintained in a directory:
Name: The name visible to user.
Type: Type of the directory.
Location: Device and location on the device where the file header is located.
Size: Number of bytes/words/blocks in the file.
Position: Current ncxt-read/next-write pointers.
Protection: Access control on rcad/writelexccuteldelete.
Usage: Time of creation, access, modification ctc.
Mounting: When the root of onc file system is "grafted" into the cxisting tree of another file
system its called Mounting.
Fille A
File B
13 14
17
FilleC
21 22 23 24
FilleE
26| 27 28
Fille D
31 32 J3334
Disadvantage
External fragmentation may occur.
Also, with pre-allocation, it is nccessary to declare the size of the file at the timc of creation.
2. Linked Allocation (Non-contiguous allocation): Allocation is on an individual block basis. Each
block contains a pointer to the next block in the chain. Again the file table nceds just a single entry for
cach file, showing the starting block and the length of the file. Although pre-allocation is possible, it is
more common simply to allocate blocks as nceded. Any free block can be added to the chain. The blocks
nced not be continuous. Increase in file size is always possible if frce disk block is available. There is no
external fragmentation because only one block at a time is necded but there can be internal fragmentation
but it exists only in the last disk block of file.
Disadvantage:
Internal fragmentation exists in last disk block of fil.
* There is an overhecad of maintaining the pointer in every disk block.
o If the pointer of any disk block is lost, the file will be truncated.
* It supports only the sequential access of files.
3. Indexed Allocation:
It addresses many of the problems of contiguous and chained allocation. In this case, the file allocation
table contains a separate one-level index for cach file: The index has one cntry for cach block allocated to
Manavendra Pratap Singh[ MTech- lIT Allahabad]
the file. Allocation may be on the basis of fixed-size blocks or variable-sized blocks. Allocation by blocks
climinates external fragmentation, whereas allocation by variable-size blocks improves locality. This
allocation technique supports both sequential and direct access to the file and thus is the most popular
form of file allocation.
File B
s[
2s J26J27J2s 29] 28
4
Fille B
File sharing
File sharing is the public or private sharing of computer data or space in a network with various levels
of access privilege. While files can casily be shared outside a nctwork (for example, simply by handing or
mailing somcone your file on a diskette), the term filesharing almost always means sharing files in a
network, even if in a small local arca network. File sharing allows a number of people to use the same file
or file by some combination of being able to rcad or view it, write to or modify it, copy it, or print it.
Typically, a file sharing system has one or more administrators. Users may all have the same or may have
different levels of access privilege. File sharing can also mean having an allocated amount of personal file
storage in a common file system.
Protection and Security Methods
The different methods that may provide protect and securities for different computer systems are:
Authentication
This deals with identifying cach user in the system and making sure they are who they claim to be. The
operating system makes sure that all the users are authenticated before they access the system. The
nt ways to make sure that the users are authentic arc:
Username/ Password
Each user has a distinct username and password combination and they need to enter it correctly
before they can access the system.
User Key/ User Card
The users necd to punch a card into the card slot or use the individual key on a keypad to access
the system.
User Attribute Identification