Professional Documents
Culture Documents
OCTOBER 2007
CERTIFICATE
ACKNOWLEDGEMENT
We would like to express our sincere gratitude to a number of people who were instrumental in making this project a success. We would like to take the opportunity to first of all thank our internal guide, Prof. S. S. Pawar for the constant encouragement and assistance he provided us at every stage of the project. We are also grateful to Prof. R.B. Ingle, Head of Computer Department, Pune Institute of Computer Technology and Other staff members for giving important suggestions. Our external guide Mr. Vivek Das Gupta, Mr. Pawan Rathi and Ms. Priyanka Mohite, Calsoft has always been very prompt at extending their helping hands and sharing their technical knowledge about the subject. We would also like to thank the faculty and all the lab assistants of the Computer Department who provided us access to the lab facilities from time to time. We would like to express our gratitude towards our parents, who have always been a source of inspiration and motivation.
Piyush Agrawal
Abstract
When user requests to write data on secondary storage number of operations are performed. The main factor that stands in read/write operations is disk access. Now data to be written on secondary storage comes to cache. After fixed interval thread scans through cache and finds out dirty data. This dirty data is flushed to secondary storage. For that purpose blocks are allocated to that data on secondary storage. Now even though modifications are going on file and even though there is space in RAM its partial data is compulsorily flushed to secondary storage for which blocks are allocated. If file modifications are carried out frequently and some what slowly then it will create fragmentation in such case. So here we will delay this flushing i.e. we will hold data in memory until it is flushed because of memory pressure (i.e. when sufficient memory is not available for other applications). Because of that actual allocation for that file will be delayed. This will help to reduce fragmentation and will reduce disk accesses. But this delayed flushing may lead to inconsistency in the system when system crashes because of which all data on cache is lost. For that we are providing backup for user data ,which is currently on cache. This will help for user data recovery.
Index
1. Introduction..1 1.1 Need of the Project.1 1.2 Project Idea.....1 1.3 Literature Survey........1 2. Problem Definition and Scope ..3 2.1 Problem Statement...3 2.2 Goals and Objective. 2.3 Statement of scope 2.4 Software Context.. 2.5 Major Constraints. 2.6 Hardware Resources Required 2.7 Software Resources Required 2.8 Area of Project..
3. Software Requirement and Scope .5 3.1 Introduction...5 3.2 Product Overview...6 3.3 Usage Scenarios......6 3.4 Functional Model and Description.9 3.5 Restrictions, Limitations and Constraints..11 4. Project Plan .12 4.1 Introduction............12 4.2 Project Estimates ...13 4.3 Risk Management...14 4.4 Project Schedule. ...14 4.5 Staff Organization..15 4.2 Tracking and Control Mechanisms16 5. High Level Design Document .....17
5.1 Introduction............17 5.2 Data Design ...18 5.3 Architectural and Component Design18 5.4 User Interface Design.....21 5.5 Advantages.........23 5.6 Restrictions, Limitations and Constraints..............................................23 6. Summary and Conclusion.....24 7. Diagrams ....25 8. References .....26
1. Introduction
1.1 Need of the project:
Today disk capacity is growing exponentially but the disk access speed does not increase at the same pace. If files are frequently modified then overhead of I/O operations will lead to degrade the performance of the system. Time required for any modification on files mainly depends upon disk bandwidth. Also writing this updates separately to disk increases fragmentation. 1.2 Project Idea: To avoid above stated loopholes we propose Delayed allocation for Windows. Here, actual write to disk and hence the allocation of the disk space is delayed until the data is to be flushed to the disk. The file wont be allocated space till main memory becomes full. So, it will try to make the contiguity in files allocated space. It also reduces number of i/o operations. When any file is modified, the modified data for that file is present on the main memory. Now after each fixed time interval (1-3 seconds), system deferred procedure timer pops and scans for dirty pages in cache memory. Out of collected dirty pages 1/4th are actually flushed to secondary by CcFlushCache () routine. Now call to this routine is actually delayed for delayed flushing. Because of delayed write there is risk of data loss. Therefore after certain writes modified data will be transferred to protected file on secondary. When that corresponding data is written at its proper location on secondary from main memory, it will be deleted from our protected file. This file can be used at the time of recovery. At the time of recovery data in this file will be given to system as fresh writes.
Recovery
File System
(f rom Actors)
Developer
(f rom Actors)
Write
Cache
(f rom Actors)
Is write reques t
Is m em ory full
[yes ] [no] [yes ] Sys tem handles read request Flus h data to s econdary
[no]
Start
system boots
[file is empty]
No recovery required
End
Start
[no]
End
3.4
stream via some file object. This shared cache map is used by all open instances for the file stream. It is unique for each file stream.
Private cache
It is allocated by cache manager for each file object when caching is initiated using that file object. It is unique to file object, and therefore multiple private cache maps can exist concurrently for an open file stream.
IRP
IRP is nothing but input output request packet. Kernel mode drivers receive I/O request packets which contain details of operation being requested. The recipient of IRP forwards it on to another kernel mode driver for additional processing or completing the IRP.
Recovery file
This file is created by developer and keeps user data that resides in main memory and not yet flushed to secondary storage. It is used at the time of recovery to track down the lost data because of the system crash.
IRP
Private cache
Prescribed location
Backup
Consist of
Data Blocks
3.5
3.5.1
is managed in the two data flow diagrams as DFD level 0 and level 1.
Write request
Control System
File System
Write request
Control System
File System
Normal Write
Recovery File Recovery Write Send data to recovery file Prescribed location in FS
Scan recovery file after boot and send if any data as a direct write