0% found this document useful (0 votes)
4 views44 pages

File Management in Operating Systems

The document discusses file management in operating systems, detailing multilevel queue and multilevel feedback queue algorithms for process scheduling. It covers memory management techniques, including single tasking, fixed and variable partitioning, and addresses fragmentation issues. Additionally, it highlights various file management systems, their functions, and the importance of access control matrices.

Uploaded by

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

File Management in Operating Systems

The document discusses file management in operating systems, detailing multilevel queue and multilevel feedback queue algorithms for process scheduling. It covers memory management techniques, including single tasking, fixed and variable partitioning, and addresses fragmentation issues. Additionally, it highlights various file management systems, their functions, and the importance of access control matrices.

Uploaded by

alvarick83h
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

System Software and

Computing Concepts
CT123-3-1Ver: VDE

File Management
Recap:

What is Multilevel Queue(MQ) and

Multilevel Feedback Queue (MFQ)

CT123-3-1-System Software and Computing Concepts File Management SLIDE 2


Algorithm 2 - Multilevel Queue

• Classifies processes into different groups

• The ready queue is separated into several separate queues

• Each process is permanently assigned to one queue based on


process priority, size or process type

• Each queue would have its own scheduling algorithm

• Each queue has a priority over lower-level queues

• Time slices can be allocated to queues

CT123-3-1-System Software and Computing Concepts File Management Slide 3 of 24 SLIDE 3


Algorithm 2 - Multilevel Queue
highest priority
Queue 0
System Processes
Queue 1
Interactive Processes
Queue 2
Interactive Editing Processes
Queue 3
Batch Processes
Queue 4
Student Processes

lowest priority
CT123-3-1-System Software and Computing Concepts File Management SLIDE 4
Algorithm 3- Multilevel Feedback Queue

• Processes are allowed to move between queues

• Processes are separated by CPU burst time

• If a process utilizes too much CPU time it will be moved to a lower


priority queue

CT123-3-1-System Software and Computing Concepts File Management SLIDE 5


Algorithm 3- Multilevel Feedback Queue

highest priority
Queue 0
time quantum=8

Queue 1
time quantum=16

Queue 2
FCFS

lowest priority

CT123-3-1-System Software and Computing Concepts File Management SLIDE 6


Algorithm 3- Multilevel Feedback Queue

CT123-3-1-System Software and Computing Concepts File Management SLIDE 7


Memory Management Techniques
• Memory management can be implemented using the following
techniques:

– Single tasking with overlay

– Fixed memory partitioning

– Variable memory partitioning

CT123-3-1-System Software and Computing Concepts File Management SLIDE 8


Recap:How memory management works?

CT123-3-1-System Software and Computing Concepts File Management SLIDE 9


#1Single Tasking With Overlay

CT123-3-1-System Software and Computing Concepts File Management SLIDE 10


#1Single Tasking With Overlay

Operating System Operating System Operating System

Main Program Main Program

Free space
Overlay 2
250 bytes Overlay 1 Overlay 3
Data Area
Data Area
Free space
Execution
1. Main program (100 bytes) 3. Overlay 1(100 bytes) 4. Overlay 2 (50 bytes)
2. Data Area (50 bytes)
5. Overlay 3 (25 bytes)
CT123-3-1-System Software and Computing Concepts File Management SLIDE 11
#2Memory Partitioning - Fixed

• Operating
Dividing the memory space into partitions is the simplest System
form of memory
management
100 bytes
• Fixed partitioning
• - dividing the memory into fixed spaces
200 bytes

250 bytes

CT123-3-1-System Software and Computing Concepts File Management SLIDE 12


#2Memory Partitioning - Fixed

• Each partition can have fixed size or


variable size

CT123-3-1-System Software and Computing Concepts File Management SLIDE 13


#3Memory Partitioning - Variable

• When a process arrives and needs Operating System


memory, we search for a large enough P1
400 k
space for this process
1000 k P2
• Loads the process wherever the
memory space is available using first 2000 k P3
fit, best fit or worst fit algorithms 2300 k Free space

CT123-3-1-System Software and Computing Concepts File Management SLIDE 14


#3Memory Partitioning - Variable

CT123-3-1-System Software and Computing Concepts File Management SLIDE 15


#3Memory Partitioning – Variable Algorithm

• First fit – allocates the first space available to fit the process

• Best fit – allocates the smallest space that will fit the process

• Worst fit – allocates the largest space available

CT123-3-1-System Software and Computing Concepts File Management SLIDE 16


Fragmentation
• Fragmentation happens when
memory spaces are used in
such a way that there are small
pieces of memory available left
unused

• Fragmentation occurs naturally


when you use a disk frequently
creating, deleting, and
modifying files

CT123-3-1-System Software and Computing Concepts File Management SLIDE 17


#1External Fragmentation

• Too many small sized free space


400 OS OS
400
• These small spaces can not be used 900
for anything as they are not P5 P5
1000 900
contiguous
1700 P4
• Although enough total space exist P4 1600
but because they are not contiguous, 2000
they cannot be allocated 1900 P3
2300 P3
• Variable partitioning leads to external 2560
fragmentation 2560

CT123-3-1-System Software and Computing Concepts File Management SLIDE 18


#2Internal Fragmentation
Operating System
Job Queue
process • memory 100 bytes
P1 95 bytes 200 bytes
P2 188 bytes
250 bytes
P3 230 bytes
Operating System
95 bytes
free
188 bytes
free
230 bytes
free
CT123-3-1-System Software and Computing Concepts File Management SLIDE 19
NOW! LET’S MOVE TO FILE MANAGEMENT

This Phot o by Unknown Author is licensed under CC BY-SA-NC

CT123-3-1-System Software and Computing Concepts File Management SLIDE 20


Topic &Structure of the lesson

CT123-3-1-System Software and Computing Concepts File Management SLIDE 21


Learning Outcomes
• At the end of this lecture, YOU should be able to:

- Explain the usage of File Management in OS

- Distinguish between different types of File


Management in OS

- Explain the advantages of File Management in


current trends of Computer Technology

- Able to justify each Access Control Matrix mode

CT123-3-1-System Software and Computing Concepts File Management SLIDE 22


Key Terms you must be able to use
If you have mastered this topic, you should be able to use the following
terms correctly in your assignments and exams:

• Space management
• Metadata
• File Versioning
• File Compression and Encryption
• Sequential File Management
• Indexed File Management
• Direct File Management
• File Allocation Table (FAT) File System
• New Technology File System (NTFS)
• Access Control Matrix

CT123-3-1-System Software and Computing Concepts File Management Slide 25 of SLIDE 23


What is File Management in OS?

• File management in an opeíating system íefeís


to the set of píocesses and techniques involved
in cíeating, oíganizing, accessing, manipulating,
and contíolling files stoíed on stoíage devices
such as haíd díives, solid-state díives, oí
netwoík stoíage.

CT123-3-1-System Software and Computing Concepts File Management SLIDE 24


FILE
MANAGEMENT

CT123-3-1-System Software and Computing Concepts File Management SLIDE 25


CT123-3-1-System Software and Computing Concepts File Management SLIDE 26
T
Y
P
E
S

O
F

F
I
L
E

M
G
M
T

CT123-3-1-System Software and Computing Concepts File Management SLIDE 27


CT123-3-1-System Software and Computing Concepts File Management SLIDE 28
Examples of File Management System
• #1 Windows Explorer on Windows OS
- Allows users to organize and manage files
and folders and search for the access files

• #2 Finder on MacOS
- default in macOS

• #3 File Manager in Linux


- default file manager such as Nautilus,
Dolphin, or PCManFM

CT123-3-1-System Software and Computing Concepts File Management SLIDE 29


• #4 Network-Attached Storage (NAS)
- Systems specialized file management
systems that store & manage files on network,
allowing multiple users to access and edit files
simultaneously.

• #5 Cloud-based file storage services


- provide a file management system that
allows users to store and manage files in
the cloud, allowing access from multiple
devices and collaboration with other users.

CT123-3-1-System Software and Computing Concepts File Management SLIDE 30


Examples of File Management System
• #6 Content Management Systems (CMS)
- allow users to manage and organize digital
assets like images, videos, and documents
- Provide options for versioning and tagging

• #7 Source Code Management Systems


- specialized file management systems for
managing source code (Git, SVN)

• #8 Database Management Systems


- specialized file management systems that
allow users to manage and organize large
amounts of structured data (MySQL,
MongoDB, PostgreSQL)
CT123-3-1-System Software and Computing Concepts File Management SLIDE 31
FILE MANAGER

• File manager ALLOCATES file by


reading it from hard disk and loading it
into memory (while updating its record
who is using that file)

• File manager DEALLOCATES file by


updating file tables and rewriting the
file(if changed) to the hard disk.

CT123-3-1-System Software and Computing Concepts File Management SLIDE 32


FILE MANAGER
• Some definitions:

1. FIELD – collection of bytes that can be


identified by a user, and has type and size
2. RECORD – collection of related FIELDS
3. FILE – collection of records
4. DIRECTORY/FOLDER – special type of file
that has lists of files and their attributes.

CT123-3-1-System Software and Computing Concepts File Management SLIDE 33


The name of a file is usually in two parts:

The full filename includes path information:

CT123-3-1-System Software and Computing Concepts File Management SLIDE 34


ACCESS CONTROL MATRIX
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

CT123-3-1-System Software and Computing Concepts File Management SLIDE 35


ACCESS CONTROL MATRIX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 36


ACCESS CONTROL MATRIX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 37


ACCESS CONTROL MATRIX - LINUX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 38


ACCESS CONTROL MATRIX - LINUX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 39


ACCESS CONTROL MATRIX - LINUX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 40


ACCESS CONTROL MATRIX - LINUX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 41


ACCESS CONTROL MATRIX - LINUX

CT123-3-1-System Software and Computing Concepts File Management SLIDE 42


Summary of Main Teaching Points

- Usage of FM: Organized, Secured, Compress, Backup, Encrypt, Sharing,


Retrieve, Manage Space, Versioning, Auditing

- Types of FM: Sequential, Indexed, Direct, FAT, NFS, Distributed

- Advantages of File Management: Improved Organization, Data Security,


Data Sharing, Backup & Recovery, Compression, Versioning

- Access Control Matrix mode: R W A D

Access Control Matrix LINUX: R W X

CT123-3-1-System Software and Computing Concepts File Management SLIDE 43


CT123-3-1-System Software and Computing Concepts File Management SLIDE 44

You might also like