SlideShare a Scribd company logo
BITS Pilani
Pilani Campus
Data Storage Technologies
& Networks
Dr. Virendra Singh Shekhawat
Department of Computer Science and Information Systems
BITS Pilani, Pilani Campus
Today’s Agenda
• File System (Unix FS as an Example)
– Files & File Descriptors
– File Entries
– Virtual File System and v-node
– Local File System and i-node
2
BITS Pilani, Pilani Campus
Files and File Systems:
Introduction
• A file system is a logical abstraction for
secondary (persistent) storage
– i.e. physical storage is partitioned into logical units
– Each logical unit has a file system – modeled as a
tree for navigation
– Nodes of the tree are directories (internal) and files
(terminal)
• In Unix directories are also files that store directory
listings
3
BITS Pilani, Pilani Campus
Files and File Systems: Data
Access Types
• Persistent data may be accessed:
– in large sequential chunks or
– in small random records
• File systems are typically designed to handle these
two kinds of accesses respectively
• Any standard OS includes built-in File System
– One or more file systems are supported
– e.g. ext, ext2, ext3, NTFS, FAT
4
BITS Pilani, Pilani Campus
Files in UNIX
• Files are logical storage units as well as logical I/O
streams in Unix
– i.e. access to each physical I/O device is supported
through a logical abstraction, which is a file
• A file is contained in a directory (which is also
supported as a file)
• Unix treats network connections and storage
devices through the same high level abstraction:
– Socket access (by applications) is very similar to I/O on
devices
5
BITS Pilani, Pilani Campus
File Descriptors in UNIX
• An application opening a file gets a “file descriptor”
object
– File descriptor is held by the user process
• Each process maintains a descriptor table for holding descriptors
(nonnegative integer) of open files.
– Typical operations on file descriptor:
• read, write, select, ioctl, close
– Each descriptor object in turn points to a “file entry” in a
shared table maintained by the kernel
• The file entry points to a data structure for maintaining specific
file instance information and state associated with an instance.
– This data structure is opaque to operations manipulating the file
entry.
– Underlying object instances cannot manipulate the file entry
6
BITS Pilani, Pilani Campus
Open Files in UNIX: File Entries
[1]
• read/write system calls do not take an offset as
an argument
– They update the current file offset which determines
the position for the next read/write
• lseek system call can be used to set the offset
• More than one process may open the same file
– i.e. each process needs its own offset
– i.e. each open system call allocates a new file entry
(in the kernel table) which stores the offset
7
BITS Pilani, Pilani Campus
Open Files in UNIX: File Entries
[2]
• Access Control Semantics is enforced at the file
descriptor level.
– There are flags in the descriptor recording access
permissions as “read”, “write”, or “read-write”
• There is also an “append” flag in the descriptors
– Allows file to be treated as a FIFO stream
• E.g. Multiple processes may be writing to the same file
8
BITS Pilani, Pilani Campus
Open Files in UNIX: File Entries
[3]
• Each “file entry” has a reference count
– Multiple descriptors may refer to the same file
entry:
• Single Process: dup system call
• Multiple Processes: child process after a fork inherits
file structures
– A read or write by either process (via the corresponding
descriptor) will advance the file offset
– This allows interleaved input/output from/to a file
9
BITS Pilani, Pilani Campus
Virtual File Systems and V-nodes
• File descriptors and file entries keep track of per
process, per I/O (sequence) state.
• For each open file a virtual node (v-node) is also
available in memory.
– All file entries corresponding to the file, point to the v-
node and the v-node maintains a reference count.
– Buffers (for I/O on a file) are associated with the v-
node.
• Each v-node has a clean buffers list and a dirty buffers list
– Each v-node is also associated with a mount data
structure (that corresponds to a mounted file system)
10
BITS Pilani, Pilani Campus
Virtual File System and v-nodes
• A v-node is an in-memory abstraction for a file
– i.e. it acts a proxy to a physical file store data structure
that abstracts away from the details of the file store.
• For instance, irrespective of whether a file is stored remotely
or locally, system call operations flow through a file entry to a
v-node
• A v-node is similar to an interface in an object-
oriented system where multiple implementations
of the interface are possible.
– The underlying implementation would correspond to
the physical file.
• For example, an i-node for a local file or nfs-node for a remote
file.
11
BITS Pilani, Pilani Campus
Unix File System
12
BITS Pilani, Pilani Campus
Local File System and i-node
• For a local file system an index node (i-node) is an in
memory copy of a file handle i.e.
– Each file stored in a local file system (e.g. a disk) has i-node
associated with it.
– All i-nodes are stored (along with the file system) on disk.
– Copies of i-nodes for active (i.e. open) files are kept in
memory in a hash table (i-node table) hashed by i-node
number which is a unique identifier.
• Each i-node provides information for accessing a file
data from a local store (e.g. a disk).
– It also stores file meta-data.
13
BITS Pilani, Pilani Campus
Local File Store
• Each disk drive has one or more partitions
– Typical (1-1) mapping: file store <==> partition
• File store is responsible for
– Creation, storage, retrieval and removal of files
• New file creation – i-node allocation
• Flat name space
• Allocation of new blocks to files as files grow.
• Naming, access control, locking, attribute
manipulation are all handled by the file system
management layer above the file store
14
BITS Pilani, Pilani Campus
Thank You!
15

More Related Content

What's hot

Chapter 3
Chapter 3Chapter 3
Chapter 3
Cahaya Penyayang
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
Lavanya Sharma
 
SSM
SSMSSM
Types of files
Types of filesTypes of files
Types of files
Amar Jukuntla
 
Adbms 32 transaction processing concepts
Adbms 32 transaction processing conceptsAdbms 32 transaction processing concepts
Adbms 32 transaction processing concepts
Vaibhav Khanna
 
File management in OS
File management in OSFile management in OS
File management in OS
Bhavik Vashi
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementation
Welly Dian Astika
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
rohassanie
 
File Protection
File ProtectionFile Protection
File Protection
KRITI KATYAYAN
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
Sowmya Jyothi
 
File management
File managementFile management
File management
Dr. Ahmed Al Zaidy
 
File system of windows xp
File system of windows xpFile system of windows xp
File system of windows xp
Ehtisham Ali
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file edited
Linga Lgs
 
OSCh11
OSCh11OSCh11
Os
OsOs
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
Rupali Rana
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
Welly Dian Astika
 
File system security
File system securityFile system security
File system security
AmmAr mobark
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
Kalai Selvi
 
OSCh21
OSCh21OSCh21

What's hot (20)

Chapter 3
Chapter 3Chapter 3
Chapter 3
 
File system in operating system e learning
File system in operating system e learningFile system in operating system e learning
File system in operating system e learning
 
SSM
SSMSSM
SSM
 
Types of files
Types of filesTypes of files
Types of files
 
Adbms 32 transaction processing concepts
Adbms 32 transaction processing conceptsAdbms 32 transaction processing concepts
Adbms 32 transaction processing concepts
 
File management in OS
File management in OSFile management in OS
File management in OS
 
Ch11 file system implementation
Ch11   file system implementationCh11   file system implementation
Ch11 file system implementation
 
Chapter 3 part 1
Chapter 3 part 1Chapter 3 part 1
Chapter 3 part 1
 
File Protection
File ProtectionFile Protection
File Protection
 
Internal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya JyothiInternal representation of file chapter 4 Sowmya Jyothi
Internal representation of file chapter 4 Sowmya Jyothi
 
File management
File managementFile management
File management
 
File system of windows xp
File system of windows xpFile system of windows xp
File system of windows xp
 
Microsoft power point chapter 5 file edited
Microsoft power point   chapter 5 file editedMicrosoft power point   chapter 5 file edited
Microsoft power point chapter 5 file edited
 
OSCh11
OSCh11OSCh11
OSCh11
 
Os
OsOs
Os
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
 
Ch10 file system interface
Ch10   file system interfaceCh10   file system interface
Ch10 file system interface
 
File system security
File system securityFile system security
File system security
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
OSCh21
OSCh21OSCh21
OSCh21
 

Similar to M2 211-unix fs-rl_2.1.1

UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
YogapriyaJ1
 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1
MrudulaJoshi10
 
2nd unit part 1
2nd unit  part 12nd unit  part 1
2nd unit part 1
Pavan Illa
 
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
AnilkumarBrahmane2
 
File Management & Access Control
File Management & Access Control File Management & Access Control
File Management & Access Control
YuvrajWadavale
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
ImranKhan880955
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
Kalai Selvi
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystems
Pranith Karampuri
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
HelpWithAssignment.com
 
Os6
Os6Os6
Introduction to file system and OCFS2
Introduction to file system and OCFS2Introduction to file system and OCFS2
Introduction to file system and OCFS2
Gang He
 
Fuse'ing python for rapid development of storage efficient
Fuse'ing python for rapid development of storage efficientFuse'ing python for rapid development of storage efficient
Fuse'ing python for rapid development of storage efficient
Vishal Kanaujia
 
5263802.ppt
5263802.ppt5263802.ppt
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
HelalMirzad
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
donny101
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems
senthilamul
 
operating system File - System Interface
operating system File - System Interfaceoperating system File - System Interface
operating system File - System Interface
Chandrakant Divate
 
chapter5-file system implementation.ppt
chapter5-file system implementation.pptchapter5-file system implementation.ppt
chapter5-file system implementation.ppt
BUSHRASHAIKH804312
 
Windowsforensics
WindowsforensicsWindowsforensics
Windowsforensics
Santosh Khadsare
 
File Systems
File SystemsFile Systems
File Systems
Shipra Swati
 

Similar to M2 211-unix fs-rl_2.1.1 (20)

UNIT III.pptx
UNIT III.pptxUNIT III.pptx
UNIT III.pptx
 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1
 
2nd unit part 1
2nd unit  part 12nd unit  part 1
2nd unit part 1
 
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
Unit 2.1 Introduction to Kernel.ppt (Kernel Services and Architecture)
 
File Management & Access Control
File Management & Access Control File Management & Access Control
File Management & Access Control
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
Glusterfs session #1 disk filesystems
Glusterfs session #1   disk filesystemsGlusterfs session #1   disk filesystems
Glusterfs session #1 disk filesystems
 
Systems Programming - File IO
Systems Programming - File IOSystems Programming - File IO
Systems Programming - File IO
 
Os6
Os6Os6
Os6
 
Introduction to file system and OCFS2
Introduction to file system and OCFS2Introduction to file system and OCFS2
Introduction to file system and OCFS2
 
Fuse'ing python for rapid development of storage efficient
Fuse'ing python for rapid development of storage efficientFuse'ing python for rapid development of storage efficient
Fuse'ing python for rapid development of storage efficient
 
5263802.ppt
5263802.ppt5263802.ppt
5263802.ppt
 
file management_part2_os_notes.ppt
file management_part2_os_notes.pptfile management_part2_os_notes.ppt
file management_part2_os_notes.ppt
 
Unit ivos - file systems
Unit ivos - file systemsUnit ivos - file systems
Unit ivos - file systems
 
Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems Unix file systems 2 in unix internal systems
Unix file systems 2 in unix internal systems
 
operating system File - System Interface
operating system File - System Interfaceoperating system File - System Interface
operating system File - System Interface
 
chapter5-file system implementation.ppt
chapter5-file system implementation.pptchapter5-file system implementation.ppt
chapter5-file system implementation.ppt
 
Windowsforensics
WindowsforensicsWindowsforensics
Windowsforensics
 
File Systems
File SystemsFile Systems
File Systems
 

More from MrudulaJoshi10

M4 san features-4.3.1
M4 san features-4.3.1M4 san features-4.3.1
M4 san features-4.3.1
MrudulaJoshi10
 
M4 rdma 4.5.1
M4 rdma 4.5.1M4 rdma 4.5.1
M4 rdma 4.5.1
MrudulaJoshi10
 
M4 f co-e_4.4.2
M4 f co-e_4.4.2M4 f co-e_4.4.2
M4 f co-e_4.4.2
MrudulaJoshi10
 
M4 fc stack-4.1.1
M4 fc stack-4.1.1M4 fc stack-4.1.1
M4 fc stack-4.1.1
MrudulaJoshi10
 
M4 fc san-4.2.1
M4 fc san-4.2.1M4 fc san-4.2.1
M4 fc san-4.2.1
MrudulaJoshi10
 
M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1
MrudulaJoshi10
 
M3 nfs fs-3.2.1
M3 nfs fs-3.2.1M3 nfs fs-3.2.1
M3 nfs fs-3.2.1
MrudulaJoshi10
 
M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2
MrudulaJoshi10
 
M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2
MrudulaJoshi10
 
M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1
MrudulaJoshi10
 
M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1
MrudulaJoshi10
 
M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1
MrudulaJoshi10
 
M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2
MrudulaJoshi10
 
M1 rl 1.4.1
M1 rl 1.4.1M1 rl 1.4.1
M1 rl 1.4.1
MrudulaJoshi10
 
M1 rl 1.3.1
M1 rl 1.3.1M1 rl 1.3.1
M1 rl 1.3.1
MrudulaJoshi10
 
M1 rl 1.2.1
M1 rl 1.2.1M1 rl 1.2.1
M1 rl 1.2.1
MrudulaJoshi10
 
M1 rl 1.1.1
M1 rl 1.1.1M1 rl 1.1.1
M1 rl 1.1.1
MrudulaJoshi10
 

More from MrudulaJoshi10 (17)

M4 san features-4.3.1
M4 san features-4.3.1M4 san features-4.3.1
M4 san features-4.3.1
 
M4 rdma 4.5.1
M4 rdma 4.5.1M4 rdma 4.5.1
M4 rdma 4.5.1
 
M4 f co-e_4.4.2
M4 f co-e_4.4.2M4 f co-e_4.4.2
M4 f co-e_4.4.2
 
M4 fc stack-4.1.1
M4 fc stack-4.1.1M4 fc stack-4.1.1
M4 fc stack-4.1.1
 
M4 fc san-4.2.1
M4 fc san-4.2.1M4 fc san-4.2.1
M4 fc san-4.2.1
 
M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1
 
M3 nfs fs-3.2.1
M3 nfs fs-3.2.1M3 nfs fs-3.2.1
M3 nfs fs-3.2.1
 
M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2
 
M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2
 
M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1
 
M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1
 
M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1
 
M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2
 
M1 rl 1.4.1
M1 rl 1.4.1M1 rl 1.4.1
M1 rl 1.4.1
 
M1 rl 1.3.1
M1 rl 1.3.1M1 rl 1.3.1
M1 rl 1.3.1
 
M1 rl 1.2.1
M1 rl 1.2.1M1 rl 1.2.1
M1 rl 1.2.1
 
M1 rl 1.1.1
M1 rl 1.1.1M1 rl 1.1.1
M1 rl 1.1.1
 

Recently uploaded

一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
mahaffeycheryld
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
UReason
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
upoux
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
PriyankaKilaniya
 
Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
edwin408357
 

Recently uploaded (20)

一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
AI for Legal Research with applications, tools
AI for Legal Research with applications, toolsAI for Legal Research with applications, tools
AI for Legal Research with applications, tools
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Data Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason WebinarData Driven Maintenance | UReason Webinar
Data Driven Maintenance | UReason Webinar
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
一比一原版(uofo毕业证书)美国俄勒冈大学毕业证如何办理
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...
 
Engineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdfEngineering Standards Wiring methods.pdf
Engineering Standards Wiring methods.pdf
 

M2 211-unix fs-rl_2.1.1

  • 1. BITS Pilani Pilani Campus Data Storage Technologies & Networks Dr. Virendra Singh Shekhawat Department of Computer Science and Information Systems
  • 2. BITS Pilani, Pilani Campus Today’s Agenda • File System (Unix FS as an Example) – Files & File Descriptors – File Entries – Virtual File System and v-node – Local File System and i-node 2
  • 3. BITS Pilani, Pilani Campus Files and File Systems: Introduction • A file system is a logical abstraction for secondary (persistent) storage – i.e. physical storage is partitioned into logical units – Each logical unit has a file system – modeled as a tree for navigation – Nodes of the tree are directories (internal) and files (terminal) • In Unix directories are also files that store directory listings 3
  • 4. BITS Pilani, Pilani Campus Files and File Systems: Data Access Types • Persistent data may be accessed: – in large sequential chunks or – in small random records • File systems are typically designed to handle these two kinds of accesses respectively • Any standard OS includes built-in File System – One or more file systems are supported – e.g. ext, ext2, ext3, NTFS, FAT 4
  • 5. BITS Pilani, Pilani Campus Files in UNIX • Files are logical storage units as well as logical I/O streams in Unix – i.e. access to each physical I/O device is supported through a logical abstraction, which is a file • A file is contained in a directory (which is also supported as a file) • Unix treats network connections and storage devices through the same high level abstraction: – Socket access (by applications) is very similar to I/O on devices 5
  • 6. BITS Pilani, Pilani Campus File Descriptors in UNIX • An application opening a file gets a “file descriptor” object – File descriptor is held by the user process • Each process maintains a descriptor table for holding descriptors (nonnegative integer) of open files. – Typical operations on file descriptor: • read, write, select, ioctl, close – Each descriptor object in turn points to a “file entry” in a shared table maintained by the kernel • The file entry points to a data structure for maintaining specific file instance information and state associated with an instance. – This data structure is opaque to operations manipulating the file entry. – Underlying object instances cannot manipulate the file entry 6
  • 7. BITS Pilani, Pilani Campus Open Files in UNIX: File Entries [1] • read/write system calls do not take an offset as an argument – They update the current file offset which determines the position for the next read/write • lseek system call can be used to set the offset • More than one process may open the same file – i.e. each process needs its own offset – i.e. each open system call allocates a new file entry (in the kernel table) which stores the offset 7
  • 8. BITS Pilani, Pilani Campus Open Files in UNIX: File Entries [2] • Access Control Semantics is enforced at the file descriptor level. – There are flags in the descriptor recording access permissions as “read”, “write”, or “read-write” • There is also an “append” flag in the descriptors – Allows file to be treated as a FIFO stream • E.g. Multiple processes may be writing to the same file 8
  • 9. BITS Pilani, Pilani Campus Open Files in UNIX: File Entries [3] • Each “file entry” has a reference count – Multiple descriptors may refer to the same file entry: • Single Process: dup system call • Multiple Processes: child process after a fork inherits file structures – A read or write by either process (via the corresponding descriptor) will advance the file offset – This allows interleaved input/output from/to a file 9
  • 10. BITS Pilani, Pilani Campus Virtual File Systems and V-nodes • File descriptors and file entries keep track of per process, per I/O (sequence) state. • For each open file a virtual node (v-node) is also available in memory. – All file entries corresponding to the file, point to the v- node and the v-node maintains a reference count. – Buffers (for I/O on a file) are associated with the v- node. • Each v-node has a clean buffers list and a dirty buffers list – Each v-node is also associated with a mount data structure (that corresponds to a mounted file system) 10
  • 11. BITS Pilani, Pilani Campus Virtual File System and v-nodes • A v-node is an in-memory abstraction for a file – i.e. it acts a proxy to a physical file store data structure that abstracts away from the details of the file store. • For instance, irrespective of whether a file is stored remotely or locally, system call operations flow through a file entry to a v-node • A v-node is similar to an interface in an object- oriented system where multiple implementations of the interface are possible. – The underlying implementation would correspond to the physical file. • For example, an i-node for a local file or nfs-node for a remote file. 11
  • 12. BITS Pilani, Pilani Campus Unix File System 12
  • 13. BITS Pilani, Pilani Campus Local File System and i-node • For a local file system an index node (i-node) is an in memory copy of a file handle i.e. – Each file stored in a local file system (e.g. a disk) has i-node associated with it. – All i-nodes are stored (along with the file system) on disk. – Copies of i-nodes for active (i.e. open) files are kept in memory in a hash table (i-node table) hashed by i-node number which is a unique identifier. • Each i-node provides information for accessing a file data from a local store (e.g. a disk). – It also stores file meta-data. 13
  • 14. BITS Pilani, Pilani Campus Local File Store • Each disk drive has one or more partitions – Typical (1-1) mapping: file store <==> partition • File store is responsible for – Creation, storage, retrieval and removal of files • New file creation – i-node allocation • Flat name space • Allocation of new blocks to files as files grow. • Naming, access control, locking, attribute manipulation are all handled by the file system management layer above the file store 14
  • 15. BITS Pilani, Pilani Campus Thank You! 15