Operating System

Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 5

8.

Operating system Applications

Overview of operating system tasks


The OS manages input and output devices by:
 Communicating with and receiving data input from a keyboard, mouse etc. Operating system
 Communicating with and sending data output to a printer, monitor, etc.
The OS manages spooling by:
 Storing data on hard disc, in memory, in a queue or in a buffer.
The OS manages the backing store by: Hardware
 Ensuring that data is stored and can be retrieved correctly from any disc drive
 Maintaining a filing system such as FAT or NTFS
 Organising files in a hierarchical directory structure.
Hardwar
The OS manages memory (RAM) by:
 Ensuring all programs and data, including itself, are stored in correct memory locations
 Ensuring all programs and data have enough memory allocated
 Utilising virtual memory when there is not enough memory available to run a program.
The OS manages processes by:
 Ensuring that different processes can utilise the CPU and do not interfere with each
other or crash
 Ensuring that all tasks appear to run simultaneously on a multi-tasking OS.

Interface
 Provides user with meaningful icons, avoid text input or drop-down menus
 Can provide a command line interface
 Allows customisation of interface like change desktop colours or layout
 Allows access to system settings such as hardware
 Allows copying, deleting, moving, sorting or searching of files or folders
 Allows creation of shortcuts
 Controls security using passwords or access permissions
 Allows user to have more than one window open or switch between tasks (programs,
windows)
 Provides user with error or warning or help messages

Managing backing stores


Storage devices (sometimes called backing store) all have the same goal, which is the saving and
loading of data. How they store that data, however, differs from device to device and even from
system to system. There are many different ways, known as file systems, to store files. All
storage devices will flatten out the data and remove directory information as the OS manages
this information. Therefore, it is the job of the OS to provide mechanisms for creating a
hierarchical directory structure.
Journaling is a fault tolerance system that is designed to prevent inconsistent states in the case
of failure. Journaling is done in two ways. The first is known as meta-journaling where all
operations are recorded in a journal (or log) before being committed to the hard drive. For
example, if you are going to delete a folder, the journal will make a note of this. lithe system
crashes halfway through the delete then the journal can be consulted to see what state the hard
drive should be in. The changes can then be made later. The biggest restriction on meta-
journaling is that it doesn't store the data that needs to be saved. Thus, if a save fails, there is
still a chance of data corruption.
Block journaling will store the data to be saved in the journal before committing it to the hard
drive. This means that data must be saved twice, which has a clear performance penalty.
However, block journaling offers the most fault tolerance as, if a write fails, the data can simply
be copied from the journal back onto the hard drive, which means that the file will not be
corrupted. If a file write fails to add data to the journal then the data is lost but there will be no
file corruption.
Setting a file attribute to read-only is when the user should not be able to alter the file.
Setting a file attribute to archive is when the file no longer in regular use but may be required
sometime in the future. (a legal document or tax records that have to kept for a minimum
number of years)
Setting a file attribute to system is when the file is only used by the operating system. (a device
driver)
Setting a file attribute to hidden is when the user should not be able to see the file (many files
are hidden in Windows as the user cannot view or amend them if you view certain directories)

File allocation table


The file allocation table (FAT) will store the locations of all files on the hard drive. It will also
store meta-data about the file, which includes:
 File name
 Creation date or modified date
 Start sector of the file (address of the first sector)
 File access rights
 Size of the file.
The hard disc is circular and split into tracks. Tracks start from the middle of the disc and grow
outwards in circles. A sector is the smallest unit of storage on the hard drive and tends to be
determined by the physical size of the drive. Due to the sheer number of sectors on a hard drive,
the file system will group sectors into a cluster. The FAT will store the location of the first sector
of each file. As a file could be bigger than a single sector, the file will need to be split over
multiple sectors. These sectors will be stored as a linked list, with each sector pointing to the
next. The final sector will point to NULL to show that it is the end of the file. This way files can
take up many sectors, but the FAT does not have to record every single sector for every file. This
has the massive advantage of making the FAT much smaller, but it does mean that files will have
to be read in a linear fashion. This is why you have a file pointer when writing file access code
that deals with files. Random access of files is only possible once all sectors of a file are known
and the software has cached them. Figure 15.3 shows how sectors can be linked together to
form a single file. Files that are stored in a continuous cluster (all sectors on the same track) can
be read without moving the read head of the drive. The speed of reading files is determined by
how fast the disc spins (measured in revolutions per minute, RPM) and how fast the read head
can swap tracks. These speeds determine the time taken for the required sector to come under
the read head again (known as the seek time). lithe head has to move then the disc may have to
make another full turn before the data comes under the read head. If this has to happen more
than once then the overall read time will be increased. Files that have their sectors in non-
continuous dusters are referred to as being fragmented.

Over time, files will become fragmented and stored in non-continuous clusters. This is especially
prevalent if the hard drive is almost full, as it will be harder for the OS to pick continuous
clusters of free space in which to save files. Holes will appear where data has been removed or
modified. This means the more data the hard drive stores, the more chance that files will
become fragmented. This is why you may notice a performance drop on a computer with a hard
drive nearing capacity. The hard drive will have no built-in concept of a directory structure:
directories are managed solely by the OS. This is because directory structures can differ greatly
between different operating systems. For example, Windows has "drives" while Linux and Mac
only have a single folder structure. Devices are treated as folders and mounted in the /media/
folder while Windows will allocate a new drive letter to each device. This may be a simplistic
overview of some of the differences, but it is enough to highlight that there is not one standard
way of dealing with directories. The OS, therefore, must manage directories itself. It does this by
creating a special file that represents a folder. A folder file will store the following pieces of data
like links to other folder files to create the directory structure, a list of files stored in that folder
and permissions and other meta-data.
The root folder, which is the first folder you encounter when you browse to your hard. drive, has
a special link stored in the FAT. That way the OS can always find it. Directories are given a special
flag so the OS is aware that it must handle that file as a directory.

Utility software
A utility program is designed to perform a commonplace task like transferring data from one
storage device to another, managing the computer's tasks or combatting viruses. Utility
software normally comes bundled with your OS, but can also be installed separately.
File manager utility
File management software enables the user to do simple file manipulation; on its own, it
accomplishes very little. The tasks file management software can perform are:
 Move files from one directory to another
 Copy files
 Rename files
 List directory contents.
File management software cannot open files, as this is the responsibility of the application
associated with the file. Docx file type is associated with Microsoft Word, which will usually be
invoked when a file of this type is double clicked though the user may designate a different
application for this.
Compression software
Compression software is used to compress files to reduce their overall size. When a file has been
compressed, it is very close to the minimum size it can be before losing data. Compressing an
already compressed file does not result in any further reduction in file size. This is because of
the way compression algorithms work and the mathematical theory that underpins them. When
a file is compressed, it becomes unreadable by other software until it is decompressed by the
utility originally used to compress it. This is true for any compression utility. This kind of file
compression is lossless: it retains all the file details, names and folder structures. When the file
is decompressed, the exact original file, byte for byte, will be reproduced. A number of files and
folders can be compressed together.
Task managers
Task managers allow the user to view the processes currently running on a system and see what
resources each one is using. This is useful information when trying to find bottlenecks in a
system or when killing unresponsive processes. On Mac, the utility is called Activity Monitor.
Anti-virus software
A virus is malicious code that can infect and spread itself though a user's email, secondary
storage drives and social networks. Once a virus has infected a system, it can install software to
open up a back door for a hacker, monitor a user's keystrokes or simply just wipe (delete) files.
Viruses are commonly used by criminal gangs to create armies of infected PCs known as botnets.
A criminal can employ botnets to launch denial-of-service attacks and send spam emails. Botnets
may be rented out to the highest bidder. Anti-virus utility software can help to protect the user
against these threats. It scans every file and all the memory on the user's system, looking for
evidence of viruses and similar malware. It has a large database of virus signatures, which it can
compare to your files. It also monitors suspicious activity and informs the user if it detects
anything untoward. When a virus is found, it can try to remove it, delete it or quarantine the file.
Backup software
It allows users to archive files and delete files on the hard disk to free up space.
Real time transaction processing
 Could be used by a theatre selling tickets
 When record is accessed, other users are locked out
 The record is updated immediately avoids double booking

Real time control processing


 Could be used to control temperature
 Continuously monitoring
 Inputs are processed immediately
 Output is adjusted immediately
 Accidents can be avoided or states such as temperature can be maintained
 Whole system can be automated with a few operatives monitoring

Batch processing
 Could be used to produce electricity bills or payroll or scanning of OCR sheets
 Collecting all the data which can then be used with the billing application to produce the
bills
 Can be carried out overnight without any further human intervention / resources
available
 Explanation of master update with transaction
 Jobs can wait in a queue until they are processed

You might also like