SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
Fraboni Ec
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
nikeAthena
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
Fragmentaton
Fragmentaton Fragmentaton
Fragmentaton
sanjana mun
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
myrajendra
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
Ravindra Raju Kolahalam
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
myrajendra
 

Was ist angesagt? (20)

Chapter 11 - File System Implementation
Chapter 11 - File System ImplementationChapter 11 - File System Implementation
Chapter 11 - File System Implementation
 
Hardware multithreading
Hardware multithreadingHardware multithreading
Hardware multithreading
 
File access method
File access methodFile access method
File access method
 
OS Memory Management
OS Memory ManagementOS Memory Management
OS Memory Management
 
Unit IV Memory and I/O Organization
Unit IV Memory and I/O OrganizationUnit IV Memory and I/O Organization
Unit IV Memory and I/O Organization
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Os Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual MemoryOs Swapping, Paging, Segmentation and Virtual Memory
Os Swapping, Paging, Segmentation and Virtual Memory
 
Paging.ppt
Paging.pptPaging.ppt
Paging.ppt
 
Demand paging
Demand pagingDemand paging
Demand paging
 
File Allocation Methods.ppt
File Allocation Methods.pptFile Allocation Methods.ppt
File Allocation Methods.ppt
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
MULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULINGMULTILEVEL QUEUE SCHEDULING
MULTILEVEL QUEUE SCHEDULING
 
Memory management
Memory managementMemory management
Memory management
 
Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
Fragmentaton
Fragmentaton Fragmentaton
Fragmentaton
 
Linked allocation 48
Linked  allocation 48Linked  allocation 48
Linked allocation 48
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
File access methods.54
File access methods.54File access methods.54
File access methods.54
 
Difference Program vs Process vs Thread
Difference Program vs Process vs ThreadDifference Program vs Process vs Thread
Difference Program vs Process vs Thread
 

Andere mochten auch

Index allocation 48 1
Index allocation 48 1Index allocation 48 1
Index allocation 48 1
myrajendra
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
myrajendra
 
file system in operating system
file system in operating systemfile system in operating system
file system in operating system
tittuajay
 
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
 

Andere mochten auch (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
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
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
 
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
 
Semaphore
SemaphoreSemaphore
Semaphore
 

Ähnlich wie 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
 
Thrashing allocation frames.43
Thrashing allocation frames.43Thrashing allocation frames.43
Thrashing allocation frames.43
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
 

Ähnlich wie 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
 
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
 
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
 

Mehr von 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