Operating Systems: File Management
-
Upload
damian-gordon -
Category
Education
-
view
353 -
download
0
Transcript of Operating Systems: File Management
![Page 1: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/1.jpg)
File ManagementDamian Gordon
![Page 2: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/2.jpg)
File Management
![Page 3: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/3.jpg)
BELIEVE IT OR NOT… From the computer’s point of view, there is
no such thing as a file. It is only because the operating system is
creating the illusion of a file that they exist From the computer’s point of view, there is
only blocks of memory, either allocated or unallocated.
Believe It or Not!Damian’s
![Page 4: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/4.jpg)
The File Manager (or File Management System) is the manager in the Operating System that creates the illusion that there are files and folders being stored in computer memory.
File Management
Operating System
Files and Folders
Memory LocationsHardware
![Page 5: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/5.jpg)
Hard Disk
![Page 6: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/6.jpg)
Hard Disk
vvv
![Page 7: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/7.jpg)
Hard Disk
vvv
Track
![Page 8: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/8.jpg)
Hard Disk
vvv
Track
Sector
![Page 9: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/9.jpg)
Hard Disk
vvv
TrackBlock
Sector
![Page 10: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/10.jpg)
vvv
![Page 11: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/11.jpg)
![Page 12: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/12.jpg)
![Page 13: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/13.jpg)
Unallocated Memory(Available Memory)
![Page 14: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/14.jpg)
![Page 15: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/15.jpg)
Allocated Memory(Used Memory)
![Page 16: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/16.jpg)
The File Manager◦ Keeps track of where files are stored◦ Determines how the files are stored◦ Follows operating system file allocation policies◦ Uses available storage space efficiently for files◦ Creates a record/log of all file usage◦ Allocates a file to a user if is free, and if they are
permitted access to it.◦ De-allocates file when user finished with it.
File Management
![Page 17: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/17.jpg)
The file manager ALLOCATES a file by reading it from the hard disk and loading it into memory while updating its record of who is using what file.
The file manager DEALLOCATES a file by updating the file tables and rewriting the file (if changed) to the hard disk. Any processes waiting to access the file will be notified.
File Management
![Page 18: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/18.jpg)
Some definitions:◦ A FIELD is a collection of bytes that can be
identified by a user, and has a type and size.
◦ A RECORD is a collection of related FIELDS.
◦ A FILE is a collection of records.
◦ A DIRECTORY (or FOLDER) is a special type of file that which has lists of files and their attributes.
File Management
![Page 19: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/19.jpg)
Typical things you can do with a file are:
◦CREATE◦OPEN◦DELETE◦RENAME◦COPY◦etc.
File Management
![Page 20: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/20.jpg)
The name of a file is usually in two parts:
File Management
![Page 21: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/21.jpg)
The name of a file is usually in two parts:
◦MakeABackup.bat
File Management
![Page 22: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/22.jpg)
The name of a file is usually in two parts:
◦MakeABackup.bat
File Management
Filename
![Page 23: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/23.jpg)
The name of a file is usually in two parts:
◦MakeABackup.bat
File Management
Filename extension
![Page 24: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/24.jpg)
File Management.avi Microsoft Video for Windows movie
.dbf dbase II, III, IV data file
.doc(x) Microsoft Word for Windows
.gif Graphics Interchange Format
.htm Hypertext Markup Language (common web page file)
.html Hypertext Markup Language (common web page file)
.jpg JPEG graphic file
.mpg MPEG Video file
.mid MIDI music file
.mov QuickTime movie
![Page 25: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/25.jpg)
File Management.pdf Adobe Portable Document Format file
.ppt(x) PowerPoint file
.psd Photoshop file
.qxd QuarkXPress file
.rm Real Audio/Video streaming file
.rtf Rich Text Format
.tif TIFF graphic file
.txt ASCII text file
.wav Sound file
.xls(x) Excel spreadsheet
![Page 26: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/26.jpg)
The full filename includes path information:
C:\WINDOWS\system32\MakeABackup.bat
File Management
Filename extension
![Page 27: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/27.jpg)
The full filename includes path information:
C:\WINDOWS\system32\MakeABackup.bat
File Management
Filename extensionpath
![Page 28: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/28.jpg)
The full filename includes path information:
C:\WINDOWS\system32\MakeABackup.bat
File Management
Filename extensionpath
Absolute filename
![Page 29: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/29.jpg)
If I am in the following folder:
C:\WINDOWS\system32\BackupFolder\
Then the address of the file is:
..\MakeABackup.bat
File Management
![Page 30: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/30.jpg)
If I am in the following folder:
C:\WINDOWS\system32\BackupFolder\
Then the address of the file is:
..\MakeABackup.bat
File Management
Relative filename
![Page 31: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/31.jpg)
The Operating System store files as records in memory, where many records make up a single file.
There are three main ways a file is physically stored in memory:◦ Contiguous Storage◦ Non-contiguous Storage◦ Indexed Storage
Physical Storage Allocation
![Page 32: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/32.jpg)
vvv
![Page 33: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/33.jpg)
Contiguous Storage means that records of a file are stored one after another.
It is a very simple policy to implement, and once you have found the start of the file, it’s very easy to find the rest of it.
Contiguous Storage
![Page 34: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/34.jpg)
Contiguous Storage
![Page 35: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/35.jpg)
Contiguous Storage
a b c d e f g hNew file:
![Page 36: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/36.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
![Page 37: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/37.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
NO
![Page 38: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/38.jpg)
Contiguous Storage
a b c d e f g h
![Page 39: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/39.jpg)
Contiguous Storage
a b c d e f g h
![Page 40: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/40.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
![Page 41: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/41.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
NO
![Page 42: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/42.jpg)
Contiguous Storage
a b c d e f g h
![Page 43: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/43.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
![Page 44: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/44.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
YES
![Page 45: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/45.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
YES
![Page 46: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/46.jpg)
Contiguous Storage
a b c d e f g h
Does it fit here?
YES
![Page 47: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/47.jpg)
The problem with is that if you have expand the file, you either need to have free space allocated at the end, or copy the whole file to a different location on the disk that has enough space.
Contiguous Storage
![Page 48: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/48.jpg)
Non-contiguous Storage means that records of a file are stored where ever there is free space.
The file manager will try to put as much of it together as possible, but there will be other part spread out over the disk.
These extra bits are sometimes called extents and these are linked together with pointers.
This means there is no easy way to determine the exact location of a record in a file.
Non-contiguous Storage
![Page 49: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/49.jpg)
Non-contiguous Storage
a b c d e f g hNew file:
![Page 50: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/50.jpg)
Non-contiguous Storage
a b c d e f g h
Does it fit here?
![Page 51: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/51.jpg)
Non-contiguous Storage
a b c d e f g h
Does it fit here?
Who cares, this is where it is going
![Page 52: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/52.jpg)
Non-contiguous Storage
a b c d e f g h
![Page 53: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/53.jpg)
Non-contiguous Storage
a b c d e f g h
![Page 54: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/54.jpg)
Non-contiguous Storage
a b c d e f g h
![Page 55: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/55.jpg)
Non-contiguous Storage
a b c d e f g h
extent
![Page 56: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/56.jpg)
Non-contiguous Storage
a b c d e f g h
extent
![Page 57: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/57.jpg)
Non-contiguous Storage
a b c d e f g h
extent
![Page 58: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/58.jpg)
Indexed Storage means that as well as the records in the file, an index block is created, with pointers to each individual file.
Indexed Storage
![Page 59: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/59.jpg)
Indexed Storage
v wx y za b c d e f g h
![Page 60: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/60.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1:
File 2:vwxyz
abcdefgh
![Page 61: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/61.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1
File 1:
File 2:vwxyz
abcdefgh
![Page 62: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/62.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
File 1:
File 2:vwxyz
abcdefgh
![Page 63: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/63.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
Without an INDEX BLOCK, how do I find file 2?
File 1:
File 2:vwxyz
abcdefgh
![Page 64: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/64.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
Without an INDEX BLOCK, how do I find file 2?
We do a sequential search.
File 1:
File 2:vwxyz
abcdefgh
![Page 65: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/65.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 66: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/66.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 67: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/67.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 68: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/68.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 69: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/69.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 70: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/70.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 71: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/71.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 72: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/72.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 73: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/73.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 74: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/74.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 75: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/75.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 76: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/76.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 77: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/77.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 78: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/78.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 79: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/79.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 80: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/80.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 81: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/81.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 82: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/82.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 83: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/83.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 84: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/84.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 85: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/85.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 86: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/86.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 87: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/87.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 88: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/88.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 89: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/89.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 90: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/90.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 91: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/91.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 92: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/92.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 93: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/93.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 94: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/94.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?NO
File 1 File 2
![Page 95: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/95.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?
File 1 File 2
![Page 96: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/96.jpg)
Indexed Storage
v wx y za b c d e f g h
Is this file 2?YES
File 1 File 2
![Page 97: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/97.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
File 1:
File 2:vwxyz
abcdefgh
![Page 98: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/98.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
So how does it work with an INDEX BLOCK?
File 1:
File 2:vwxyz
abcdefgh
![Page 99: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/99.jpg)
Indexed Storage
v wx y za b c d e f g h
File 1 File 2
File Address
Size Next
File 1 1 4 9
File 1 9 4 -
File 2 15 5 -
INDEX BLOCK:File 1:
File 2:vwxyz
abcdefgh
![Page 100: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/100.jpg)
Indexed Storage
v wx y za b c d e f g h
File Address
Size Next
File 1 1 4 9
File 1 9 4 -
File 2 15 5 -
INDEX BLOCK:
File 1 File 2
![Page 101: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/101.jpg)
Indexed Storage
v wx y za b c d e f g h
File Address
Size Next
File 1 1 4 9
File 1 9 4 -
File 2 15 5 -
INDEX BLOCK:
File 1 File 2
![Page 102: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/102.jpg)
Indexed Storage
v wx y za b c d e f g h
File Address
Size Next
File 1 1 4 9
File 1 9 4 -
File 2 15 5 -
INDEX BLOCK:
File 1 File 2
![Page 103: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/103.jpg)
Indexed Storage
v wx y za b c d e f g h
File Address
Size Next
File 1 1 4 9
File 1 9 4 -
File 2 15 5 -
INDEX BLOCK:
File 1 File 2
![Page 104: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/104.jpg)
This support both sequential and direct access to records, and for larger files there can be multiple indexes.
Indexed Storage
![Page 105: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/105.jpg)
The Access Control Matrix shows the access that each user has for each file on the system. The possible accesses are:
◦R: Read◦W: Write ◦E: Execute ◦D:Delete
Access Control Matrix
![Page 106: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/106.jpg)
Access Control Matrix
User 1
User 2
User 3
User 4
User 5
File 1 RWED
--E- --E- RWED
R---
File 2 ---- R-E- R-E- R--- RWE-
File 3 R-E- RW-- R-E- R-E- R--D
File 4 R--- RWE- R--- RWED
--E-
![Page 107: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/107.jpg)
Access Control Matrix
Mary
Anne
Tom Bob Lyn
Word.exe
RWED
--E- --E- RWED
R-E-
Lect1.ppt
---- R-E- R-E- R--- RWE-Scan.Exe
R-E- RW-- R-E- R-E- R-EDChrome.exe
R-E- RWE- R-E- RWED
--E-
![Page 108: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/108.jpg)
In DOS the Access Controls are:
◦R: Read◦W: Write◦C: Change◦F: Full Control
Access Control Matrix
![Page 109: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/109.jpg)
In DOS access to a file can assigned to one of two groups:
User User Group
Access Control Matrix
![Page 110: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/110.jpg)
In DOS if we want to grant permissions to file, e.g. MakeABackup.bat, we do:
cacls
Access Control Matrix
![Page 111: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/111.jpg)
In DOS if we want to grant permissions to file, e.g. MakeABackup.bat, we do:
cacls filename arguments
Access Control Matrix
![Page 112: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/112.jpg)
In DOS if we want to grant permissions to file, e.g. MakeABackup.bat, we do:
cacls filename [/T] [/M] [/L] [/S[:SDDL]] [/E] [/C] [/G user:?] [/R user [...]] [/P user:? [...]] [/D user [...]]
Access Control Matrix
![Page 113: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/113.jpg)
In DOS cacls works as follows:
Access Control Matrix
Argument
Description
filename Display access control lists (ACLs) of file
/T Changes ACLs of specified files in the current directory and all subdirectories.
/M Changes ACLs of volumes mounted to a directory.
/L Work on the Symbolic Link itself versus the target.
/S Displays the SDDL string for the DACL.
/S:SDDL Replaces the ACLs with those specified in the SDDL string (not valid with /E, /G, /R, /P, or /D).
![Page 114: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/114.jpg)
In DOS cacls works as follows:
Access Control Matrix
Argument
Description
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:? Grant specified user access rights.? can be: R, W, C, or F
/R user Revoke specified user's access rights (only valid with /E).
/P user:? Replace specified user's access rights.? can be: R, W, C, or F
/D user Deny specified user access.
![Page 115: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/115.jpg)
Add Read-Only permission to a single file CACLS MakeABackup.bat /E /G "Power Users":R
Add Full Control permission to a second group of usersCACLS MakeABackup.bat /E /G "FinanceUsers":F
Now revoke the Read permissions from the first groupCACLS MakeABackup.bat /E /R "Power Users"
Access Control Matrix
![Page 116: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/116.jpg)
Now give the first group Full ControlCACLS MakeABackup.bat /E /G "Power Users":F
Give Finance group Full Control of folder and all sub-folders CACLS c:\docs\work /E /T /C /G "FinanceUsers":F
Access Control Matrix
![Page 117: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/117.jpg)
In Linux/Unix the Access Controls are:
◦R: Read◦W: Write◦X: Execute
Access Control Matrix
![Page 118: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/118.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
User User Group World
Access Control Matrix
![Page 119: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/119.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
User -you User Group – everyone in your group World – everyone with a login to the
system
Access Control Matrix
![Page 120: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/120.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwxrwxrwx
User User Group World
Access Control Matrix
![Page 121: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/121.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwxrwxrwx-111111111
Access Control Matrix
![Page 122: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/122.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwxr-xr-x-111101101
Access Control Matrix
![Page 123: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/123.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwx--x--x-101001001
Access Control Matrix
![Page 124: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/124.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwxrwxrwx-111111111- 7 7 7
Access Control Matrix
![Page 125: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/125.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwxr-xr-x-111101101- 7 5 5
Access Control Matrix
![Page 126: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/126.jpg)
In Linux/Unix access to a file can assigned to one of three groups:
-rwx--x--x-111001001- 7 1 1
Access Control Matrix
![Page 127: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/127.jpg)
If we want to grant permissions to file, e.g. MakeABackup.bat, we do:
chmod 755 MakeABackup.sh chmod 777 MakeABackup.sh chmod 700 MakeABackup.sh
Access Control Matrix
![Page 128: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/128.jpg)
In Linux/Unix, access to a file can assigned to one of three groups:
-rwxrwxrwx
User User Group World
Access Control Matrix
![Page 129: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/129.jpg)
In Linux/Unix, access to a folder/directory can assigned to one of three groups:
drwxrwxrwx
User User Group World
Access Control Matrix
![Page 130: Operating Systems: File Management](https://reader035.fdocuments.in/reader035/viewer/2022062503/58b880031a28ab44078b5b99/html5/thumbnails/130.jpg)
Access Control Matrix