SlideShare a Scribd company logo
Allocation Methods




                     http://raj-os.blogspot.in/   1
HOME     PREVIOUS TOPIC NEXT
PREVIOUS QUESTION PAPERS FOR OS
CPP TUTORIALS




        http://raj-os.blogspot.in/   2
Recap

In the last class, you have learnt:

• Various free space management techniques




                       http://raj-os.blogspot.in/   3
Objectives

On completion of this period, you would be able to
 know

• Why allocation methods are needed

• Various allocation methods




                   http://raj-os.blogspot.in/    4
Allocation Methods
• An allocation method refers to how disk blocks
  are allocated for files

• Allocation methods are for
  - effective disk space utilization
  – allow fast file access




                   http://raj-os.blogspot.in/      5
Allocation Methods


Three major methods of allocation of disk space
  are

  – Contiguous

  – Linked

  – Indexed

                   http://raj-os.blogspot.in/     6
Contiguous Allocation
•   Each file occupies a set of contiguous blocks on

    the disk

• Simple – only starting location (block #) and length
  (number of blocks) are required

• Random access

• Wasteful of space (dynamic storage-allocation
  problem)

• Files cannot grow
                      http://raj-os.blogspot.in/       7
Contiguous Allocation

• Accessing block b+1 after block b
  (assuming that only one job is accessing the
  disk )

  – Requires no head movement

  – When needed only one track to the next



                http://raj-os.blogspot.in/       8
Contiguous Allocation

• The number of disk seeks are Minimal


• The seek time when a seek is needed Minimal




                http://raj-os.blogspot.in/      9
Contiguous Allocation

• Contiguous allocation file is defined by

   – Disk address

   – Length (in block units) of the block




                     http://raj-os.blogspot.in/   10
Contiguous Allocation

Example:
• If file is n block long and starts at location b, then

   – The blocks occupied are b, b+1, b+2…..b+n-1




                       http://raj-os.blogspot.in/          11
Contiguous Allocation

• The directory entry for file has
   – Name
   – Starting address
   – Length




                    http://raj-os.blogspot.in/   12
Example:




           Fig 1

       Contiguous allocation
            http://raj-os.blogspot.in/   13
Contiguous Allocation




             Fig 2
  http://raj-os.blogspot.in/   14
Problems of Contiguous Allocation

• Finding space for a new file or a resized file.

• Determining size requirements.

• External fragmentation of the hard disk.




                    http://raj-os.blogspot.in/      15
Indexed Allocation Disadvantages

 Wasteful if only a few pointers are stored in the
index block

Number of disk access necessary to retrieve the
address of target block address




                 http://raj-os.blogspot.in/      16
Summary

In this class, you have learnt

 Various allocation methods
 Their advantages and disadvantages




                    http://raj-os.blogspot.in/   17
Frequently Asked Questions

1.Why allocation methods are needed

2. Explain various allocation methods

3.List the advantages and disadvantages of

   various allocation methods



                   http://raj-os.blogspot.in/   18
Quiz

• Allocation methods are for effective disk space utilization
  [T/F]

             True

• With contiguous allocation the disk movement is minimal
  [T/F]

             True




                        http://raj-os.blogspot.in/              19
Quiz


Linked allocation support direct access [T/F]
  – False


Space is wasted for pointers [T/F]
  – True




                     http://raj-os.blogspot.in/   20
Other subject materials

•   Web designing
•   Micro processors
•   C++ tutorials
•   java

home


                 http://raj-os.blogspot.in/   21

More Related Content

What's hot

Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
Ali Usman
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
myrajendra
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
Sajid Marwat
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
Tech_MX
 

What's hot (20)

Operating system 37 demand paging
Operating system 37 demand pagingOperating system 37 demand paging
Operating system 37 demand paging
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Database , 12 Reliability
Database , 12 ReliabilityDatabase , 12 Reliability
Database , 12 Reliability
 
Threads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess CommunicationThreads in Operating System | Multithreading | Interprocess Communication
Threads in Operating System | Multithreading | Interprocess Communication
 
File allocation methods (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 
Disk structure
Disk structureDisk structure
Disk structure
 
Memory management
Memory managementMemory management
Memory management
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Multiprocessor architecture
Multiprocessor architectureMultiprocessor architecture
Multiprocessor architecture
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Aca11 bk2 ch9
Aca11 bk2 ch9Aca11 bk2 ch9
Aca11 bk2 ch9
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Page Replacement
Page ReplacementPage Replacement
Page Replacement
 

Viewers also liked

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
myrajendra
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
tittuajay
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
myrajendra
 
Disk structure.45
Disk structure.45Disk structure.45
Disk structure.45
myrajendra
 
O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8
lonetree
 

Viewers also liked (20)

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tables
 
Allocation Method
Allocation MethodAllocation Method
Allocation Method
 
Contigious
ContigiousContigious
Contigious
 
File system
File systemFile system
File system
 
Allocation Methods-R.D.Sivakumar
Allocation Methods-R.D.SivakumarAllocation Methods-R.D.Sivakumar
Allocation Methods-R.D.Sivakumar
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
 
memory allocation methods
memory allocation methodsmemory allocation methods
memory allocation methods
 
Free Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFSFree Space Management, Efficiency & Performance, Recovery and NFS
Free Space Management, Efficiency & Performance, Recovery and NFS
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File Management
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Semaphores
SemaphoresSemaphores
Semaphores
 
File system.
File system.File system.
File system.
 
File management
File managementFile management
File management
 
Disk structure.45
Disk structure.45Disk structure.45
Disk structure.45
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Fat 32 file system
Fat 32 file systemFat 32 file system
Fat 32 file system
 

Similar to Allocation methods continuous method.47

Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49
myrajendra
 
Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52
myrajendra
 
Deleting structure.56
Deleting structure.56Deleting structure.56
Deleting structure.56
myrajendra
 
Single level directory structure.55
Single level directory structure.55Single level directory structure.55
Single level directory structure.55
myrajendra
 

Similar to Allocation methods continuous method.47 (20)

Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49
 
fileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdffileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdf
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 
Class notesfeb27
Class notesfeb27Class notesfeb27
Class notesfeb27
 
Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52
 
virtual_memory (3).pptx
virtual_memory (3).pptxvirtual_memory (3).pptx
virtual_memory (3).pptx
 
Deleting structure.56
Deleting structure.56Deleting structure.56
Deleting structure.56
 
Single level directory structure.55
Single level directory structure.55Single level directory structure.55
Single level directory structure.55
 
Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02
 
Give or take a block
Give or take a blockGive or take a block
Give or take a block
 
AdvFS/Advanced File System Ccncepts
AdvFS/Advanced File System CcnceptsAdvFS/Advanced File System Ccncepts
AdvFS/Advanced File System Ccncepts
 
Tachyon Presentation at AMPCamp 6 (November, 2015)
Tachyon Presentation at AMPCamp 6 (November, 2015)Tachyon Presentation at AMPCamp 6 (November, 2015)
Tachyon Presentation at AMPCamp 6 (November, 2015)
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
File organization
File organizationFile organization
File organization
 
Tutorial Haddop 2.3
Tutorial Haddop 2.3Tutorial Haddop 2.3
Tutorial Haddop 2.3
 
A Practical Approach to Managed Shared Drives
A Practical Approach to Managed Shared DrivesA Practical Approach to Managed Shared Drives
A Practical Approach to Managed Shared Drives
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, function
 
OS Unit5.pptx
OS Unit5.pptxOS Unit5.pptx
OS Unit5.pptx
 
Tachyon: An Open Source Memory-Centric Distributed Storage System
Tachyon: An Open Source Memory-Centric Distributed Storage SystemTachyon: An Open Source Memory-Centric Distributed Storage System
Tachyon: An Open Source Memory-Centric Distributed Storage System
 
Allocation and free space management
Allocation and free space managementAllocation and free space management
Allocation and free space management
 

More from myrajendra (20)

Fundamentals
FundamentalsFundamentals
Fundamentals
 
Data type
Data typeData type
Data type
 
Hibernate example1
Hibernate example1Hibernate example1
Hibernate example1
 
Jdbc workflow
Jdbc workflowJdbc workflow
Jdbc workflow
 
2 jdbc drivers
2 jdbc drivers2 jdbc drivers
2 jdbc drivers
 
3 jdbc api
3 jdbc api3 jdbc api
3 jdbc api
 
4 jdbc step1
4 jdbc step14 jdbc step1
4 jdbc step1
 
Dao example
Dao exampleDao example
Dao example
 
Sessionex1
Sessionex1Sessionex1
Sessionex1
 
Internal
InternalInternal
Internal
 
3. elements
3. elements3. elements
3. elements
 
2. attributes
2. attributes2. attributes
2. attributes
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Headings
HeadingsHeadings
Headings
 
Forms
FormsForms
Forms
 
Css
CssCss
Css
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Views
ViewsViews
Views
 
Starting jdbc
Starting jdbcStarting jdbc
Starting jdbc
 

Allocation methods continuous method.47

  • 1. Allocation Methods http://raj-os.blogspot.in/ 1
  • 2. HOME PREVIOUS TOPIC NEXT PREVIOUS QUESTION PAPERS FOR OS CPP TUTORIALS http://raj-os.blogspot.in/ 2
  • 3. Recap In the last class, you have learnt: • Various free space management techniques http://raj-os.blogspot.in/ 3
  • 4. Objectives On completion of this period, you would be able to know • Why allocation methods are needed • Various allocation methods http://raj-os.blogspot.in/ 4
  • 5. Allocation Methods • An allocation method refers to how disk blocks are allocated for files • Allocation methods are for - effective disk space utilization – allow fast file access http://raj-os.blogspot.in/ 5
  • 6. Allocation Methods Three major methods of allocation of disk space are – Contiguous – Linked – Indexed http://raj-os.blogspot.in/ 6
  • 7. Contiguous Allocation • Each file occupies a set of contiguous blocks on the disk • Simple – only starting location (block #) and length (number of blocks) are required • Random access • Wasteful of space (dynamic storage-allocation problem) • Files cannot grow http://raj-os.blogspot.in/ 7
  • 8. Contiguous Allocation • Accessing block b+1 after block b (assuming that only one job is accessing the disk ) – Requires no head movement – When needed only one track to the next http://raj-os.blogspot.in/ 8
  • 9. Contiguous Allocation • The number of disk seeks are Minimal • The seek time when a seek is needed Minimal http://raj-os.blogspot.in/ 9
  • 10. Contiguous Allocation • Contiguous allocation file is defined by – Disk address – Length (in block units) of the block http://raj-os.blogspot.in/ 10
  • 11. Contiguous Allocation Example: • If file is n block long and starts at location b, then – The blocks occupied are b, b+1, b+2…..b+n-1 http://raj-os.blogspot.in/ 11
  • 12. Contiguous Allocation • The directory entry for file has – Name – Starting address – Length http://raj-os.blogspot.in/ 12
  • 13. Example: Fig 1 Contiguous allocation http://raj-os.blogspot.in/ 13
  • 14. Contiguous Allocation Fig 2 http://raj-os.blogspot.in/ 14
  • 15. Problems of Contiguous Allocation • Finding space for a new file or a resized file. • Determining size requirements. • External fragmentation of the hard disk. http://raj-os.blogspot.in/ 15
  • 16. Indexed Allocation Disadvantages Wasteful if only a few pointers are stored in the index block Number of disk access necessary to retrieve the address of target block address http://raj-os.blogspot.in/ 16
  • 17. Summary In this class, you have learnt Various allocation methods Their advantages and disadvantages http://raj-os.blogspot.in/ 17
  • 18. Frequently Asked Questions 1.Why allocation methods are needed 2. Explain various allocation methods 3.List the advantages and disadvantages of various allocation methods http://raj-os.blogspot.in/ 18
  • 19. Quiz • Allocation methods are for effective disk space utilization [T/F] True • With contiguous allocation the disk movement is minimal [T/F] True http://raj-os.blogspot.in/ 19
  • 20. Quiz Linked allocation support direct access [T/F] – False Space is wasted for pointers [T/F] – True http://raj-os.blogspot.in/ 20
  • 21. Other subject materials • Web designing • Micro processors • C++ tutorials • java home http://raj-os.blogspot.in/ 21