Computing CG3 - Operating Systems

A simple set on notes about Operating Systems, section CG3.2

?

Batch Processing System

One or more programs, along with any data needed, are submitted to the computer as a job. These are then put into a queue to await processing. there is no interaction between the user and the computer. Because no interaction is needed, processing can be done at off-peak times such as overnight.

Batch processing is usually associated with mainframes but PCs running Windows can also create batch files.

Example

A job might be payroll run for a company along with the time-sheet including the employees pay rate, time work, over time hours etc.

1 of 9

Single User and Multi-Access Systems

Single User System

A standalone computer not connected to a network. This computer is unable to communicate with other computers or transfer data. This means it is protecting from virus' and hackers.

Multi-Access System

A number of users connected to a central computer and seemingly have individual control. The central computer  determines which users are waiting for processing and allocates a time-slice of processing time.

One of the jobs of the operating system is to control the flow of data to and from the workstations. Any output needs to be sent to the correct workstation.

This system is NOT the same as a network!

2 of 9

Multiprogramming and Multitasking

Multiprogramming

A computer may store a number of different programs in its memory. Each stored program will be given a time-slice in turn, this happens so fast it seems the computer is processing all programs at once. Most large online are a mixture of Multi-access and Multiprogramming systems.

Multitasking

Generally applied to PCs, a number of tasks are loaded and processed in turn for a for short time-slices until complete. It appears that the computer is running several applications at once.

Example

On a PC you can have multiple windows open at once, each with a different application running.

3 of 9

Interrupts

An interrupt is a signal sent from a device to the CPU.

Examples of Hardware interrupts include...

  • A printer may send an interrupt if it requires more data to be sent of if an error occurs.
  • The timer in the processor may send an interrupt at regular intervals to perform certain functions.
  • A malfuntioning device may send an interrupt.

Examples of Software interrupts include...

  • Some run-time errors, like dividing by 0, will generate an interrupt.
  • Some specific functions may be performed by sending an interrupt to the operating system.
4 of 9

Interrupts

When the CPU receives an Interrupt Request or an IRQ..

  • The program currently being run is halted and all the contents in the registers are saved.
  • An interrupt service routine is run which deals with the interrupt.
  • The original program is continued where it left off.

There can be more then one interrupt happening at the same time. Each interrupt has a priority level associated to it, any high level interrupts will interrupt a low level interrupt. The priority level given tot he interrupt is determined by the time it takes to service it and the importance.

Example

A Hardware failure may interrupt a printer request for more paper.

5 of 9

Memory Management

One of the jobs of the operating system is to allocate memory space to different tasks, otherwise know as partitions. Some partitions are permanently allocated to special tasks, there will also be a section that will be allocated to other tasks as required. A memory map shows which areas are allocated to what tasks...

(http://getrevising.co.uk/static/images/29yjbkg.png)

6 of 9

Memory Management

Partitioning of memory allows multiple tasks to be run at the same time.

The operating system must ensure that

  • There is enough memory for each task.
  • One task does not need the memory that another is using, this will cause the system to crash if it does.
  • Once a task is finished, the memory is released for another to use if needed.

Virtual Memory is used when memory required by a task is split into pages, these can be swapped either into the memory when in use or onto the hard drive when not in use. It causes the task to think that it is using more memory then it actually is.

7 of 9

Buffering

Buffers are areas of the memory 'reserved' whilst a file is being transferred, they are commonly used when inputting or outputting a piece of data. When data is input, it is transferred a block at a time. When a block is transferred fully it is stored in the buffer when it is then processed.

Buffers are also used to overcome the problem of different speeds, a typical is example is between a processor and a printer as a processor is thousands of times faster then a printer. The data is stored in a print buffer to let the processor carry on with other tasks whilst waiting for the printer to print.

To speed up processing, sometimes a double buffer is used. This is where two buffers are used, on can be filled as the other one is being processed.

8 of 9

Scheduling

A multiprogrammingsystem has a number of jobs stored in the memory, each job is allocated a small amount of processing time or a time slice in turn. At the end of a time slice, an interrupt occurs and it moves on to a new job.

The scheduler is the part of the operating system which decides what job is to be processed next.

A job can be in three states:

  • Running
  • Ready
  • Blocked

A scheduling policy should aim to process as many jobs as possible in the smallest amount of time, balance resource use, avoid pushing low priority jobs to the back of the queue indefinitely and maximise the number of interactive users receiving acceptable response times.

9 of 9

Comments

adele

Report

good yes

Similar Computing resources:

See all Computing resources »