Upload
lycong
View
217
Download
0
Embed Size (px)
Citation preview
3.3 Computer Systems 1
ContentsLearning Objectives Box.....................................................................................................................1
3.3 Computer Systems.................................................................................................................................2
3.3.1 Define Operating Systems..............................................................................................................2
3.3.2 Operating System Functions...........................................................................................................3
Peripheral Communication..................................................................................................................3
Coordinating concurrent processing....................................................................................................3
Memory Management.........................................................................................................................3
Resource Monitoring...........................................................................................................................3
Accounting and Security......................................................................................................................3
Program and Data Management.........................................................................................................4
3.3.3 Characteristics of Computer Systems and a comparison of these characteristics and applications of different kinds of computers...............................................................................................................4
Personal Computer (PC S) and Portable Computers............................................................................6
Mainframes.........................................................................................................................................7
Super Computers.................................................................................................................................8
Number of Users: Multi-User and Single-User Computer Systems......................................................8
3.3.4 Comparison and different applications of computer systems........................................................9
Personal and Portable Computers.......................................................................................................9
Mainframe...........................................................................................................................................9
Super Computer..................................................................................................................................9
3.3.5 Computer System Operation Modes............................................................................................11
3.3.6 Applications of different modes of operation...............................................................................12
3.3.7 Relationship between master file and transaction file.................................................................15
3.3.8 Reliability of systems....................................................................................................................18
Backup strategies...............................................................................................................................19
3.3 Computer Systems 2
Learning Objectives Box1. Define the term “operating system”.
2. Outline the functions of operating systems. Functions include: communicating with peripherals;
coordinating concurrent processing of jobs; memory management, resource monitoring,
accounting and security; program and data management; providing appropriate user interfaces.
3. Discuss the characteristics of various computer systems including single users and multi-users, in
both single-tasking and multi-tasking environments.
4. Compare the characteristics and applications of different kinds of computers.
Personal computers, portable computers, mainframes and supercomputers should be
considered. Characteristics must include: primary and secondary memory size; input/ouput (I/O)
devices; environment (size, convenience, where it is used); cost, users (multior single-); and
processor (word length, bus size and frequency).
5. Outline the principal characteristics of batch processing, online (interactive) processing and real-
time processing.
6. Outline applications that use each of the processing methods in 3.3.5: batch processing (payroll
and bank cheque processing); interactive (online) processing; word processing; computer
games; real-time processing (air traffic control and monitoring of patients in hospital intensive
care).
7. Explain the relationship between master and transaction files.
8. Discuss the reliability of the system including the implications of failure.
3.3 Computer Systems 3
3.3 Computer Systems
3.3.1 Define Operating Systems
An operating system is a collection of programs which deal directly with the hardware system and sub-
systems, provide user interfaces and log the activities taking place in the system. Examples of OS are
Linux, MacOS, and Windows and Network OS such as Novell Netware.
Examples of OS
WINDOWS
Examples of OS
MAC OSExamples of OS L
INUX
3.3 Computer Systems 4
3.3.2 Operating System Functions
Peripheral Communication
Peripheral devices – Printers, mice, keyboards, monitors, robot arms... are all peripheral devices.
Hardware only deals with data coded into binary machine code. The OS keeps track of the device drivers
on your system and signal if they are not operating correctly.
Drivers are software designed to interface directly with the hardware.
The OS provides a standard interface between hardware devices and applications; an application can
thus simply use a <print> type instruction within the HLL rather than low level commands associated
with sending characters, line breaks etc…
Coordinating concurrent processing
Processes or Jobs are running on the system all the time that the computer is switched on. The user can
get a list of theses processes. The OS handles the loading and unloading of these processes to and from
primary memory.
Memory Management
The OS ensures that each process operates on its own memory space (virtual) and doesn’t change
memory belonging to another process. The OS also deals with the moving of parts of processes to the
swap file mentioned earlier.
Resource Monitoring
Running processes can be allocated resources ex: Processor time, Memory. The OS attempts to keep all
processes running by managing the access
Accounting and Security
3.3 Computer Systems 5
When an OS is used in multi-user or networked environment, it has to make sure that only authorized
users registered with the OS can get access. The manager, via OS functions, controls this feature.
Accounts are kept of the activities conducted by each user. These logs of activity can be huge but may be
required if there are security or other problems. One user may be found to be running a process that is
hogging all resources. It is possible to discover the activities of unauthorised users – hackers by looking
at the audit trail – kept by accounting software.
Program and Data Management
The OS must be able to keep track of which files, ports and other data resources a particular program is
using to read or write information. Otherwise one program might end up writing to another one’s files.
The OS will also handle the transfer of data and/or program instructions from files into primary memory
and vice versa.
3.3.3 Characteristics of Computer Systems and a comparison of these
characteristics and applications of different kinds of computers
Computer systems are made up of input, processing and output communication hardware devices and
the systems and application software required to operate and connect (interface) the components so
that they can function and communicate.
Computer systems can be small and consists of single computers such as personal computers (PC) or can
be composed of a number of computers linked together in a large network of computers.
Computers can also vary in the size of their memory and secondary storage and speed of processor. And
they can vary depending on the type of OS that is loaded.
A typical PC’s mode of operation is as a single user computer. This means that it can be used by one
person at a time. Most PC’s also allow a single user to perform more than one task simultaneously eg:
edit a word processed document and download a file from the Internet at the same time. This is known
multi-tasking.
3.3 Computer Systems 6
A single computer such as a PC consists of the following components:
- Input devices eg: mouse, keyboard, scanner
- Processing devices eg: processor, primary memory and control unit
- Output and communication Devices eg: printer, modem
- Backing store eg: Hard disk
- System Software eg: OS
- Application Software eg: accounting package
- Stored Data eg: Data Files
Larger Computer systems also have these same components but also have connections to a larger
number of peripheral devices and to other connected computers via network connections.
Computer Systems can be classified into a number of categories:
Personal Computers
Portable Computers
Network Computers
3.3 Computer Systems 7
Mainframes
Super Computers
Personal Computer (PC S) and Portable Computers
Personal computers
RAM
Backing Storage (Hard disk)
CD/DVD Drive
Keyboard
Mouse
Monitor – mono screen resolution/high quality graphic
screen
Processor Speed
Price
Portable computers
Similar characteristics as Personal Computer
Can also run on batteries with a life of typically 2-6
hours
Both use memory cache to improve performance
Both provide multi-tasking but are used in single user mode
Multitasking – is allowing a user to perform more than one computer task(such as the operation of an
application program) at a time.
The operating system is able to keep track of where you are in these tasks
and go from one to the other without losing information.
3.3 Computer Systems 8
Being able to do multitasking doesn't mean that an unlimited number of tasks can be juggled at the
same time. Each task consumes system storage and other resources. As more tasks are started, the
system may slow down or begin to run out of shared storage.
Mainframes
Mainframes are designed to run a range of application
software and process a considerable volume of transactions
for a range of logged in users all at the same time ie: use a
multi-user mode of operation. It is not uncommon for a
single mainframe computer to have thousands of
simultaneous users all demanding resources from the
mainframe.
The processors are often used in parallel.
The device also uses a very high capacity disk configuration referred to as a disk farm that can store and
access TBytes of data. Mainframes cost much more than PC’s. In the early days of computing,
3.3 Computer Systems 9
mainframes were huge computers that could fill an entire room or even a whole floor! As the size of
computers has diminished while the power has increased, the term mainframe has decreased.
Super Computers
This type of computer usually costs hundreds of thousands or even millions of Euros. Although some
supercomputers are single computer systems, most are comprised of multiple high performance
computers working in parallel as a single system. They are designed to run very complex programming
tasks that simply require a very large amount of processor time to execute eg: used for weather
prediction.
Number of Users: Multi-User and Single-User Computer Systems
Single-User – one user interacting with the System ex: Home PC
Multi-User – handles a large number of simultaneous logged in users (together). Users can either be
connected via dumb terminals or by a PC. A dumb terminal allows the user to view a display and to
request actions via some form of interface that is usually a keyboard but which does not perform any
processing. All processing is done through a shared CPU. Ex: Bank, cash points in a supermarket
Single User CPU
CPUUser 1
User 2 User 3
3.3 Computer Systems 10
A single user or multi user computer system often allows each user to execute more than one program
at one time. This capability is referred to multi-tasking. For example on a PC you can print a very large
document and continue to work on spreadsheet at the same time.
3.3.4 Comparison and different applications of computer systems
Personal and Portable Computers
Support individuals at home or at work
Enable users to create, store, retrieve and print word processed documents and to connect to
the Internet
Enable access to the World Wide Web via a browser and to access email
Can perform complex financial calculations and graphical applications
Mainframe
More costly than a PC
Able to handle a number of simultaneous users
The size of RAM, cache and disk capacity is greater
Mainframes are used in banks, large government departments and insurance companies.
Can handle enormous volume of transactions conducted on a single or distributed customer
accounts database
Super Computer
More expensive than mainframe or PC
It has faster processor configuration often using 100s of PCs in parallel
RAM and cache can access very quickly a vast amount of data from secondary or backing store
3.3 Computer Systems 11
Exercise 3.8
1. Define the term single user and multi user in terms of computer systems
2. What advantage does multi-tasking offer users?
Answers
1. A single user system (eg a personal computer) is used by one person at a time whereas a
multiuser computer is accessed by many different people at the same time using different
terminals or workstations.
2. Multi-tasking enables users to have more than one task or process running on their computer,
for example they can print a document but can then continue with another task while the print
job is running. Many tasks run in the “background” eg messenger services and anti-viris
programs.
3.3 Computer Systems 12
3.3.5 Computer System Operation Modes
Computer systems operation is controlled by the OS and the desired mode of operation. There are a
number of operation modes possible:
Real Time Processing – Small computer systems that control the
operation of VCR’s and medical equipment such as heart
monitors operate in real time without intervention by humans.
These devices are embedded into a range of equipment and have
all the basic characteristics of larger computer systems, however
they are pre-programmed to act on inputs and receive without
the need to alert a human operator. The time between the initial
input and the subsequent action is thus very much reduced.
Interactive On-line – This is a very common mode of operation. Most computer databases used
to record customer booking details in hotels, hospitals, airlines and
theatres to ensure that there is no possibility of double booking of
the same room or seat. The operator of the computer system can
interact with the booking program and does this by connecting
directly
Batch processing – when a computer system is operated in
batch mode there is a time gap between data collection and
data processing. Batch mode is used to perform a set of
processing steps on a set of data that has been collected over a
period of time
3.3 Computer Systems 13
3.3.6 Applications of different modes of operation
Real Time – found in embedded chip technology that controls things such as industrial
processes, medical equipment, automotive engines and household appliances – NO HUMAN
INTERVENTION
Online Interactive – operate where it is important that the human operators of users have
direct access to the functions of the computer system. In a bank, data is updated immediately
eg: customer bank balances are checked before a withdrawal and updated immediately. Further
examples are ATMs, hotel and airline reservation systems, database systems used by large
companies to process clients orders
Batch operation – school enrolment system may require students to hand in an enrolment
form. These forms would be collected at the end of the day and entered into the computer
database at the one time. Payroll calculations and cheque productions are often performed in
batch mode. Such a set of calculations usually requires a lot of computer time. Hence an
operator could collect the data eg: hours worked and rate of pay for each employee and store
this in a file and then set the payroll calculation process to start at midnight by reading the file
sequentially and working through each employee.
Exercise 3.9
Outline the principle characteristics of real time, online and batch processing
For each of the following applications give reasons why a specific mode of operation is likely to
be more appropriate than another:
o Payroll & Bank cheque
o Connection to a heart monitor
o Car fuel injection system
o Library borrowing system
o Hotel reservation
o Pollution Monitoring
3.3 Computer Systems 14
Answers
1. Real time systems are usually thought of as fast systems because they need to react within a
given time. Technically, the processing has to produce an output in time to affect the next input
to the system. In the example of controlling a patients heart rate by controlling the flow of a
drug to the body, if a change in heart rate is detected then the next output must be to
immediately change the flow rate of the drug.
Online systems are where data is entered and processed straight away – there is also a
permanent connection between the user and the system (the user is on-line to the system, in
the same way that a printer is on-line when it is ready to accept data). People have become
careless with “online” vs “on-line” so you may find the terms used interchangeably. We see that
the definition includes real time processing as well. Typical online systems are booking and
transaction systems where the transaction takes place while the customer waits (eg banks
ATM’s, cinemas, gas (petrol) stations, POS and EFTPOS terminals).
Batch processing systems are where the data is collected first and then processed in one go (a
batch of data is entered for processing). The data is often collected on a document, either a
form or a computer-readable entry method. For example, in some stores, tags are taken of
clothing when the item is sold, the tags are gathered at the end of the day and input to the stock
control system to update stock levels. Compare this with the supermarket online stock control
system. Utility companies often collect meter readings and then enter a whole batch of them
into the computer for processing (producing customer bills). They might collect the readings
using a person to write them down or more sophisticated data collection methods can be used.
2. If you can’t find any local systems, you could try to use the case studies provided every year for
the course to identify different processing methods.
3. Batch processing is appropriate where every record has to be processed – so payroll is an
obvious one. Cheque processing and bank account update methods now vary widely from the
3.3 Computer Systems 15
traditional paper-based systems where all the cheques are collected up first to others where the
cheque can be read and processed at the bank counter by the teller. This system is more
common in countries that use OCR to read cheques rather than MICR (because MICR readers
are much more expensive devices compared to OCR readers). With control devices, such as
heart monitoring or fuel injection, speed and immediate notification of problems require real-
time systems. Some systems can be run in a variety of modes. Libraries can use online systems
to update records right away or the more traditional paper-based ticket systems. In this case
thay may not use a computer at all.
Similarly hotel reservations can be manual or computerized. If they are computerized they are
likely to be online since customers usually want an immediate response the question “do you
have a room for such-an-such a date”.
Again with pollution monitoring systems we could imagine a real-time system (if the pollution is
likely to be immediately toxic and hazardous, nuclear waste say), an online system (the system
can be checked at intervals to see what the level is) or batch (pollution levels can be recorded
over a period of time using a data logger and returned to a centre for subsequent processing –
eg a check on noise-pollution levels at various times of day at a busy intersection).
This implies that we need to think carefully about which mode of processing is appropriate to
the given situation.
4. Real time – control drug flow; Online – CD orders; Batch – electricity billing.
3.3 Computer Systems 16
3.3.7 Relationship between master file and transaction file
A master file contains the main data for a computer system or application.
A transaction file typically holds a list of the changes that need to be made to the data held in the
master file. A change is referred to as a transaction.
In an online system the transactions eg: bank withdrawal are used to update the master file directly as
the transaction occurs.
In a batch processing system the transactions could be collected and stored in a separate file called a
transaction file. At the appropriate time the records in the transaction file could be read sequentially
and used to update the master file. An important feature is that the transaction and master files are
both sorted so that the process can be completed in a single pass.
In the diagram the update process is done as a batch process. The data records are read from the
transaction file one at a time and the master file record that matches the transaction record is then
accessed and updated. This sequence is repeated until the last record in the transaction file has been
read.
3.3 Computer Systems 17
The key difference is that in batch processing method of operation, the data in the master file is not
necessarily up to date ie: transactions have been recorded and stored in transaction file. In an online
system, the transactions are applied to the master file as the transactions occur or recorded.
Exercise 3.10
1. Define the term master file and transaction file
2. Explain the use of a master file and transaction file in relation to the payroll example
3. Construct an algorithm to describe the major steps involved in the above processing
4. Explain why the algorithm works more efficiently with sorted files
5. Explain the link between sorted files and sequential access methods.
Answers
1. A master file contains the main data for a given application whereas a transaction file contains a
list of the changes that need to be made to the master file.
2. In a payroll system, the master file will hold data about each employee such as their personal
details (name, address, bank account) in a sequential file in order of some ID number, for
example:
The transaction file then holds data which changes every week, such as the number of hours
worked. This also has to have the employee ID number in it:
3.3 Computer Systems 18
The update process then involves looking at each master record in turn, looking at the
appropriate transaction file record and updating the master file accordingly. In the case of
payroll processing we might also output a list of errors or queries and a set of cheques or
transfer orders to the bank:
3. Notice that the algorithm only works if both files are sorted by the same key and that only
sequential access to both files is ever needed (files are read and processed in a single pass).
3.3 Computer Systems 19
read Masterread Transactionwhile there are still Transaction recordsif the key from Transaction record < key from Master record thenreport that there was an error – no such employeeread next Transaction recordelse
if the key from Transaction record > Master record thenread next Master recordelsethe keys are equal somultiply hours by hourly rateif you have a “suspect” value thenreport a possible errorelsecomplete processingprint slips and chequesupdate the Master recordendifendifendifenddo
3.3.8 Reliability of systems
The reliability of any system is only as good as the data entered. The correctness of data in a system may
be described as the integrity of the data. As systems become more complex and autonomous – making
key decision on software based rules – then mistakes can happen with serious consequences.
Data that is in systems need to be protected against accidental or deliberate loss of damage. Some
examples of threats to data are:
Unauthorised users – hackers – may gain access and alter or remove data
Physical media (discs, tapes) may be stolen
The hardware may be stolen
There may be fire of flood damage
Additionally there may be threats to the security of personal and company data – data protection. In this
case, dangers are that data may be copied, leaving no evidence that a copy was made or that data may
be accessed over networks remotely.
3.3 Computer Systems 20
An important method of protecting data from unauthorised users is the use if passwords are privileges,
particularly over a networked system. Only people who have been given a logon name and allowed to
select their password can access data but not change it or make a copy to a disc for an example.
To be effective passwords need to be of reasonable length – 6 characters or more, hard to guess (not
partners name, child, dog…) and contain special symbols besides alphabetical characters.
When data is transmitted over networks it may be encrypted if
especially sensitive so it would be very difficult to decode.
Encrypting data helps to ensure that even if data is accessed, it
is not readable. A PIN number on a magnetic strip of a bank
card is encrypted for this reason.
Backup strategies
To protect data against irreversible damage, backup copies are kept in
a safe place, in most cases they will be kept in different buildings. These
can be used to restore a system to the state existing at the last backup.
A server will have an exact mirror of a server found in a different site. It
would be an exact copy.
Exercise 3.11
1. In weather forecasting data is collected for input into weather models. Discuss the implications
of mistakes being made in collection or transmission of raw data.
2. A hospital has medical records on paper and is transferring them into a new computer system.
Discuss the importance of transferring these records correctly.
3. Compare the importance of reliability of systems that monitor patients in intensive care with
those that they carry out stock control tasks.
3.3 Computer Systems 21
Answers
1. The introduction of mistakes at the collection or transmission stage may not be too serious if
they can be caught be error-checking methods such as checksums or parity (transmission) or by
validation checks (on input to an application). If they get by these checks then it is possible that
bad data may get input into modeling software leading to incorrect predictions of the weather.
This may have serious consequences for people dependent on accurate forecasts – eg a farmer
waiting to harvest a crop at the optimum time, a fisherman setting out to sea. In extreme cases
peoples lives could be put in danger (hikers in remote mountain areas, for example).
2. These records must be transferred with complete accuracy or a patient could potentially die, for
example being given a drug they are allergic too (did not get copied into the new system
correctly) or through lack of treatment (malignant cells were incorrectly copied as benign, for
example). As well as moral aspects, there could be heavy financial consequences for negligence
of this kind. Presumably a reliable form of verification, such as double-entry, would be used.
3. Both of these systems need to be reliable – the heart monitoring must not fail or the staff won’t
be alerted in an emergency. Also it must not give frequent false alarms or a real event might be
ignored or a response delayed. In stock control of drugs care must be taken that they are not
manipulated, allowing someone to steal dangerous drugs. If the stock records are wrong, even
for a non-dangerous drug, there might be a sudden shortage leading to delayed treatment of
patients.