SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmsPiyush Rochwani
 
Ch02 early system memory management
Ch02 early system  memory managementCh02 early system  memory management
Ch02 early system memory managementJacob Cadeliña
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmssangrampatil81
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating SystemJanki Shah
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryWayne Jones Jnr
 
Free space managment46
Free space managment46Free space managment46
Free space managment46myrajendra
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mountingrajshreemuthiah
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsWayne Jones Jnr
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methodsajeela mushtaq
 
Producer consumer
Producer consumerProducer consumer
Producer consumerMohd Tousif
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page tableduvvuru madhuri
 

Tendances (20)

Disk structure
Disk structureDisk structure
Disk structure
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Page Replacement
Page ReplacementPage Replacement
Page Replacement
 
Ch02 early system memory management
Ch02 early system  memory managementCh02 early system  memory management
Ch02 early system memory management
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
File Management in Operating System
File Management in Operating SystemFile Management in Operating System
File Management in Operating System
 
Demand paging
Demand pagingDemand paging
Demand paging
 
System call
System callSystem call
System call
 
Chapter 9 - Virtual Memory
Chapter 9 - Virtual MemoryChapter 9 - Virtual Memory
Chapter 9 - Virtual Memory
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Demand paging
Demand pagingDemand paging
Demand paging
 
directory structure and file system mounting
directory structure and file system mountingdirectory structure and file system mounting
directory structure and file system mounting
 
Chapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage SystemsChapter 12 - Mass Storage Systems
Chapter 12 - Mass Storage Systems
 
6.distributed shared memory
6.distributed shared memory6.distributed shared memory
6.distributed shared memory
 
Disk allocation methods
Disk allocation methodsDisk allocation methods
Disk allocation methods
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Pci,usb,scsi bus
Pci,usb,scsi busPci,usb,scsi bus
Pci,usb,scsi bus
 
Producer consumer
Producer consumerProducer consumer
Producer consumer
 
RAID
RAIDRAID
RAID
 
Structure of the page table
Structure of the page tableStructure of the page table
Structure of the page table
 

En vedette

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48myrajendra
 
Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1myrajendra
 
File System and File allocation tables
File System and File allocation tablesFile System and File allocation tables
File System and File allocation tablesshashikant pabari
 
Allocation Method
Allocation MethodAllocation Method
Allocation Methodsamahksu
 
Allocation Methods-R.D.Sivakumar
Allocation Methods-R.D.SivakumarAllocation Methods-R.D.Sivakumar
Allocation Methods-R.D.SivakumarSivakumar R D .
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating systemtittuajay
 
memory allocation methods
memory allocation methodsmemory allocation methods
memory allocation methodsAnshul gour
 
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 NFSUnited International University
 
Operating Systems - File Management
Operating Systems -  File ManagementOperating Systems -  File Management
Operating Systems - File ManagementDamian T. Gordon
 
File access methods.54
File access methods.54File access methods.54
File access methods.54myrajendra
 
File system.
File system.File system.
File system.elyza12
 
Disk structure.45
Disk structure.45Disk structure.45
Disk structure.45myrajendra
 
O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8O Leary2008 Ce Complete Chapter8
O Leary2008 Ce Complete Chapter8lonetree
 

En vedette (20)

Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
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
 
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
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
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
 

Similaire à Allocation methods continuous method.47

Disk scheduling.49
Disk scheduling.49Disk scheduling.49
Disk scheduling.49myrajendra
 
fileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdffileallocationmethods1-220104151603.pdf
fileallocationmethods1-220104151603.pdfAbhishekBhassia
 
Disk scheduling algorithm.52
Disk scheduling algorithm.52Disk scheduling algorithm.52
Disk scheduling algorithm.52myrajendra
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43myrajendra
 
Deleting structure.56
Deleting structure.56Deleting structure.56
Deleting structure.56myrajendra
 
Single level directory structure.55
Single level directory structure.55Single level directory structure.55
Single level directory structure.55myrajendra
 
Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Secondarystoragedevices1 130119040144-phpapp02
Secondarystoragedevices1 130119040144-phpapp02Seshu Chakravarthy
 
Give or take a block
Give or take a blockGive or take a block
Give or take a blockTomer Perry
 
AdvFS/Advanced File System Ccncepts
AdvFS/Advanced File System CcnceptsAdvFS/Advanced File System Ccncepts
AdvFS/Advanced File System CcnceptsJustin Goldberg
 
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)Tachyon Nexus, Inc.
 
File organization
File organizationFile organization
File organizationGokul017
 
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 DrivesTAB
 
cache memory introduction, level, function
cache memory introduction, level, functioncache memory introduction, level, function
cache memory introduction, level, functionTeddyIswahyudi1
 

Similaire à 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 (1)
File allocation methods (1)File allocation methods (1)
File allocation methods (1)
 
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
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
 
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
 

Plus 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