Microsoft Windows
Linux
Apple Macintosh MAC OS
2. Identify and fully describe the main purposes of an operating system. All components of the operating system are required to be covered, to clearly show an understanding of what each component does and how they ‘fit’ into the overall system design.
Process Management
Process management is a way of tracking processes and managing them in such a way that there is enough processor resources to correctly function.
Process is another word for a task that is to be performed by the computer. Along with a process is a set of information about the particular process.
The information required to track these processes are stored in a data package called a ‘Process Control Block (PCB).
The process control block contains the following information about a process:
- An identification number that uniquely identifies the process
- Owner ID – An identification of the user/device who the process belongs to
- Priority – A number to represent its priority to the system
- Status – What its current state is. This is 1 of 3 states (Ready, Waiting, Running)
- Units of Processor Time Used
- Resources waiting for – for example paper for the printer.
- Link to Another PCB –
- Registers – the registers the process has contents in.
An example of a PCB is shown below: this is for a print job
A Processes state is diagrammatically shown below, this shows state transition and how it works.
A process can be in one of five states; these five states are as follows:
Deadlocks
Deadlocks occur when a multiple number of processes fight for very little resources available from the processor.
For example one process has been granted the allocation of the modem, however is waiting for a text file, but process two has the text file and is waiting for the modem. In this instance each process will not gather the resources required because they have been allocated to another process, this is where a deadlock occurs.
Process Management in an operating system has the job to destroy one of the processes to allow for one of the processes to be put in the ‘ready’ queue.
Scheduling
Scheduling is a method in the operating system that allows processes to enter the ready queue allowing them to then take execution.
The strategies used to take these processes and allow them to be ready for execution are as follows:
- Process the maximum amount of jobs.
- Sharing out processing time equally to users
- Providing acceptable response times, this is in the form of not running intensive programs while users are logged on to the system.
- Keeping devices as busy as possible.
- Attempting to gradually freeing up of processes, instead of crashing.
- Avoid Deadlocking
Scheduling is comprised of three sections:
1 – Long Term Scheduling – this is where processes are batched together, when the resources and space are free the process is then executed. This type of scheduling is used for jobs like heavy overnight print jobs.
2 – Mid-Term Scheduling – this is where a decision is made as to whether the processor is to busy for the amount of processes attempting to use it, the decision can be then fixed by terminating processes. When the system is free again the process can be re-executed.
3 – Short Term Scheduling is a where the next process is selected from the ready queue; it uses algorithms to do this.
Shortest burst time - being the time spent running before the process will have to wait before an input or output operation.
Shortest remaining time is the processes that have very little time left; this inevitably allows space for another process to execute.
Priority scheduling - a control that allow special circumstance processes to execute through the system quickly.
Round robin - limits the time a process is allowed to run before it is removed, it is then placed back in the ready queue.
Memory Management
Memory is an area in which data and instructions are stored. These operations must be managed by an operating system in order for the system to be stable and to run fluently.
Memory management within an operating system must ensure that a process has enough memory to run, ensuring it does not go in to another processes slot as this causes corruption. This management is a way of protecting memory from becoming unstable.
Memory management is also responsible for using the computers other memory sources effectively, to ensure programs run smoothly and effectively.
This is handled by using virtual memory; using the hard disc drive as a temporary memory source for processes and data.
This can benefit the user in various ways:
- The user is not rigidly restricted to space available. Using a large virtual memory space provides convenience for instances where large programs etc. are required to be stored in memory.
- Users are using less physical memory; therefore the system can handle more users on the system.
High Speed Cache is a fast memory storage; cache predicts the data that the CPU may need next, it then retrieves it from RAM and places it in to the high speed cache, this speeds up system performance, as cache is a lot faster than RAM is in providing for the processor.
The operating systems task is to control an even flow of the processes and decide where they should go practically, moving processes to the best location as the scheduler asks it to do so. This scheduler knows what process is next in line therefore can tell memory it is next and to move it to a suitable location for it to be quickly accessed.
Paging
Paging is a method used in operating systems to make a program’s memory non-contiguous, in simple terms; allowing a program to be allocated to any memory location available.
This is used when a bulk of data is bigger than the memory allocation it has been given; it firstly fills the memory allocation provided, and then stores the rest of the data in any space available in memory. This method of splitting the data is known as ‘Fragmentation’.
This decreases system performance.
Defragmentation
To enhance the performance of the memory of a secondary storage medium, the operating system runs an operation called ‘Defragmentation’.
Defragmentation is a process that sorts data in to a contiguous sequence. If a non-contiguous set of data is found, it will be relocated and stored as a whole.
The image above is an illustration to show pictorially how a storage device could look in a data structure.
As you can see fragmented files are scattered. If this data was attempted to be retrieved it would be slower feedback to the user as the data has been fragmented and would have to be found first.
If data is to be found quickly and retrieved without a problem, the diagram below shows how a data structure should pictorially look. The image shows a contiguous data structure, with no fragmented files. This is the idea state for a system to be operated under.
File and Disk Management
TALK ABOUT HOW MEMORY IS STORED – i.e.
CONTIGIOUS - Blocks of data are assigned in a complete row, using this method the files are simple to access.
The space must be large enough to store all the data
Files may become larger, therefore the space may be too small in the future, then it will need relocating (moved)
This then causes fragmentation of the storage device.
, NON CONTIGIOUS
Files are recognised by operating systems and worked upon by using file extensions.
A file consist of two parts, one being the unique name to the user, second being the file extension related to the program that runs that type of file.
The operating system recognises exactly which program to open when the file is run.
The way that files and data are managed, is critical to the performance of the computer and the security of the data.
File management within an operating system provides a logical way for the user to observe there data, instead of having the complication of the physical implementation.
Operating systems main job in this area is to ensure that data is stored and relocated correctly, as well as having the responsibility to process files, find space to store them, and to retrieve this data at any time.
For example a .PDF file when run will be recognised by the operating system to be open in Adobe Acrobat Reader, providing the program is installed on the computer.
An operating system can perform several different tasks towards files, they are as follows:
Files are a collection of saved information that is stored on a type of storage medium for later retrieval.
File attributes are the information related to the file, just like we have information related to ourselves, i.e. telephone number and home address.
A files attributes are vital in order for the operating system to create a file structure system, it does this by using the attributes to sort the files in to some kind of order.
For computer data files there are a set of minimum attributes related to them, they are as follows:
Directories
Directories are a hierarchical way of separating these files; directories simply make it simpler for users to relocate the file at another time.
The root is the top directory of a file system; the root is determined by the operating system.
The root directory is usually the bootable device on a home computer system. Commonly C:
Paths are a list of directories that the operating system goes through to find a run able file. For example: C:\windows\cdplayer.exe
The operating system will go in to the ‘root’ and then in to the directory ‘Windows’ the file named ‘cdplayer.exe’ will then be located and executed.
Tree Structure – are of a hierarchical nature, therefore the top level is the root of the directory and every other sub directory from which all other directories stem off.
A Backslash is used to separate and indicate directories within directories (sub directories)
Directories allow a method for the operating system to easy locate files.
Volumes are a fixed amount of storage space allocated on a device. If a hard disc drive has two partitions set up, then it is said to have ‘two’ volumes because it has two separate fixed storage spaces.
Formatting a device in turn means to prepare it for read and write access. It does this by wiping all drive information that has been pre-set, it then tests each sector of the disc to ensure they are reliable enough for read and writing in and out of.
File Allocation Techniques
FAT (File Allocation Table) 32
Located on the storage device, basically holds the relevant information in a table, to find the data on the disk. its security does not measure up to that of NTFS and its filename size constraint is poor to that of NTFS.
Searches from top to bottom when looking for a file.
Contains the first block of each file on the disk,
Requires a tremendous amount of space
NTFS (New Technology File System)
Used in Windows NT based operating systems
Uses a similar table to that of FAT32 to keep track of file locations
Looks at directory structure from the side to help speed up the location of files
Uses Link Listed Allocation.
Linked allocation creates inked lists using disk sectors as nodes. For example, if the sector size is 512 bytes, and it takes a 32 bit number to represent the next block address, then only 508 bytes can be used to store data (the other 4 bytes are used to locate the next file sector).
This approach eliminates external fragmentation (since even the smallest block can now be used).
Some problems with this approach are that seeking within a file is now difficult. For example, if we're interested in the last 100 bytes of a 100mb file, we need to traverse all the sectors of the file (follow links) to get to the last 100 bytes.
Another major issue is that we need to do a disk seek with every disk sector (unless disk sectors are contiguous).
And yet another issue with this is that storing pointers on every disk sector uses up a lot of disk space.
UNIX
Used I-Nodes – an indexed file allocation method.
Its fast for small blocks of data and can accommodate extremely large volumes of data
RAM Disk
RAM disks are a temporary storage solution, data cannot be permanently saved, and data is lost on any type of system shut off. I.e. system reboots.
A Random Access Memory disk is a segment of the main memory that is left for extra storage if required. This is otherwise known as a ‘Virtual Drive’.
The main use for this area is that of performing operations to files, this is a better way of performing operations as the rate at which they can be performed on are that much higher than that of a physical drive.
Size constraints are a major problem with RAM disks, as they are limited to that only of the RAM contained in the machine. For example in modern home computer systems 256mb of RAM is contained, therefore only 256megabyte of RAM disc can be used. 256mb in today’s computing is very little in comparison to what users require.
OS Services – files, copy, delete, rename, view, find, backup
Directories – create, rename, list, delete
Programming, Open, close, read, write, seek
File allocation methods, FAT 32, NTFS, UNIX,
Disk caching
RAM disk
Defragmentation
I/O System Management
DMA
DMA takes control of the system by imitating the processor; it does this to enable itself to transfer data to and from the memory using the system bus.
Buffering is required primarily because of the slow nature of I/O Device function.
It is a way of smoothing out an I/O operation,
Virtual Segmentation -
each process is divided in to slices (segments)
non-resident
Caching and Spooling of Input and output devices
Drivers
System Components ( CPU, RAM, System Bus, Local Buses, Device Controllers, Control Registers, Devices).
IO response System (polling, interrupts, I/O, DMA
Kernal Layers, Purpose, Device, Drivers, System calls
Device Management
Device management controls hardware resources; this includes the control over selection and operation of the devices used for input, output or storage.
- Select an appropriate type of operating system for the following ICT needs, giving the choice of current operating systems [trade names]:
- Local council office department in charge of the collection, and distribution of council tax.
- A national car-rental agency, whose main computing centre is located in Sheffield, through which all of the daily transactions for the business are conducted.
- An electro-plating circuit board manufactures.
- A travelling company representative, who uses technology to keep in touch with his office.
- Research and identify the different operating systems currently available for desktop computers. From your research and investigations of these operating systems you must critically evaluate them. This evaluation should clearly demonstrate your understanding of the differences found including and potential disadvantages.
Bibliography
http://www.netnam.vn/unescocourse/os/35.htm#3.5.3%20Virtual%20memory%20concept
http://www.cs.aue.auc.dk/~akbar/ospdfiles/wschap7.PDF
Books
[Computer Science 5th Edition, CS French, Ashford Press Gosport, 1996]
Glossary