Logical File Organisation A file is logically organised as follows:

Size: px
Start display at page:

Download "Logical File Organisation A file is logically organised as follows:"

Transcription

1 File Handling The logical and physical organisation of files. Serial and sequential file handling methods. Direct and index sequential files. Creating, reading, writing and deleting records from a variety of file structures. Creating code to carry out the above operations. Logical File Organisation A file is logically organised as follows: - A file is made up of records containing fields. - A record is a collection of data that belongs together, consists of a number of fields. o Example: all the data about an individual person. - Field: is a data item of a record and usually contains one piece of data, e.g. a date, first name, age. - Once a program has processed data it can be permanently stored, allowing later retrieval. - This data is stored on magnetic tape (sequential device), magnetic disk (floppy or hard disk) or optical media (CD-ROM/CD-R/ CD-RW /DVD etc.) (Direct access devices). Sequential Device Slow. Inexpensive. Access time is dependent on current position. Random or Direct Access Fast Expensive. Have an almost constant access time. 1. Serial Access - Each record is stored, one after the other, with no regard to any logical order. 1

2 - It is the simplest form of file organisation. - This type of technique is normally used for storing records for further processing Features of Serial Files 1. Easy to implement on magnetic tape. 2. Generally slow access. 3. Usually used for further processing (e.g. Sorting) of records. 4. Are used mainly as temporary files to store transaction data. 5. Is suitable for: a. Batch search servicing (group search). We can group together a number of requests and process them as a group. 6. It is not a suitable: a. On-line access because it is too slow. 2. Sequential Access - Records are stored one after the other but are sorted using a key sequence. - Records are kept in some pre-defined order e.g. Names stored alphabetically, or records stored numerically. - Retrieval is achieved by scanning the entries in the same order e.g. 001, 002, 003, 004, 005 etc, so if we want record number 200 then records 001 to199 have to be scanned first. - The principle advantage is rapid access to sets of records e.g. - If the n th record has just been accessed the (n+1) th record can be accessed very quickly. Features of Sequential Files - Records stored in pre-defined order. - Sequential access to successive records. - Suited to magnetic tape. - To maintain the sequential order updating becomes a more complicated and difficult task. - Records will usually need to be moved by one place in order to add (slot in) a record in the proper sequential order. - Deleting records will usually require that records be shifted back one place to avoid gaps in the sequence. 2

3 - Very useful for transaction processing where the hit rate is very high e.g. Payroll systems, calculating the student's grades when the whole file is processed as this is quick and efficient. - Access times are still too slow (no better on average than serial) to be useful in on-line applications. 3. Random or Direct Access - Records are accessed directly, allowing records to be read in any order. For example, to read record 005 you just jump directly to it. - You can read or write information anywhere in the file. - This implies that the medium being used allows a jump to any point in the file. In practice, this requires some form of Magnetic disk storage. - Direct addressing is not favoured if the demand is primarily for sequential processing. 4. Indexed Sequential - Similar in principle to the sequential access file. - However, it is also possible to directly access records by using a separate index file. - An indexed file system consists of a pair of files: - One holding the data - One storing an index to that data. - The index file will store the addresses of the records stored on the main file. - There may be more than one index created for a data file. - Example: A library may have its books stored on computer with: - Indices - Author, - Subject - Class mark. - There are two types of indexed files: Fully Indexed Indexed Sequential Fully Indexed Files - The file contains an entry for every single record stored on the main file. - The records will be indexed on some key e.g. Student number. 3

4 - Very large files will have correspondingly large index files. - The index to a (large) file may be split into different index levels. - When records are added to such a file, the index (or indices) must also be updated to include their relative position and change the relative position of any other records involved. Indexed Sequential Files - A mixture of sequential and indexed file organisation techniques. - Records are held in sequential order and can be accessed randomly through an index. - These files share the merits of both systems enabling sequential or direct access to the data. - The index to these files operates by storing the highest record key in given cylinders and tracks. - Indexed sequential file organisation is very useful where records are often retrieved randomly and are also processed in (sequential) key order. - Banks may use this organisation for their auto-bank machines i.e. customers randomly access their accounts throughout the day and at the end of the day the banks can update the whole file sequentially. Advantages of Indexed Sequential Files 1. Allows records to be accessed directly or sequentially. 2. Direct access ability provides vastly superior (average) access times. Disadvantages of Indexed Sequential Files 1. The fact that several tables must be stored for the index makes for a considerable storage overhead. As the items are stored in a sequential fashion this adds complexity to the addition/deletion of records. Because frequent updating can be very inefficient, especially for large files, batch updates are often performed. 5. Hash Coding - Enable direct retrieval of desired records without the need to search files or indices. - It use a hashing algorithm is first applied to one of the keys of the record (e.g. Driving licence number, student number or National Insurance number), which converts the key to an address, by mathematical or logical calculations. - Direct addressing is used when records have to be searched frequently in an unpredictable fashion. - Example, the sale of spare parts in a garage or the sale of goods in shops where details about individual items have to be made available simultaneously in a random fashion at many points (check out lanes in a supermarket). - One method is to divide the primary key by a prime number and use the remainder as the address. 4

5 - Example: suppose we have a fairly large list of student's information, the student number is the primary key. - Divide the student number with a prime number, say 97, and use the remainder as the storage location in the file. - A Student No, 1069, and divide it by 97=11 and a remainder 2, which is the location of that student record. - The remainder will be between This gives us 97 potential locations for records. - Once records are stored in this fashion, retrieval simply involves supplying a student number, which will be used by the hashing algorithm to locate the desired student record. Advantages of Hash Coding 1. Rapid access to records in a direct fashion. It doesn't make use of large index tables and dictionaries and therefore response times are very fast. Disadvantages of Hash Coding 1. Two keys can sometimes calculate to the same address. (Collision) - Example: A student number 3300, division by 97 will produce a remainder 2. However, we may already have a record (say 1069) in storage location 2. - An extra record will have to be kept in an overflow area. - So if hashing produces more than one location for each record, response time may increase because of the necessity to search the overflow area when the key if the hash address does not match the key we are looking for. 2. Storage space can be wasted if there are not enough records to occupy the reserved spaces. a. Example, if we are using 97 as the prime key there should be close to 97 records to go into these predetermined locations. If we choose to divide by 9713 there should be around 9713 records to optimise the use of storage space. Physical File Organisation - The information is initially mapped onto the physical blocks, and eventually onto the tracks and sectors of a disk. - Example: keep records of students and each student has a unique identification number that is used as a primary key field, e.g Assume that Hope only has 999 students, for a range of ID s from 001 to 999, hence the following file, will be used to demonstrate the different file organisations: Student_ ID_ Number Student_Surname George Hugh

6 Adams Murray Sinclair Patterson Cookson 1. Serial File Organisation - In order to access data within a serial file a pointer is used. 2. Sequential File Organisation - Our student files can be sorted by ID and stored on magnetic tape. In order to access record 005, Sinclair, - The R/W (read/write) head, which is positioned at the beginning of the file. - Read records 001 through to 004 first. - If we held 999 students records on file, accessing the last record would take a long time. - A preferred method would be to implement sequential file organisation on a disk but this is not possible, so direct access would be the preferred method of file storage and retrieval. 3. Random or Direct Access File Organisation Transferring the above example onto a disk would result in the following: - Added to the disk is an index, which is loaded into RAM and defines the relationship between the primary key and the corresponding disk address: 6

7 Index Record Disk Address Track Sector The index tells the disk R/W head where to look for the data (sector and track). The R/W head goes directly to the correct disk track position, waits for the correct sector to rotate under the head and then retrieves the student s record. Criteria for selecting file organisation There are four main criteria to be considered when choosing a file organisation technique: File use ratio (hit rate) File volatility File size User requirements 1. File use ratio (file activity) - File-use ratio (hit rate): If we divide the number of records that are accessed (within a specified process or period) by the total number of records in the file. - High file Ratio: The majority of records are used regularly. 7

8 - Sequential/serial file organisation may be the appropriate method. - If the ratio is low (say 5% to 10%) : the ability to retrieve a desired record quickly is crucial and therefore - Direct file organisation should be recommended: Examples: a. Payroll production: an example of a high activity file. - Organisations production of payroll and payslips is a regular event, which can be either weekly or monthly. - Such an application requires processing of all or nearly all the employee records. - The file-use ratio will be close to or equal to one (100%). - Thus sequential file organisation is preferred. b. Customer accounts in banks: an example of a medium activity file. - Both random and sequential access are required. - Several customers should be able to withdraw cash simultaneously and randomly, - The bank should be able to update all customer accounts periodically by sequential processing. - Indexed sequential file organisation may therefore be the most suited to this type of application. c. Airline ticket reservations: an example of a low activity file. - In most cases only one record is accessed at a time. - This record is required quickly and therefore direct accessing is most appropriate. Calculating the file use ratio To calculate the file use ratio we need to know the number of records accessed and the number of records in file Examples: File has 8,000 records, 250 of which are accessed and updated per week. File use ratio = 250 / 8000 = per week (very low) 4100 records are accessed per week. File use ratio = 4100 / 8000 = per week (medium) If all but 400 were accessed weekly, i.e accessed per week. Then: file use ratio = 7600 / 8000 = 0.95 per week (very high) 2. File volatility - How often files require modification and updating, e.g. Insertions and deletions. - Highly volatile files are not usually Direct Access is used, as this would entail excessive overheads in too frequently updating the index and file. - Low volatile: Indexed sequential organization is used when the data is fairly stable. 8

9 3. File size When files are large serial/sequential location techniques give longer access times. Thus large files are usually indexed or direct files. 4. User requirements How the user access the records? - Batch access files are use sequential file organisation is likely to be appropriate providing the file activity is reasonable. - Interactive Access use direct access. The type of storage device available. - Magnetic tape will only allow serial/sequential access. - Magnetic disks will use other file organizations. The ease (or complexity) of actually implementing the file organisation technique with the data concerned. Availability/features/cost of software to handle the organisation technique preferred according to other factors. A Note on Physical and Relative Addresses To retrieve records we must obviously know where they are stored. There are 2 ways of indicating the location in which they are stored: 1. Physical Addresses - Tells us the actual physical location of the record on the storage medium e.g. On a magnetic disk we would need to know the cylinder, track and sector which held the record. Physical Address Illustrated below is a disk cylinder. Records are written onto the disk starting with: Track 1 on surface 1, then Track 1 on surface 2, then Track 1 on surface 3. To expand, records could be stored as follows: Cylinder Surface Sector Record A X C A 9

10 2. Relative Addresses - Modern file organisation techniques usually use relative addressing. - The address is provided according to its position in the file and not its physical location on the storage device. - Thus the 56 th record in a file would have a logical address of 56, quite independent of its physical location. - Relative addresses must be converted to physical ones at some point for the computer to find the record. Relative Address Record File Content Files will have very different contents according to the work that they are created to assist. The number and type of users may also have an affect. We will briefly discuss 4 general possibilities: 1. Private one user files These are created to be used by one operator or one body. They often hold data for just one job. 2. Private database files - They store data for a group of related users. o Managers in an organisation. - Several programs may well operate on the same database file(s). o A student file may be used to produce student identity cards, update course/exam results and produce mail shots. 3. Public files - These are also called shared files. - They are created in order that users of a common computing service can all access each other s files either in parts or in their entirety, as specified by the producers of the files. 4. Public database files - These are also called databanks and are databases that are open to public enquiry. - They usually concentrate on a particular field such as medicine, law, finance etc. - Often they are not a free service but charge a subscription/registration fee and/or charge for usage. 10

11 Updating Files The files in an information system are classified by six functions: 1. Master File Contains permanent records that are updated by adding, deleting or editing data. 2. Transaction File Contains records of changes, additions and deletions made to a master file that may be summarised before storage in the master file. A key field is selected for sorting records in a transaction file before updating the master file. 3. Table File (Lookup file) Contains a table of static data e.g. tax rates that is referenced by one of the other types of files. 4. Report File Contains information that has been prepared by the user for display or spooling to a printer e.g. output of the maintenance run of a Pascal program. 5. Control File A small file containing file handling records. 6. History File Backup files from past runs. 7. Batch Processing In batch processing, data is stored during working hours and then copied to a secondary storage medium such as a magnetic tape or server during the evening or whenever the computer is idle. Batch processing usually requires the use of the computer or a peripheral device for an extended period of time. Once the batch job begins, it continues until it is done or until an error occurs. 11

Lecturer 4: File Handling

Lecturer 4: File Handling Lecturer 4: File Handling File Handling The logical and physical organisation of files. Serial and sequential file handling methods. Direct and index sequential files. Creating, reading, writing and deleting

More information

11. Implementation of sequential file

11. Implementation of sequential file 11. Implementation of sequential file AIM: Department maintains a student information. The file contains roll number, name, division and address. Write a program to create a sequential file to store and

More information

File Organization. Serial: Records are accessed in the order in which they were stored.

File Organization. Serial: Records are accessed in the order in which they were stored. File Organization Types of Access Serial: Records are accessed in the order in which they were stored. Sequential: Records are accessed in descending or ascending key sequence. Storage Medium: Magnetic

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Auxiliary Storage and File Organisation

Auxiliary Storage and File Organisation Lesson 6 Auxiliary Storage and File Organisation Auxiliary storage refers to storage other than the main storage (e.g. magnetic tape or direct access devices). Other names given to auxilliary storage are

More information

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory

OPERATING SYSTEM. PREPARED BY : DHAVAL R. PATEL Page 1. Q.1 Explain Memory Q.1 Explain Memory Data Storage in storage device like CD, HDD, DVD, Pen drive etc, is called memory. The device which storage data is called storage device. E.g. hard disk, floppy etc. There are two types

More information

Hashing for searching

Hashing for searching Hashing for searching Consider searching a database of records on a given key. There are three standard techniques: Searching sequentially start at the first record and look at each record in turn until

More information

Mass Storage. 2. What are the difference between Primary storage and secondary storage devices? Primary Storage is Devices. Secondary Storage devices

Mass Storage. 2. What are the difference between Primary storage and secondary storage devices? Primary Storage is Devices. Secondary Storage devices 1. What are the logical organization of a file? Mass Storage 2. What are the difference between Primary storage and secondary storage devices? Primary Storage is Devices Secondary Storage devices - Limited,

More information

The functionality. Managing more than Operating

The functionality. Managing more than Operating The functionality Managing more than Operating Remember This? What to Manage Processing CPU and Memory Storage Input and Output Devices Functions CPU - Process management RAM - Memory management Storage

More information

Topic 4: Storage Devices

Topic 4: Storage Devices Topic 4: Storage Devices 4.1 Introduction A storage device is a computer peripheral which is used to store data and programs for a specific interval of time. A computer system usually contains several

More information

Question Bank Subject: Advanced Data Structures Class: SE Computer

Question Bank Subject: Advanced Data Structures Class: SE Computer Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.

More information

UNIT 4 Device Management

UNIT 4 Device Management UNIT 4 Device Management (A) Device Function. (B) Device Characteristic. (C) Disk space Management. (D) Allocation and Disk scheduling Methods. [4.1] Device Management Functions The management of I/O devices

More information

1. What is the difference between primary storage and secondary storage?

1. What is the difference between primary storage and secondary storage? 1. What is the difference between primary storage and secondary storage? Primary Storage is - Limited - Volatile - Expensive - Fast (May be accessed directly from the CPU) - Retrieving a single character

More information

vinodsrivastava.wordpress.com

vinodsrivastava.wordpress.com vinodsrivastava.wordpress.com SECTION 3 STORAGE SYSTEM This Section you will learn about: BACK-UP STORAGE NEED OF BACK-UP ACCESSING DATA FROM STORAGE TYPE OF BACKUP(Secondary Storage) Devices o Magnetic-

More information

4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING

4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING 4.1 COMPUTATIONAL THINKING AND PROBLEM-SOLVING 4.1.2 ALGORITHMS ALGORITHM An Algorithm is a procedure or formula for solving a problem. It is a step-by-step set of operations to be performed. It is almost

More information

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition, Chapter 12: Secondary-Storage Structure, Silberschatz, Galvin and Gagne 2009 Chapter 12: Secondary-Storage Structure Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk

More information

Chapter 13 Disk Storage, Basic File Structures, and Hashing.

Chapter 13 Disk Storage, Basic File Structures, and Hashing. Chapter 13 Disk Storage, Basic File Structures, and Hashing. Copyright 2004 Pearson Education, Inc. Chapter Outline Disk Storage Devices Files of Records Operations on Files Unordered Files Ordered Files

More information

Preview. Memory Management

Preview. Memory Management Preview Memory Management With Mono-Process With Multi-Processes Multi-process with Fixed Partitions Modeling Multiprogramming Swapping Memory Management with Bitmaps Memory Management with Free-List Virtual

More information

Chapter 1 Disk Storage, Basic File Structures, and Hashing.

Chapter 1 Disk Storage, Basic File Structures, and Hashing. Chapter 1 Disk Storage, Basic File Structures, and Hashing. Adapted from the slides of Fundamentals of Database Systems (Elmasri et al., 2003) 1 Chapter Outline Disk Storage Devices Files of Records Operations

More information

Hashing. Hashing Procedures

Hashing. Hashing Procedures Hashing Hashing Procedures Let us denote the set of all possible key values (i.e., the universe of keys) used in a dictionary application by U. Suppose an application requires a dictionary in which elements

More information

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review Administrivia CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Homework #4 due Thursday answers posted soon after Exam #2 on Thursday, April 24 on memory hierarchy (Unit 4) and

More information

Computer Organization and Technology External Memory

Computer Organization and Technology External Memory Computer Organization and Technology External Memory Assoc. Prof. Dr. Wattanapong Kurdthongmee Division of Computer Engineering, School of Engineering and Resources, Walailak University 1 Magnetic Disk

More information

(Refer Slide Time 00:01:09)

(Refer Slide Time 00:01:09) Computer Organization Part I Prof. S. Raman Department of Computer Science & Engineering Indian Institute of Technology Lecture 3 Introduction to System: Hardware In the previous lecture I said that I

More information

COMPUTER SYSTEMS. Section 1

COMPUTER SYSTEMS. Section 1 COMPUTER SYSTEMS Section 1 BITS AND BYTES In order for information to flow through a computer system and be in a form suitable for processing, all symbols, pictures, or words must be reduced to a string

More information

3.1 (a) The Main Features of Operating Systems

3.1 (a) The Main Features of Operating Systems Chapter 3.1 The Functions of Operating Systems 3.1 (a) The Main Features of Operating Systems The operating system (OS) must provide and manage hardware resources as well as provide an interface between

More information

Hashing. 1. Introduction. 2. Direct-address tables. CmSc 250 Introduction to Algorithms

Hashing. 1. Introduction. 2. Direct-address tables. CmSc 250 Introduction to Algorithms Hashing CmSc 250 Introduction to Algorithms 1. Introduction Hashing is a method of storing elements in a table in a way that reduces the time for search. Elements are assumed to be records with several

More information

Managing the Database

Managing the Database Slide 1 Managing the Database Objectives of the Lecture : To consider the roles of the Database Administrator. To consider the involvmentof the DBMS in the storage and handling of physical data. To appreciate

More information

Disks and I/O Hakan Uraz - File Organization 1

Disks and I/O Hakan Uraz - File Organization 1 Disks and I/O 2006 Hakan Uraz - File Organization 1 Disk Drive 2006 Hakan Uraz - File Organization 2 Tracks and Sectors on Disk Surface 2006 Hakan Uraz - File Organization 3 A Set of Cylinders on Disk

More information

File Management. Chapter 12

File Management. Chapter 12 File Management Chapter 12 Files Used for: input to a program Program output saved for long-term storage Terms Used with Files Field basic element of data contains a single value characterized by its length

More information

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah The kinds of memory:- 1. RAM(Random Access Memory):- The main memory in the computer, it s the location where data and programs are stored (temporally). RAM is volatile means that the data is only there

More information

Chapter 11: File System Implementation. Objectives

Chapter 11: File System Implementation. Objectives Chapter 11: File System Implementation Objectives To describe the details of implementing local file systems and directory structures To describe the implementation of remote file systems To discuss block

More information

File Organisation and Data Access 3.1.2

File Organisation and Data Access 3.1.2 File Organisation and Data Access 3.1.2 Computers can store large volumes of data. The difficulty is to be able to get it back. In order to be able to retrieve data, it must be stored in some sort of order.

More information

Full file at https://fratstock.eu INTRODUCTION TO TRANSACTION PROCESSING

Full file at https://fratstock.eu INTRODUCTION TO TRANSACTION PROCESSING CHAPTER 2 2-1 OUTLINE OF CHAPTER 2 Learning Objectives An Overview of Transaction Processing Transaction Cycles The Expenditure Cycle The Conversion Cycle The Revenue Cycle Accounting Records Manual Systems

More information

Backing Storage Media

Backing Storage Media Backing Storage Media Key Words The following words will crop up as part of the following presentation. You should use your notes sheet to log information about them when it is covered. You will be quizzed

More information

Chapter 17. Disk Storage, Basic File Structures, and Hashing. Records. Blocking

Chapter 17. Disk Storage, Basic File Structures, and Hashing. Records. Blocking Chapter 17 Disk Storage, Basic File Structures, and Hashing Records Fixed and variable length records Records contain fields which have values of a particular type (e.g., amount, date, time, age) Fields

More information

Directory Structure and File Allocation Methods

Directory Structure and File Allocation Methods ISSN:0975-9646 Mandeep Kaur et al, / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 7 (2), 2016, 577-582 Directory Structure and ile Allocation Methods Mandeep Kaur,

More information

COMPUTER ARCHITECTURE AND ORGANIZATION

COMPUTER ARCHITECTURE AND ORGANIZATION Memory System 1. Microcomputer Memory Memory is an essential component of the microcomputer system. It stores binary instructions and datum for the microcomputer. The memory is the place where the computer

More information

Computer Fundamentals

Computer Fundamentals Computer Fundamentals 1 Draw the block diagram of computer architecture and explain each block. Computer is made up of mainly four components, 1) Central processing unit (CPU) 2) Input section 3) Output

More information

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage

More information

File System Interface and Implementation

File System Interface and Implementation Unit 8 Structure 8.1 Introduction Objectives 8.2 Concept of a File Attributes of a File Operations on Files Types of Files Structure of File 8.3 File Access Methods Sequential Access Direct Access Indexed

More information

CSCA0102 IT and Business Applications Chapter 7. Data and Information

CSCA0102 IT and Business Applications Chapter 7. Data and Information CSCA0102 IT and Business Applications Chapter 7 Data and Information Data and Information Data Data is raw, unorganized facts that need to be processed. Data can be something simple and seemingly random

More information

Eastern Mediterranean University School of Computing and Technology CACHE MEMORY. Computer memory is organized into a hierarchy.

Eastern Mediterranean University School of Computing and Technology CACHE MEMORY. Computer memory is organized into a hierarchy. Eastern Mediterranean University School of Computing and Technology ITEC255 Computer Organization & Architecture CACHE MEMORY Introduction Computer memory is organized into a hierarchy. At the highest

More information

Free Space Management

Free Space Management CSC 4103 - Operating Systems Spring 2007 Lecture - XVI File Systems - II Tevfik Koşar Louisiana State University March 22 nd, 2007 1 Free Space Management Disk space limited Need to re-use the space from

More information

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now? CPS104 Computer Organization and Programming Lecture 18: Input-Output Robert Wagner cps 104.1 RW Fall 2000 Outline of Today s Lecture The system Magnetic Disk Tape es DMA cps 104.2 RW Fall 2000 The Big

More information

Database Technology. Topic 7: Data Structures for Databases. Olaf Hartig.

Database Technology. Topic 7: Data Structures for Databases. Olaf Hartig. Topic 7: Data Structures for Databases Olaf Hartig olaf.hartig@liu.se Database System 2 Storage Hierarchy Traditional Storage Hierarchy CPU Cache memory Main memory Primary storage Disk Tape Secondary

More information

What is Data Storage?

What is Data Storage? What is Data Storage? When we talk about storing data, we mean putting the data in a known place. We can later come back to that place and get our data back again. Writing data or saving data are other

More information

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory

Contents. Memory System Overview Cache Memory. Internal Memory. Virtual Memory. Memory Hierarchy. Registers In CPU Internal or Main memory Memory Hierarchy Contents Memory System Overview Cache Memory Internal Memory External Memory Virtual Memory Memory Hierarchy Registers In CPU Internal or Main memory Cache RAM External memory Backing

More information

FACTFILE: GCE DIGITAL TECHNOLOGY

FACTFILE: GCE DIGITAL TECHNOLOGY FACTFILE: GCE DIGITAL TECHNOLOGY AS2: FUNDAMENTALS OF DIGITAL TECHNOLOGY Hardware and Software Architecture 2 Learning Outcomes Students should be able to: explain the need for secondary storage; describe

More information

EIDE, ATA, SATA, USB,

EIDE, ATA, SATA, USB, Magnetic disks provide bulk of secondary storage of modern computers! Drives rotate at 60 to 200 times per second! Transfer rate is rate at which data flow between drive and computer! Positioning time

More information

OPERATING SYSTEM. Chapter 12: File System Implementation

OPERATING SYSTEM. Chapter 12: File System Implementation OPERATING SYSTEM Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management

More information

Chapter 12. File Management

Chapter 12. File Management Operating System Chapter 12. File Management Lynn Choi School of Electrical Engineering Files In most applications, files are key elements For most systems except some real-time systems, files are used

More information

lesson 3 Transforming Data into Information

lesson 3 Transforming Data into Information essential concepts lesson 3 Transforming Data into Information This lesson includes the following sections: How Computers Represent Data How Computers Process Data Factors Affecting Processing Speed Extending

More information

File Management By : Kaushik Vaghani

File Management By : Kaushik Vaghani File Management By : Kaushik Vaghani File Concept Access Methods File Types File Operations Directory Structure File-System Structure File Management Directory Implementation (Linear List, Hash Table)

More information

Chapter 1 Computer System Overview

Chapter 1 Computer System Overview Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Ninth Edition By William Stallings Operating System Exploits the hardware resources of one or more processors Provides

More information

The physical database. Contents - physical database design DATABASE DESIGN I - 1DL300. Introduction to Physical Database Design

The physical database. Contents - physical database design DATABASE DESIGN I - 1DL300. Introduction to Physical Database Design DATABASE DESIGN I - 1DL300 Fall 2011 Introduction to Physical Database Design Elmasri/Navathe ch 16 and 17 Padron-McCarthy/Risch ch 21 and 22 An introductory course on database systems http://www.it.uu.se/edu/course/homepage/dbastekn/ht11

More information

Storage Systems. Storage Systems

Storage Systems. Storage Systems Storage Systems Storage Systems We already know about four levels of storage: Registers Cache Memory Disk But we've been a little vague on how these devices are interconnected In this unit, we study Input/output

More information

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers

LECTURE SCHEDULE 2. Units of Memory, Hardware, Software and Classification of Computers LECTURE SCHEDULE 2 Units of Memory, Hardware, Software and Classification of Computers Units of Memory The memory unit is the principal storage of the computer. All the data and instructions that the computer

More information

Hashing Techniques. Material based on slides by George Bebis

Hashing Techniques. Material based on slides by George Bebis Hashing Techniques Material based on slides by George Bebis https://www.cse.unr.edu/~bebis/cs477/lect/hashing.ppt The Search Problem Find items with keys matching a given search key Given an array A, containing

More information

DATA STRUCTURES AND ALGORITHMS

DATA STRUCTURES AND ALGORITHMS DATA STRUCTURES AND ALGORITHMS Sorting algorithms External sorting, Search Summary of the previous lecture Fast sorting algorithms Quick sort Heap sort Radix sort Running time of these algorithms in average

More information

Lecture 18: Memory Systems. Spring 2018 Jason Tang

Lecture 18: Memory Systems. Spring 2018 Jason Tang Lecture 18: Memory Systems Spring 2018 Jason Tang 1 Topics Memory hierarchy Memory operations Cache basics 2 Computer Organization Computer Processor Memory Devices Control Datapath Input Output So far,

More information

SUMMARY OF DATABASE STORAGE AND QUERYING

SUMMARY OF DATABASE STORAGE AND QUERYING SUMMARY OF DATABASE STORAGE AND QUERYING 1. Why Is It Important? Usually users of a database do not have to care the issues on this level. Actually, they should focus more on the logical model of a database

More information

Chapter 2 Introduction to Transaction Processing

Chapter 2 Introduction to Transaction Processing Chapter 2 Introduction to Transaction Processing TRUE/FALSE 1. Processing more transactions at a lower unit cost makes batch processing more efficient than real-time systems. T 2. The process of acquiring

More information

MEMORY. Objectives. L10 Memory

MEMORY. Objectives. L10 Memory MEMORY Reading: Chapter 6, except cache implementation details (6.4.1-6.4.6) and segmentation (6.5.5) https://en.wikipedia.org/wiki/probability 2 Objectives Understand the concepts and terminology of hierarchical

More information

File system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems

File system internals Tanenbaum, Chapter 4. COMP3231 Operating Systems File system internals Tanenbaum, Chapter 4 COMP3231 Operating Systems Architecture of the OS storage stack Application File system: Hides physical location of data on the disk Exposes: directory hierarchy,

More information

DATA STRUCTURES USING C

DATA STRUCTURES USING C DATA STRUCTURES USING C File Management Chapter 9 2 File Concept Contiguous logical address space Types: Data numeric character binary Program 3 File Attributes Name the only information kept in human-readable

More information

CPSC 421 Database Management Systems. Lecture 11: Storage and File Organization

CPSC 421 Database Management Systems. Lecture 11: Storage and File Organization CPSC 421 Database Management Systems Lecture 11: Storage and File Organization * Some material adapted from R. Ramakrishnan, L. Delcambre, and B. Ludaescher Today s Agenda Start on Database Internals:

More information

File Systems. ECE 650 Systems Programming & Engineering Duke University, Spring 2018

File Systems. ECE 650 Systems Programming & Engineering Duke University, Spring 2018 File Systems ECE 650 Systems Programming & Engineering Duke University, Spring 2018 File Systems Abstract the interaction with important I/O devices Secondary storage (e.g. hard disks, flash drives) i.e.

More information

Memory. Objectives. Introduction. 6.2 Types of Memory

Memory. Objectives. Introduction. 6.2 Types of Memory Memory Objectives Master the concepts of hierarchical memory organization. Understand how each level of memory contributes to system performance, and how the performance is measured. Master the concepts

More information

Information Technology Training Package ICA99

Information Technology Training Package ICA99 The Components of a Computer System The basic components of the computer have not varied since the earliest computers were made in the early 1950 s. The only real changes have been in the number and variety

More information

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 4. FILE SYSTEM AND SECONDARY STORAGE File system provides the mechanism for storage of data and access to data

More information

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2. BASIC ELEMENTS Simplified view: Processor Slide 1 Computer System Overview Operating Systems Slide 3 Main Memory referred to as real memory or primary memory volatile modules 2004/S2 secondary memory devices

More information

Chapter 11: Implementing File-Systems

Chapter 11: Implementing File-Systems Chapter 11: Implementing File-Systems Chapter 11 File-System Implementation 11.1 File-System Structure 11.2 File-System Implementation 11.3 Directory Implementation 11.4 Allocation Methods 11.5 Free-Space

More information

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems Chapter 11: Implementing File Systems Operating System Concepts 99h Edition DM510-14 Chapter 11: Implementing File Systems File-System Structure File-System Implementation Directory Implementation Allocation

More information

Computer Organization. Chapter 12: Memory organization

Computer Organization. Chapter 12: Memory organization Computer Organization Chapter 12: Memory organization Memory Organization Recall: Information is stored in the memory as a collection of bits. Collection of bits that are stored or retrieved simultaneously

More information

CS10001: Computer Literacy Homework Assignment #1

CS10001: Computer Literacy Homework Assignment #1 CS10001: Computer Literacy Homework Assignment #1 Name: Due Date: September 22, 2008 Question 1A: Virtual Computer Tour Once the cover is off, the jumble of circuit boards, cables, and components inside

More information

Mass-Storage Systems

Mass-Storage Systems CS307 Mass-Storage Systems Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2018 The First Commercial Disk Drive 1956 IBM RAMDAC computer included the IBM Model

More information

File-System Structure. Allocation Methods. Free-Space Management. Directory Implementation. Efficiency and Performance. Recovery

File-System Structure. Allocation Methods. Free-Space Management. Directory Implementation. Efficiency and Performance. Recovery CHAPTER 11: FILE-SYSTEM IMPLEMENTATION File-System Structure Allocation Methods Free-Space Management Directory Implementation Efficiency and Performance Recovery Operating System Concepts, Addison-Wesley

More information

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed:

Initial Bootloader. On power-up, when a computer is turned on, the following operations are performed: Initial Bootloader Introduction On power-up, when a computer is turned on, the following operations are performed: 1. The computer performs a power on self test (POST) to ensure that it meets the necessary

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods Free-Space Management Efficiency

More information

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition, Chapter 12: Mass-Storage Systems, Silberschatz, Galvin and Gagne 2009 Chapter 12: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management

More information

Overview of Mass Storage Structure

Overview of Mass Storage Structure CSC 4103 - Operating Systems Spring 2008 Lecture - XVIII Mass Storage & IO Tevfik Ko!ar Louisiana State University April 8th, 2008 1 Overview of Mass Storage Structure Magnetic disks provide bulk of secondary

More information

Disks, Memories & Buffer Management

Disks, Memories & Buffer Management Disks, Memories & Buffer Management The two offices of memory are collection and distribution. - Samuel Johnson CS3223 - Storage 1 What does a DBMS Store? Relations Actual data Indexes Data structures

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 11: File System Implementation Prof. Alan Mislove (amislove@ccs.neu.edu) File-System Structure File structure Logical storage unit Collection

More information

CSC 553 Operating Systems

CSC 553 Operating Systems CSC 553 Operating Systems Lecture 1- Computer System Overview Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users Manages secondary memory

More information

Chapter 10: File System Implementation

Chapter 10: File System Implementation Chapter 10: File System Implementation Chapter 10: File System Implementation File-System Structure" File-System Implementation " Directory Implementation" Allocation Methods" Free-Space Management " Efficiency

More information

Introduction to OS. File Management. MOS Ch. 4. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1

Introduction to OS. File Management. MOS Ch. 4. Mahmoud El-Gayyar. Mahmoud El-Gayyar / Introduction to OS 1 Introduction to OS File Management MOS Ch. 4 Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Mahmoud El-Gayyar / Introduction to OS 1 File Management Objectives Provide I/O support for a variety of storage device

More information

CPS352 Lecture - Indexing

CPS352 Lecture - Indexing Objectives: CPS352 Lecture - Indexing Last revised 2/25/2019 1. To explain motivations and conflicting goals for indexing 2. To explain different types of indexes (ordered versus hashed; clustering versus

More information

4. The portion of the monthly bill from a credit card company is an example of a turn-around document.

4. The portion of the monthly bill from a credit card company is an example of a turn-around document. Chapter 2 Introduction to Transaction Processing Introduction to Accounting Information Systems, 8e Test Bank, Chapter 2 TRUE/FALSE 1. Processing more transactions at a lower unit cost makes batch processing

More information

Adminsoft Accounts Basic User Guide - Installation

Adminsoft Accounts Basic User Guide - Installation Running the Downloaded File We always recommend you download Adminsoft Accounts from our web site: www.adminsoftware.biz That way, we know the file you have just downloaded is clean, and only contains

More information

STORING DATA: DISK AND FILES

STORING DATA: DISK AND FILES STORING DATA: DISK AND FILES CS 564- Spring 2018 ACKs: Dan Suciu, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? How does a DBMS store data? disk, SSD, main memory The Buffer manager controls how

More information

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD.

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD. File System Implementation FILES. DIRECTORIES (FOLDERS). FILE SYSTEM PROTECTION. B I B L I O G R A P H Y 1. S I L B E R S C H AT Z, G A L V I N, A N

More information

UNIT:4 MEMORY ORGANIZATION

UNIT:4 MEMORY ORGANIZATION 1 UNIT:4 MEMORY ORGANIZATION TOPICS TO BE COVERED. 4.1 Memory Hierarchy 4.2 Memory Classification 4.3 RAM,ROM,PROM,EPROM 4.4 Main Memory 4.5Auxiliary Memory 4.6 Associative Memory 4.7 Cache Memory 4.8

More information

Chapter 6A. Describing Storage Devices. Describing Storage Devices. Types of Storage Devices. Store data when computer is off Two processes

Chapter 6A. Describing Storage Devices. Describing Storage Devices. Types of Storage Devices. Store data when computer is off Two processes Chapter 6A Types of Storage Devices Describing Storage Devices Store data when computer is off Two processes Writing data Reading data 2 Describing Storage Devices Storage terms Media is the material storing

More information

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture) Dept. of Computer Science & Engineering Chentao Wu wuct@cs.sjtu.edu.cn Download lectures ftp://public.sjtu.edu.cn User:

More information

Physical Disk Structure. Physical Data Organization and Indexing. Pages and Blocks. Access Path. I/O Time to Access a Page. Disks.

Physical Disk Structure. Physical Data Organization and Indexing. Pages and Blocks. Access Path. I/O Time to Access a Page. Disks. Physical Disk Structure Physical Data Organization and Indexing Chapter 11 1 4 Access Path Refers to the algorithm + data structure (e.g., an index) used for retrieving and storing data in a table The

More information

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition

Chapter 12: File System Implementation. Operating System Concepts 9 th Edition Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications

Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications Computer-System Architecture (cont.) Symmetrically Constructed Clusters (cont.) Advantages: 1. Greater computational power by running applications concurrently on all computers in the cluster. Disadvantages:

More information

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont.

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont. Computer Systems Architecture CMSC 4 Unit 6 Storage Systems Alan Sussman November 23, 2004 Storage systems We already know about four levels of storage: registers cache memory disk but we've been a little

More information

Hashing IV and Course Overview

Hashing IV and Course Overview Date: April 5-6, 2001 CSI 2131 Page: 1 Hashing IV and Course Overview Other Collision Resolution Techniques 1) Double Hashing The first hash function determines the home address If the home address is

More information

Chapter 12: File System Implementation

Chapter 12: File System Implementation Chapter 12: File System Implementation Silberschatz, Galvin and Gagne 2013 Chapter 12: File System Implementation File-System Structure File-System Implementation Directory Implementation Allocation Methods

More information