SlideShare a Scribd company logo
1 of 14
Download to read offline
Chapter (12)
File Management
Dr. Hnin Lai Nyo
Lecturer
Faculty of Computer Science
Lecture Contents
 Lecture 1: File Management System Overview
 Lecture 2: File Organization and Access
 Lecture 3: B-Tree and File Directories
 Lecture 4: File Sharing and Record Blocking
 Lecture 5: File Allocation and Methods
 Lecture 6: Free Space Management
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Lecture 4: File Sharing and Record Blocking
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
 File Sharing
 Access Rights
 Simultaneous Access
 Record Blocking
Learning Objectives
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
 To describe the requirements for file sharing.
 To explain the concept of record blocking.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
 In a multiuser system, there is almost always a requirement for allowing files to be
shared among a number of users.
 When file sharing among users, two cases appear:
 Access Rights
 Management of simultaneous access
File Sharing
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Access Rights
 The file system should provide a flexible tool for allowing extensive file sharing
among users.
 The following are access rights that can be assigned to a particular user for a
particular file.
 None: The user would not be allowed to read the user directory that includes
the file.
 Knowledge: The user can determine that the file exists and who its owner is.
 Execution: The user can load and execute a program but cannot copy it.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Access Rights
 Reading: The user can read the file for any purpose, including copying and
execution.
 Appending: The user can add data to the file but cannot modify or delete any of
the file’s contents.
 Updating: The user can modify, delete, and add to the file’s data.
 Changing protection: The user can change the access rights granted to other
users.
 Deletion: The user can delete the file from the file system.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Access Rights
Owner
Usually the initial
creator of the file
Has full rights
May grant rights
to others
Specific Users
Individual
users who are
designated by
user ID
User Groups
A set of users
who are not
individually
defined.
All
All users who
have access to
this system
These are public
files
 Access can be provided to different classes of users.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Simultaneous Access
 When access is granted to append or update a file to more than one user, the
operating system or file management system must enforce discipline.
 A brute-force approach is to allow a user to lock the entire file when it is to be
updated.
 A finer grain of control is to lock individual records during update.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Record Blocking
 Blocks are unit of I/O with secondary storage.
 For I/O to be performed, records must be organized as blocks.
 Given the size of block, there are three methods of blocking that can be used;
 Fixed-Length Blocking : fixed-length records are used, and an integral number of
records (or bytes) are stored in a block.
Internal fragmentation – unused space at the end of each block.
 Variable-Length Spanned Blocking : variable-length records are used and are packed
into blocks with no unused space.
 Variable-Length Unspanned Blocking : variable-length records are used, but spanning
is not employed.
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Record Blocking
R2 R3 R4 Track 1
R1
R6 R7 R8 Track 2
R5
Fixed blocking
R3 R4 R6 Track 1
R1
R8 R9 R13 Track 2
R6
Variable blocking: spanned
R2 R4 R5
R7 R9 R10 R11 R12
R2 R4 R5 Track 1
R1
R7 R8 R10 Track 2
R6
R3
R9
Data Gaps due to hardware design
Waste due to block fit to track size
Waste due to record fit to block size
Waste due block size constraint from fixed record size
Figure 12.8. Record
Blocking Methods
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
Summary
In this lecture, you learned about
 File sharing in which access rights and access that can be provided to different
classes of users.
 Three types of record blockings.
Learning Outcomes
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
After the end of the lecture, the students will be able to:
 understand access rights that permit to access or deny a file or a directory.
 know access rights that can be provided to the different class of users.
 recognize that how to use three methods of blocking depending on the size of the
record blocks.
References
FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
1. “Operating Systems, internal and Design Principles” by William Stallings, 7th
Edition, ISBN 13: 978-13-230998-1.

More Related Content

Similar to Ch12_OS_Lecture 4.pdf

File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60
myrajendra
 
Ds
DsDs
Ds
HDRS
 

Similar to Ch12_OS_Lecture 4.pdf (20)

Files
FilesFiles
Files
 
Unit 3 file management
Unit 3 file managementUnit 3 file management
Unit 3 file management
 
CH11.pdf
CH11.pdfCH11.pdf
CH11.pdf
 
Chapter 12.pptx
Chapter 12.pptxChapter 12.pptx
Chapter 12.pptx
 
File Protection
File ProtectionFile Protection
File Protection
 
File Protection
File ProtectionFile Protection
File Protection
 
file management
 file management file management
file management
 
OPERATING SYSTEM
OPERATING SYSTEMOPERATING SYSTEM
OPERATING SYSTEM
 
Unit 3 chapter 1-file management
Unit 3 chapter 1-file managementUnit 3 chapter 1-file management
Unit 3 chapter 1-file management
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
 
Protection, directory implementation
Protection, directory implementationProtection, directory implementation
Protection, directory implementation
 
OS Unit IV.ppt
OS Unit IV.pptOS Unit IV.ppt
OS Unit IV.ppt
 
File System operating system operating system
File System  operating system operating systemFile System  operating system operating system
File System operating system operating system
 
File protection.59 to 60
File protection.59 to 60File protection.59 to 60
File protection.59 to 60
 
File Protection-R.D.Sivakumar
File Protection-R.D.SivakumarFile Protection-R.D.Sivakumar
File Protection-R.D.Sivakumar
 
File management
File managementFile management
File management
 
Ds
DsDs
Ds
 
Ds
DsDs
Ds
 
Unit 4 File and Data Management
Unit 4 File and Data ManagementUnit 4 File and Data Management
Unit 4 File and Data Management
 
Unit 4 file and data management
Unit 4 file and data managementUnit 4 file and data management
Unit 4 file and data management
 

More from AllinOne746595 (8)

Ch2_OS_Lecture 1_myself.pptx
Ch2_OS_Lecture 1_myself.pptxCh2_OS_Lecture 1_myself.pptx
Ch2_OS_Lecture 1_myself.pptx
 
Ch4_OS_Lecture.pdf
Ch4_OS_Lecture.pdfCh4_OS_Lecture.pdf
Ch4_OS_Lecture.pdf
 
Ch2_OS_Lecture 1.pptx
Ch2_OS_Lecture 1.pptxCh2_OS_Lecture 1.pptx
Ch2_OS_Lecture 1.pptx
 
Linux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdfLinux_Ch2 Lecture (1).pdf
Linux_Ch2 Lecture (1).pdf
 
Ch2_OS_Lecture 2.pptx
Ch2_OS_Lecture 2.pptxCh2_OS_Lecture 2.pptx
Ch2_OS_Lecture 2.pptx
 
Ch12_OS_Lecture 6.pdf
Ch12_OS_Lecture 6.pdfCh12_OS_Lecture 6.pdf
Ch12_OS_Lecture 6.pdf
 
Ch2_OS_Lecture 3.pptx
Ch2_OS_Lecture 3.pptxCh2_OS_Lecture 3.pptx
Ch2_OS_Lecture 3.pptx
 
Ch7_OS_Lecture 4.pdf
Ch7_OS_Lecture 4.pdfCh7_OS_Lecture 4.pdf
Ch7_OS_Lecture 4.pdf
 

Recently uploaded

Recently uploaded (20)

Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 

Ch12_OS_Lecture 4.pdf

  • 1. Chapter (12) File Management Dr. Hnin Lai Nyo Lecturer Faculty of Computer Science
  • 2. Lecture Contents  Lecture 1: File Management System Overview  Lecture 2: File Organization and Access  Lecture 3: B-Tree and File Directories  Lecture 4: File Sharing and Record Blocking  Lecture 5: File Allocation and Methods  Lecture 6: Free Space Management FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES
  • 3. Lecture 4: File Sharing and Record Blocking FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES  File Sharing  Access Rights  Simultaneous Access  Record Blocking
  • 4. Learning Objectives FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES  To describe the requirements for file sharing.  To explain the concept of record blocking.
  • 5. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES  In a multiuser system, there is almost always a requirement for allowing files to be shared among a number of users.  When file sharing among users, two cases appear:  Access Rights  Management of simultaneous access File Sharing
  • 6. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Access Rights  The file system should provide a flexible tool for allowing extensive file sharing among users.  The following are access rights that can be assigned to a particular user for a particular file.  None: The user would not be allowed to read the user directory that includes the file.  Knowledge: The user can determine that the file exists and who its owner is.  Execution: The user can load and execute a program but cannot copy it.
  • 7. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Access Rights  Reading: The user can read the file for any purpose, including copying and execution.  Appending: The user can add data to the file but cannot modify or delete any of the file’s contents.  Updating: The user can modify, delete, and add to the file’s data.  Changing protection: The user can change the access rights granted to other users.  Deletion: The user can delete the file from the file system.
  • 8. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Access Rights Owner Usually the initial creator of the file Has full rights May grant rights to others Specific Users Individual users who are designated by user ID User Groups A set of users who are not individually defined. All All users who have access to this system These are public files  Access can be provided to different classes of users.
  • 9. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Simultaneous Access  When access is granted to append or update a file to more than one user, the operating system or file management system must enforce discipline.  A brute-force approach is to allow a user to lock the entire file when it is to be updated.  A finer grain of control is to lock individual records during update.
  • 10. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Record Blocking  Blocks are unit of I/O with secondary storage.  For I/O to be performed, records must be organized as blocks.  Given the size of block, there are three methods of blocking that can be used;  Fixed-Length Blocking : fixed-length records are used, and an integral number of records (or bytes) are stored in a block. Internal fragmentation – unused space at the end of each block.  Variable-Length Spanned Blocking : variable-length records are used and are packed into blocks with no unused space.  Variable-Length Unspanned Blocking : variable-length records are used, but spanning is not employed.
  • 11. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Record Blocking R2 R3 R4 Track 1 R1 R6 R7 R8 Track 2 R5 Fixed blocking R3 R4 R6 Track 1 R1 R8 R9 R13 Track 2 R6 Variable blocking: spanned R2 R4 R5 R7 R9 R10 R11 R12 R2 R4 R5 Track 1 R1 R7 R8 R10 Track 2 R6 R3 R9 Data Gaps due to hardware design Waste due to block fit to track size Waste due to record fit to block size Waste due block size constraint from fixed record size Figure 12.8. Record Blocking Methods
  • 12. FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES Summary In this lecture, you learned about  File sharing in which access rights and access that can be provided to different classes of users.  Three types of record blockings.
  • 13. Learning Outcomes FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES After the end of the lecture, the students will be able to:  understand access rights that permit to access or deny a file or a directory.  know access rights that can be provided to the different class of users.  recognize that how to use three methods of blocking depending on the size of the record blocks.
  • 14. References FACULTY OF COMPUTER SCIENCE, UNIVERSITY OF COMPUTER STUDIES 1. “Operating Systems, internal and Design Principles” by William Stallings, 7th Edition, ISBN 13: 978-13-230998-1.