L-7.1: File System in Operating System | Windows, Linux, Unix, Android etc.

Hello friends, welcome to Gate Smashers. In this video I am going to explain
file systems in operating systems and in this video we are going to discuss
all the points related to file systems which are important for
your competitive exams and even your college and University exams. so guys quickly like this video
and subscribe to this channel if you have not done till
now press the bell button so that you get all the
latest notifications. so we start from file system first of all if we talk about
operating system out of all the major functionality
of an operating system file system is the most important system means we say operating
system manages the files but inside the code of the operating system we get a module, file system which manages all of the files if we talk about Windows Windows has NTFS file system earlier there was dos in DOS operating
system there was fat file system if we talk about Unix,
there is Unix file system if we talk about LINUX there is
extended file system. in today's time we are
talking about big data large amount of data for that there is zfs file system
data wide file system means if we talk about any operating system in the code of operating system in kernel you will find one module
that is file system so what is the first point
that is covered here whether a file system is a
hardware or software? file system is a software so if this is a software and comes under operating system
so what work it does? this manages files now what is the meaning of manage here how the data will be stored and how the data will be fetched? Like we discuss in database DBMS what is DBMS database management system means which manages the data.

So here if we say what
does the file system do? it manage data of users,
in the form of files mean how the data will be stored and if data is stored then
how it will be fetched so from where the story begins let's take the example of
myself or any user how do we manage our data we manage our data in the form of files take a simple example we copy any data with pen drive
in the form of file which we download it is in the form of file if you are sending an email there
are also we are attaching a file we send a file on WhatsApp so if I talk about PPT
or XL or PDF or DOC file it can be of any type MP3 MP4 PNG JPG so on daily basis with what we are dealing? We are dealing with Files so in actual how do we manage these
files in our laptop in our computer even in our mobiles also so who manages those files who stores those files in the back end back end means the permanent storage because we want our data
to be stored permanently It is not that I downloaded any
file or downloaded any movie and that I would place in
a volatile memory kept in RAM or in CACHE so when we close the system and open
the next day we will not have that data so I want my data to be stored permanently so from where do we have permanent
storage available? It is provided by hard disk hard disk is a permanent storage although SSDs are also becoming popular,
solid states but however most likely we use a
hard disk in majority because it’s size is more so because of large size especially
nowadays we have it in terabytes, today if we buy a laptop
in a price range of 20 – 25 thousand there also you get a hard drive
of minimum 1 terabyte So, who gets the data to
be permanently stored in the permanent storage?
File system So the story is,
what does a user do? The user has created some file let’s say I made a doc file, or excel file or ppt, mp3, mp4 or I downloaded any file or I copied any file whatever I am doing, the form in which I am managing
the data is in the form of a file How is the user viewing his data? User views his data in the form of a file So in your laptop what is there in
C drive or D drive? There are files only and
where are those files? They are inside folders, you will find the file inside any folder so you can say what is a folder?
It is a collection of related files As we call it directory in Linux or Unix.

So even if we say folder in windows,
what we call it in Linux, directory So what do we do in a directory? We store and keep related files there. Now who is managing all these folders? The file system is managing them so whether we talk about windows, Linux,
Unix or any operating system the file system is managing data So how far can the user see? User view is up to here, the user can
see his files, folders but beyond the folder
a user can’t see anything.

So there the file system works. What do we have to do now? Actually we are storing
the data inside our disk But the architecture of the
disk is something else What do we have in the disc? We have platters, surfaces,
tracks on these surfaces What do we have on the tracks there are sectors Let’s say if I have a track so on
this track we have sectors I have already made videos
on the architecture of the disk.

If you haven’t checked it,
then definitely check it once. So that all the points you have are cleared You will find their link in
the description box So see here we have sectors so actually the data are
on these sectors means the data which user is creating we want to put that data on these sectors So the file system will put the data
over these sectors. So let’s say I downloaded one file, let’s say I downloaded a movie of 1 GB it is not necessary that I have
1 GB of space lying in my disk. it will be directly stored in
that 1GB file of yours ? No what happens ? when all these files
come to the file system what it does?
Divides these files logically in what ? in the blocks let's say if we have 1GB file, so we divided into small parts Divided into blocks and those blocks then what did we do? we mapped those blocks we mapped those blocks .

With whom? with disk, means we map with those sectors inside the disk. what does map mean look it's not necessary let's say that I said, here in
block number one to sector number one block number two to sector number two block number three to sector number three contagious is not always possible may be you can do that too But it is also possible that the data
is already lying there So what are we doing? We are simply mapping that this
block goes to this sector This block should go in this sector Like if I explain you with a simple example Let's say if I have ten rooms there are ten rooms and I
have five students Student 1, student 2, student 3,
student 4, student 5 and let's say out of the ten rooms
some rooms are already booked Let's say this room is already booked,
this room is already booked Now let's say this is a section inside this section there are five students So what did I say? that
now in section one Where I have Student one, you
go in room Number one and told the student number two to
go to room number three go to room number four said roll number three to
go to room number five said roll number four to
go to room number nine said roll number five to
go to room number ten means I have mapped all these so what I did here here in section there are many students by dividing them logically with whom did we mapped them we mapped them that you go to this room
and you go to this If I have five rooms already available,
contagious I will send them continuously,
you go to one, you in two, you in three & in four but this is not always possible because there is already a lot of
data lying in the disk So obviously what we are
doing, we're mapping So the file system has a major role here.

So the file system stores this mapping manages this mapping so that when we fetch data Let's say I said roll number
1 to 5 come back means I called the whole section and now when I am calling
the whole section I should now that where I have
sent roll number 1 Where did I have send roll number 2 where did I send roll number 3 If I will not know then obviously I
may call wrong data So that it is what how the
data will be stored and how the data will be fetched So this is a complete mapping,
that means we divide data in blocks we divided the files logically not dividing physically we only divided logically that this much address in this block and this much address in this block and then what we did, we mapped it and then we put that in sectors.

We put them in sectors inside the disk So who is actually doing this work? So this work is actually done
by the file system so file system has a major role to store and fetch the data We as a user only see
our folders and our files but the scene behind it
and work behind all this that work is actually done
by the file system so in file system other than all these if we talk about files so files also have their attributes files have some operation we can create file, delete
files or truncate can rise and modify so all these we will discuss
in further videos Here I have told you only this introduction about file system, what is a file system? what it does? and why do we use it?
in our systems Thank You.