1 / 19

The Functions of Operating Systems

The Functions of Operating Systems . Desktop PC Operating Systems. Learning Objectives. Describe the main components of a typical desktop PC operating system. Define the terms boot file and a file allocation table (FAT). . Main components of a typical desktop PC operating system . HCI

ashling
Download Presentation

The Functions of Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Functions of Operating Systems Desktop PC Operating Systems

  2. Learning Objectives • Describe the main components of a typical desktop PC operating system. • Define the terms boot file and a file allocation table (FAT).

  3. Main components of a typical desktop PC operating system • HCI • Type / allow communication. • Utility programs • Routines that the OS makes available to the user. • Hardware control/Input and Output • Software routines to control the hardware/device drivers • Multi tasking capability • Allows different Windows/user can carry on more than one task at a time. • Spooling • Queue jobs for input / printing / …

  4. Main components of a typical desktop PC operating system • Security • Ensure that different users can keep files confidential. • Host software • Scheduler to schedule instructions. • Memory management • To allocate memory to data/software. • Interrupt handling • Schedule jobs through the system. • Translators • Produce object code.

  5. Boot Program • A file containing commands to automatically configure a personal computer on start up. • Stored on the ROM as it is unchangeable. • Power-up process: • POST (power on self-test) • http://en.wikipedia.org/wiki/Power-on_self-test • The boot program then retrieves user-defined / configurable / changeable parameters stored in the boot file / Basic Input Output System (BIOS) and uses them to configure the system. • Note the BIOS in a PC is also known as autoexec.bat or config.sys. • Finally it loads the first instruction of the operating system into memory.

  6. Format • A routine that is part of the OS which enables the OS to store and search for files in sectors on a disk. • Disk Structure • (A) Track • (B) Geometrical or mathematical Sector • (C) Track Sector / Computing Sector / Disk Sector • (D) Cluster • 2 or more track sectors.

  7. Sector/ Disk sector • The word ‘sector’ in computing is used to mean a ‘track sector’. • Mathematically a sector is a ‘slice of the pie’ but in computing a sector means a ‘track sector’. • A sector is the smallest physical / accessible amount of data on a medium. • It is possible to think of a sector as a block but the word block in computing means data chunks of varying sizes in data streams so it is not used here.

  8. Clusters • A unit of disk space allocated for files and directories. • The smallest logical amount of disk space that can be allocated to hold a file. • Large clusters means small files will waste disk space called ‘slack space’. • However, large cluster sizes reduces bookkeeping overhead and fragmentation, which may improve reading and writing speed overall. • So a balance is required usually meaning that a cluster is around the size of an average file.

  9. File Allocation Table (FAT) • Enables the OS to find files on a disk and to be able to store user's files. • i.e. Maintain and manage disk space used for file storage. • Uses a linked list to point to the blocks on the disk that contain files.

  10. A typical FAT Root Directory table

  11. File Allocation Table (FAT)(map to each cluster on the volume) • The first column gives the cluster number and the second column is a pointer to the next cluster used to store a file. • The last cluster used has a null pointer (usually FFFFH) to indicate the end of the linking. • The directory entry for a file has a pointer to the first cluster in the FAT table. • The diagram shows details of two files stored on a disk. • Note the actual contents of each cluster (the ‘parts’ of each file) is not shown here. Only the pointer to the next ‘part’ of the file.

  12. Storage Clusters on a disk • In order to find a file, the OS looks in the directory for the filename and, if it finds it, the OS gets the cluster number for the start of the file. • The OS can then follow the pointers in the FAT to find the rest of the file.

  13. Opening a file Find the filename in the FAT Root Directorytable. Look up the Starting Cluster. Go to that cluster and retrieve the data. Go to the FAT table and find the starting cluster and then look up the Pointer Cluster. Go to that cluster and retrieve the data (combining it with previous data for the file). Repeat steps 3 – 5 until a null pointer is found (which indicates the end of the file).

  14. File Allocation Table (FAT) • Unused clusters have a zero entry pointer. • When a file is deleted, the clusters that were used to save the file are set to zero pointer. • In order to store a new file, the OS finds the first cluster with a zero pointer entry and enters the cluster number in the directory table. • OS searches linearly for clusters with zero pointer entries to set up the linked list (entering the pointer to the next cluster in the previously used cluster entry in the FAT table).

  15. Speed • Using linear searches will take a long time. • However, the FAT table is normally loaded into RAM so that continual disk accesses can be avoided. • Speeds up the search of the FAT.

  16. Plenary • What is a boot file and a file allocation table (FAT)?

  17. Plenary • A boot file: • A file containing commands to automatically configure a personal computer on start up. • A file allocation table (FAT): • A list held on disk by an operating system to maintain and manage disk space used for file storage.

  18. Plenary • How does a PC operating system use a file allocation table to store and find files when necessary?

  19. Plenary • The disk surface must be divided up into small areas. • Files are stored in these small areas. • Each file will normally use more than one area • The table of files has an entry pointing to the first area on the disk surface used by that file and a pointer to the next area. • Each subsequent area has a pointer to the next area, as in a linked list with a null value to signify the end of the file.

More Related