SlideShare una empresa de Scribd logo
1 de 21
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

Más contenido relacionado

La actualidad más candente

Free space managment46
Free space managment46Free space managment46
Free space managment46
myrajendra
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
myrajendra
 
Fragmentaton
Fragmentaton Fragmentaton
Fragmentaton
sanjana mun
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
AbDul ThaYyal
 
Defect Testing in Software Engineering SE20
Defect Testing in Software Engineering SE20Defect Testing in Software Engineering SE20
Defect Testing in Software Engineering SE20
koolkampus
 

La actualidad más candente (20)

File system structure
File system structureFile system structure
File system structure
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
9 virtual memory management
9 virtual memory management9 virtual memory management
9 virtual memory management
 
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
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
8 memory management strategies
8 memory management strategies8 memory management strategies
8 memory management strategies
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Memory management
Memory managementMemory management
Memory management
 
System call
System callSystem call
System call
 
Fragmentaton
Fragmentaton Fragmentaton
Fragmentaton
 
File system.
File system.File system.
File system.
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
 
Defect Testing in Software Engineering SE20
Defect Testing in Software Engineering SE20Defect Testing in Software Engineering SE20
Defect Testing in Software Engineering SE20
 
Operating system 34 contiguous allocation
Operating system 34 contiguous allocationOperating system 34 contiguous allocation
Operating system 34 contiguous allocation
 

Destacado

Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
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
 

Destacado (20)

Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
 
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
 
Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
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
 
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
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
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 a 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 a 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
 

Más de 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