LEARNING OBJECTIVES:
The specification states - you should be able to:
Describe batch processing and real-time processing;
Evaluate the use of batch processing and real-time processing for common applications;
Describe the input, output and processing involved in a range of common devices: automatic teller machines (ATMs), point of sale (POS) terminals and smartphones;
Two types you must know about is:
Batch Processing
Real-Time Processing
This diagram explains how processing is brought about. Data must firstly be inputted, which is then processed (some sort of updating/calculations are performed) and then information is outputted.
In batch processing all input happens together, then all processing together, and then all output together.
The programs and data are collected together in a group before a suitable processing time is reached and then the processing begins.
Jobs are stored in job queues until the computer is ready to process them.
There is no interaction between the user and the computer while the program is being run. Computers which do batch processing often operate at night when the computer is not in use.
All the data to be input is collected together
… in a transaction file
… and then all processed in one go
… usually at a quiet period/overnight.
All data undergoes the same processing
… without human intervention.
[CCEA Mark Scheme Answer JAN 13]
Although, the master file has never been asked before in the exam it is worthwhile knowing in case it ever did come up and you must have an understanding of it.
The data stored permanently is kept in a file called the master file. The data in the master file is sorted into order using one of the fields in the records in the file, known as the primary key field. The primary key field must uniquely identify each record in the file.
Each piece of input data (which will update the contents of the master file) is known as a transaction. All the input data is put together into a batch in a file called the transaction file. There are 3 different types of transaction that any processing system will have to cope with. They are to:
Add a new record to the master file.
Delete a record from the master file.
Amend / update an existing record in the master file.
At some predetermined time (e.g. the end of the day/week/month) the computer system will process the data stored in the transaction file and make any changes that are necessary to the master file as a result of the transactions. This will produce an updated master file and an error report detailing any transactions that could not be processed for some reason. Generating a single updated master file from the old master file and the transaction file is known as merging files.
Before this processing can take place the transactions must be prepared for processing. To do this two operations must be carried out :
1. Validating : Each transaction that is entered is validated to check that it is unlikely to halt processing by causing an error. It is very important that processing is not halted in a batch processing system because processing often takes place overnight without a human operator being present. If an invalid transaction caused the processing to stop then a whole night's processing time could be lost. Transactions are usually validated as they are keyed in by the operator. Any errors that are found can be reported and corrected straight away.
2. Sorting : The data in the transaction file is sorted into order using the same primary key field as the master file. Sorting cannot take place until the whole batch of transactions entered and stored in a file. The transaction and master files need to be put into the same order before processing occurs because the two files are processed sequentially. The files are usually stored on a serial access medium such as magnetic tapes. If the records on the tapes were not sorted into order then whenever a transaction record was read from the transaction file the computer system would have to waste a lot of time searching for the matching record in the master file.
The master file would contain the records for all of a company's employees, including their:
employee number,
rates of pay and
how much they have been paid so far this year.
The records in the master file would be sorted using the employee number as the primary key field.
The input data put into the transaction file would consist of records showing how many hours each employee had worked in the current week. Sometimes transactions would be used to add a new record if a new employee started or delete a record when an employee left the company.
Here is an example record for an employee called Anna Jones in a master file together with an entry in the transaction file which will update her record with the number of hours she has worked this week.
The transaction file would be processed at the end of each week as workers are paid weekly. Before processing it would have to be sorted into the same order as the master file, i.e. the records would be sorted into order by employee number.
The computer would then process the transactions, using the information about how many hours each employee has worked this week (from the transaction file) and their rates of pay (from the master file) to calculate the employee's wages for the week. Pay slips can then be printed and the master file can be updated to increase the amount paid so far this year by the wages paid this week. An error report will also be produced.
Real Time Processing must process data extremely quickly.
Exam tip: This question is always asked using an example to explain it. E.G. Describe how real-time processing could be used to process orders on the website. [4]
An order will be processed immediately when it is made.
The stock level will be updated immediately
....before the next transaction takes place.
The appropriate amount will be immediately debited from the customer's account.
If there is not sufficient stock a purchase cannot be made.
If there is sufficient funds in the customer's account the purchase cannot be made.
[CCEA Mark Scheme Answer]
Although, this has never been asked before in the exam it is worthwhile knowing in case it ever did come up.
Real time systems are very fast but they do not process data instantly. Any processing will take some time. However, real time systems will process data very quickly/immediately. To ensure that any input data can be processed sufficiently quickly real time systems must incorporate a lot of redundancy. This means having much more hardware than is required to process the expected amount of input data. The extra hardware is known as redundant hardware because it is not normally used. Under normal circumstances only a small fraction of the hardware is required.
In extreme circumstances when there is an unusually large amount of input data to process the redundant hardware can be used. Therefore the system will not slow down and will still be capable of meeting deadlines.
Redundant hardware can also be used as backup hardware to reduce the likelihood of a computer system failing if some of its hardware fails.
Payroll is carried out at regular intervals/weekly/monthly
… and can be performed at off-peak periods/overnight/is not time critical
All payslips are processed in the same way/human intervention is not required
Timesheets can be batched together. (2 × [1]) [2]
Stock control movements must be processed in real time
… so that stock movements are recorded as soon as they happen
It is critical that stock levels are always up to date
… to avoid stock shortages/prevent over stocking/enable automatic stock re-ordering (2 × [1])
[CCEA Mark Scheme Answer 2019]
Summary of Real Time Systems
In real time processing input is acted upon immediately. Real time processing is used in critical applications where no delay in processing can be tolerated. E.g. Automatic pilot systems and safety systems in cars.
The whole input-process-output cycle is completed for each transaction before the next transaction is processed.
The processing is immediate because it is vital that the data files are updated to reflect the current situation so that they can influence future transactions.
As a result, records held are kept accurate and up-to-date and can be queried at any time to obtain accurate information.
Real time transaction systems are used for:
Library systems where books borrowed are immediately recorded as unavailable or on loan.
Retail systems where users build up a ‘basket’ and then go to ‘checkout’ option where the availability is confirmed in real time.
Online booking systems e.g. flights, hotel and car.
ATM machines where the withdrawal of cash is recorded immediately and the customers balance is immediately updated to reflect the withdrawal.
Justify the use of real-time processing for customer transactions Automated Teller Machines (ATMs) [4]
In real time processing, each transaction is processed immediately [1]
Files are updated [1] before the next transaction takes place [1]
This is needed for ATM transactions as withdrawals and deposits to an account must be implemented immediately [1]
So the account balance is always up to date [1]
Personal Identity Number (P.I.N.) changes are updated immediately [1]
Input devices in an ATM.
Card Reader – The card will be inserted into the ATM machine and they system will check your card and identify your account details from the card using the chip/magnetic strip.
Pin Number (Keypad) – The user will insert their pin number when they have inserted their card. The system will check the details of the card and only if the pin number is correct will the ATM machine process the customer’s transaction.
Touch screen/pad – The user will select the service on the screen by touching it e.g. menu choice, withdraw cash, amount of cash, print balance etc.
Output devices in an ATM.
Printer gives you the receipt – When the customers has entered their account they will have options to print out a mini statement or get a receipt for the transaction they have just done.
Screen – The screen will display options for the customer to select and when they have chosen their selections the ATM will output their transaction. E.g. select show balance and the balance will then be displayed on the screen.
Speakers - When menu choices are selected a beep can sound. A beep sound can also be made if there is insufficient funds.
Processing in an ATM.
The customers data is retrieved from the bank's database.
The PIN is validated.
The amount is checked against the customer's balance.
The amount is deducted from the customer's balance.
Transaction details are recorded e.g. date, amount, location for bank statement.
Feedback in an ATM - remember feedback is informing the user!
Audio/Sound to alert the customer that the transaction has been successful e.g. they have insufficient funds in their account.
Screen will provide the customer with feedback for example if the customer selected to see their balance it would be displayed on the screen.
A supermarket uses a Point of Sale (POS) terminal to keep track of the goods that it has in stock and to produce bills for customers. Whenever an item is sold the product code of the item is read into a till by a barcode scanner.
Once the product has been entered/scanned.
The till looks up the price and name of the product in the supermarket's stock database.
This information is printed on the customer's receipt.
It also updates the product’s record in the stock file to indicate that the product has been sold.
The system has to be a real time processing system because a customer at a till would not be prepared to wait for a batch processing system to look up the price and name of the product.
Input devices in POS.
Product details (code) from barcode (laser scanner) or manual entry of product code (register/keypad)
Debit/credit card inserted (card reader)
Choice of payment input (touch screen)
PIN input (keypad)
Output devices in POS.
Product prices displayed on POS screen
Bill total displayed on POS screen
Instructions displayed on card reader
Itemised receipt printed
Processing in POS.
Retrieval of product/item price from shop’s/stock database.
Update stock levels for products as items are scanned.
Calculate bill total.
Validate card details.
Calculate change.
Input devices in smartphones.
Voice input (microphone) for phone calls /SIRI
Input password (touch screen) Fingerprint recognition (scanner)
Input commands (via bluetooth device)
Text input SMS – (keypad or touch screen)
Image capture (camera)
Record movies (camera)
Selection of options/apps (touch screen)
Tilting phone for game input
Output devices in smartphones.
Visual and auditory
Sound – mp3, music, speaker, phone notifications, games,
Movie/video, lcd display
Text output – SMS
Images – MMS
Tactile output – vibrations (haptic feedback)
Processing in smartphones.
Loading apps
Loading messages
Receiving calls
Software updates
Example of Process Control in Industry
Although, this has never been asked before in the exam it is worthwhile knowing in case it ever did come up.
Sometimes a whole manufacturing process is controlled automatically by a computer system.
Input: Sensors take readings at regular time intervals and send the readings to the computer. Sensors may be measuring temperature, pressure, liquid flow rate etc
Process: The computer analyses the readings and decides whether action is needed to be taken.
Output: The computer sends output signals to devices which manage the process. An actuator is a device which reacts to a computer signal and will operate a simple device (tap, motor, switch etc)
Some systems use feedback...the result of an output signal affects the next input reading which affects the next output and so on... A closed loop means there is no user interaction involved.
An example of a feedback system is a computer controlled heating system.
Repeat
Read temperature
If too cool, turn heater on
otherwise turn heater off
Until switched off
Most systems use feedback - the output affects the input. For example if the computer is controlling a heater, any output from the computer will change the temperature ...which affects the input readings ...which affects the computer's next output...etc.
A Process Control system is an example of a real-time system. Data is processed as soon as the computer receives it allowing the system to respond immediately to any variations in the processing.