Saturday 30 April 2011

Distributed Systems: Concepts and Design. by George Coulouris. Exercise Solutions 2

Edition 3
By George Coulouris, Jean Dollimore and Tim Kindberg
Addison-Wesley, ©Pearson Education 2001
Chapter 1 Exercise Solutions

1.2 How might the clocks in two computers that are linked by a local network be synchronized without
reference to an external time source? What factors limit the accuracy of the procedure you have
described? How could the clocks in a large number of computers connected by the Internet be
synchronized? Discuss the accuracy of that procedure.

1.2 Answer

Several time synchronization protocols are described in Section 10.3. One of these is Cristian’s protocol.
Briefly, the round trip time t to send a message and a reply between computer A and computer B is measured
by repeated tests; then computer A sends its clock setting T to computer B. B sets its clock to T+t/2. The setting
can be refined by repetition. The procedure is subject to inaccuracy because of contention for the use of the
local network from other computers and delays in the processing the messages in the operating systems of A
and B. For a local network, the accuracy is probably within 1 ms.
For a large number of computers, one computer should be nominated to act as the time server and it
should carry out Cristian’s protocol with all of them. The protocol can be initiated by each in turn. Additional
inaccuracies arise in the Internet because messages are delayed as they pass through switches in wider area
networks. For a wide area network the accuracy is probably within 5-10 ms. These answers do not take into
account the need for fault-tolerance. See Chapter 10 for further details.

1.3 A user arrives at a railway station that she has never visited before, carrying a PDA that is capable
of wireless networking. Suggest how the user could be provided with information about the local
services and amenities at that station, without entering the station’s name or attributes. What
technical challenges must be overcome?

1.3 Answer

The user must be able to acquire the address of locally relevant information as automatically as possible. One
method is for the local wireless network to provide the URL of web pages about the locality over a local
wireless network.
For this to work: (1) the user must run a program on her device that listens for these URLs, and which gives
the user sufficient control that she is not swamped by unwanted URLs of the places she passes through; and
(2) the means of propagating the URL (e.g. infrared or an 802.11 wireless LAN) should have a reach that
corresponds to the physical spread of the place itself.

1.4 What are the advantages and disadvantages of HTML, URLs and HTTP as core technologies for
information browsing? Are any of these technologies suitable as a basis for client-server
computing in general?
1.4 Answer
HTML is a relatively straightforward language to parse and render but it confuses presentation with the
underlying data that is being presented.
URLs are efficient resource locators but they are not sufficiently rich as resource links. For example, they may
point at a resource that has been relocated or destroyed; their granularity (a whole resource) is too coarsegrained
for many purposes.
HTTP is a simple protocol that can be implemented with a small footprint, and which can be put to use in many
types of content transfer and other types of service. Its verbosity (HTML messages tend to contain many
strings) makes it inefficient for passing small amounts of data.
HTTP and URLs are acceptable as a basis for client-server computing except that (a) there is no strong typechecking
(web services operate by-value type checking without compiler support), (b) there is the inefficiency
that we have mentioned.

1.5 Use the World Wide Web as an example to illustrate the concept of resource sharing, client and
server.
Resources in the World Wide Web and other services are named by URLs. What do the initials URL denote? Give examples of three different sorts of web resources that can be named by URLs.
1.5 Answer
Web Pages are examples of resources that are shared. These resources are managed by Web servers.
Client-server architecture. The Web Browser is a client program (e.g. Netscape) that runs on the user's
computer. The Web server accesses local files containing the Web pages and then supplies them to client
browser processes.
URL - Uniform Resource Locator
(3 of the following a file or a image, movies, sound, anything that can be rendered, a query to a database or to
a search engine.

1.6 Give an example of a URL.
List the three main components of a URL, stating how their boundaries are denoted and illustrating
each one from your example.
To what extent is a URL location transparent?
1.6 Answer
• The protocol to use. the part before the colon, in the example the protocol to use is http ("HyperText
Transport Protocol").
• The part between // and / is the Domain name of the Web server host www.dcs.qmw.ac.uk.
• The remainder refers to information on that host - named within the top level directory used by that Web
server research/distrib/book.html.
The hostname www is location independent so we have location transparency in that the address
of a particular computer is not included. Therefore the organisation may move the Web service to
another computer.
But if the responsibility for providing a WWW-based information service moves to another
organisation, the URL would need to be changed.

1.7 A server program written in one language (for example C++) provides the implementation of a
BLOB object that is intended to be accessed by clients that may be written in a different language
(for example Java). The client and server computers may have different hardware, but all of them
are attached to an internet. Describe the problems due to each of the five aspects of heterogeneity
that need to be solved to make it possible for a client object to invoke a method on the server
object.
1.7 Answer
As the computers are attached to an internet, we can assume that Internet protocols deal with differences in
networks.
But the computers may have different hardware - therefore we have to deal with differences of
representation of data items in request and reply messages from clients to objects. A common standard will be
defined for each type of data item that must be transmitted between the object and its clients.
The computers may run different operating systems, therefore we need to deal with different operations
to send and receive messages or to express invocations. Thus at the Java/C++ level a common operation would
be used which will be translated to the particular operation according to the operating system it runs on.
We have two different programming languages C++ and Java, they use different representations for data
structures such as strings, arrays, records. A common standard will be defined for each type of data structure
that must be transmitted between the object and its clients and a way of translating between that data structure
and each of the languages.
We may have different implementors, e.g. one for C++ and the other for Java. They will need to agree
on the common standards mentioned above and to document them.

1.8 An open distributed system allows new resource sharing services such as the BLOB object in
Exercise 1.7 to be added and accessed by a variety of client programs. Discuss in the context of
this example, to what extent the needs of openness differ from those of heterogeneity.
1.8 Answer
To add the BLOB object to an existing open distributed system, the standards mentioned in the answer to
Exercise 1.7 must already have been agreed for the distributed system To list them again:
• the distributed system uses a common set of communication protocols (probably Internet protocols).
• it uses an defined standard for representing data items (to deal with heterogeneity of hardware).
• It uses a common standard for message passing operations (or for invocations).
• It uses a language independent standard for representing data structures.
But for the open distributed system the standards must have been agreed and documented before the BLOB
object was implemented. The implementors must conform to those standards. In addition, the interface to the
BLOB object must be published so that when it is added to the system, both existing and new clients will be
able to access it. The publication of the standards allows parts of the system to be implemented by different
vendors and to work together.

Distributed Systems: Concepts and Design. by George Coulouris. Exercise Solutions

Edition 3
By George Coulouris, Jean Dollimore and Tim Kindberg
Addison-Wesley, ©Pearson Education 2001
Chapter 1 Exercise Solutions


1.1 Give five types of hardware resource and five types of data or software resource that can usefully
be shared. Give examples of their sharing as it occurs in distributed systems.
1.1 Answer



Hardware:
CPU: compute server (executes processor-intensive applications for clients), remote object server
(executes methods on behalf of clients), worm program (shares cpu capacity of desktop machine with the
local user). Most other servers, such as file servers, do some computation for their clients, hence their cpu
is a shared resource.
memory: cache server (holds recently-accessed web pages in its RAM, for faster access by other local
computers)
disk: file server, virtual disk server (see Chapter 8), video on demand server (see Chapter 15).
screen: Network window systems, such as X-11, allow processes in remote computers to update the
content of windows.
printer: networked printers accept print jobs from many computers. managing them with a queuing
system.
network capacity: packet transmission enables many simultaneous communication channels (streams of
data) to be transmitted on the same circuits.
Data/software:
web page: web servers enable multiple clients to share read-only page content (usually stored in a file, but
sometimes generated on-the-fly).
file: file servers enable multiple clients to share read-write files. Conflicting updates may result in
inconsistent results. Most useful for files that change infrequently, such as software binaries.
object: possibilities for software objects are limitless. E.g. shared whiteboard, shared diary, room booking
system, etc.
database: databases are intended to record the definitive state of some related sets of data. They have been
shared ever since multi-user computers appeared. They include techniques to manage concurrent updates.
newsgroup content: The netnews system makes read-only copies of the recently-posted news items
available to clients throughout the Internet. A copy of newsgroup content is maintained at each netnews
server that is an approximate replica of those at other servers. Each server makes its data available to
multiple clients.
video/audio stream: Servers can store entire videos on disk and deliver them at playback speed to multiple
clients simultaneously.
exclusive lock: a system-level object provided by a lock server, enabling several clients to coordinate their
use of a resource (such as printer that does not include a queuing scheme).

If you found the answer useful, please visit my other website. Exercise or Fitness Training has huge psychological and physical benefits. Train and dress up for the occasion.

Distributed Information Systems (DIS) Exam questions and Answers. Domain Name Service (DNS)

Clearly describe the purpose and architecture of the Domain Name Service (DNS). Your answer should:

  • Discuss the structure of the name space, and how this is reflected in the organisation of the domain name database.
  • Describe the functionalities of the various types of DNS server, and
  • Illustrate at least one example of an iterative query and at least one example of a recursive query.
Answer:


The main purpose of the DNS is to resolve human-friendly URLs into IP addresses
(numerical, logical addresses).



Architecture of DNS
- Domain Name Service (DNS) is a hierarchical system of name servers, each authoritive for
one or more domains within the Domain Name Space.
Organisation of name servers, root servers, then those lower down the hierarchy to leaf (zonedomain)
level. Delegation of responsibility resulting in a scalable and easy-to-modify
distributed database


The DNS hierarchical structure above


The following four types of server are used in the DNS:


Primary master retrieves data from the host that it runs on and its data is held in a stored
database. The Secondary master gets its data from another master that authoritative for
the zone (i.e. a Primary Master). It contacts an authoritative name server and
pulls the zone data over greatly reduce administrative load. The Caching name server does
not have a database of mappings between IP addresses and names at start-up. It knows of
Primary and Secondary servers which can supply such information if required. The use of
caching servers are used to reduce the load on Primary and Secondary servers. The slave
name server operates in a similar way to a Caching name server however it is less
sophisticated than the other types of server and cannot not follow redirections.
Query types could be either recursive or iterative. With iterative queries the NS gives the
best answer it already knows. This might result in the name server referring the requester to a
‘closer’ name server that it knows. – There is no additional querying of other name servers.
In contrast with recursive query resolution is managed by a single NS. The NS must return
the final answer. This may involve querying other name servers and following ‘referrals’
received thus resulting in further queries being sent to other name servers.


Recursive query above

If you found the answer useful, please visit my other website. Exercise or Fitness Training has huge psychological and physical benefits. Train and dress up for the occasion

Monday 18 April 2011

Introduction to Firewalls - HND and BSc level

A firewall is a hardware or software solution that enforces an organisation’s security policies, by restricting access to specific network resources. It enforces an access control policy between two networks. The actual means by which this is accomplished varies widely, but in principle, the firewall can be thought of as two mechanisms: one that blocks traffic, and one which permits traffic (rules). Probably the most important thing to recognise about a firewall is that it implements an access control policy.

The network inhabited by the gateway is often called a demilitarised zone (DMZ). The DMZ refers to a part of the network that is neither part of the internal network or directly part of the Internet.


4 general techniques that firewalls use to control access and enforce the site’s security policy:-

  • Service control – determines the type of Internet services that can be accessed inbound or outbound. The firewall may filter traffic on the basis of IP address and TCP port number: may provide proxy software that receives and interprets each server request before passing it on, or may host the server software
  • Direction control – determines the direction in which particular service requests may be initiated and allowed to flow through
  • User control – controls access to a service according to which user is attempting to access it. This feature is typically applied to users inside the firewall. It may also be applied to incoming traffic (requires some form of secure authentication).
  • Behaviour control – controls how services are used – e.g. may filter emails to eliminate spam.

Types of Firewalls
There are two general types of firewalls: application layer firewalls and packet filtering firewalls.

A Bastion host is one which has been identified as a critical strong point in the network’s security. Only services that are considered essential are installed on the bastion host and it operates a secure version of the operating system, making it a trusted system.


Firewall Configurations
There are three common firewall configurations:

  • screened host firewall, single homed bastion; 
  • screened host firewall, dual-homed bastion; 
  • screened subnet firewall.



Firewalls can not protect against attacks that bypass the firewall, disgruntled employees or the transfer of a virus-infected programs.

Thursday 14 April 2011

HND System Analysis Assignment

System Analysis
Assignment 1

Question 1
What are the main stages of a system development life cycle (SDLC)?
Answer
The Systems Development Life Cycle (SDLC) is a conceptual model used in project management that describes the stages involved in an information system development project from an initial feasibility study through maintenance of the completed application. Various SDLC methodologies have been developed to guide the processes involved including the waterfall model (the original SDLC method), rapid application development (RAD), joint application development (JAD), the fountain model and the spiral model. Mostly, several models are combined into some sort of hybrid methodology. Documentation is crucial regardless of the type of model chosen or devised for any application, and is usually done in parallel with the development process. Some methods work better for specific types of projects, but in the final analysis, the most important factor for the success of a project may be how closely particular plan was followed.
The list below is the classic Waterfall model methodology, which is the first SDLC method and it describes the various phases involved in development:
  1. Planning/ Feasibility
  2. Analysis
  3. Design
  4. Implementation
  5. Test
  6. Maintenance

Planning/feasibility studying
The feasibility study is used to determine if the project should get the go-ahead. If the project is to proceed, the feasibility study will produce a project plan and budget estimates for the future stages of development.
Requirement Analysis and Design
Analysisgathers the requirements for the system. This stage includes a detailed study of the business needs of the organization. Options for changing the business process may be considered. Design focuses on high level design like, what programs are needed and how are they going to interact, low-level design (how the individual programs are going to work), interface design (what are the interfaces going to look like) and data design (what data will be required). During these phases, the software's overall structure is defined. Analysis and Design are very crucial in the whole development cycle. Any glitch in the design phase could be very expensive to solve in the later stage of the software development. Much care is taken during this phase. The logical system of the product is developed in this phase.
Implementation
In this phase the designs are translated into code. Computer programs are written using a conventional programming language or an application generator. Programming tools like Compilers, Interpreters, Debuggers are used to generate the code. Different high level programming languages like C, C++, Pascal, Java are used for coding. With respect to the type of application, the right programming language is chosen.
Testing
In this phase the system is tested. Normally programs are written as a series of individual modules, these subject to separate and detailed test. The system is then tested as a whole. The separate modules are brought together and tested as a complete system. The system is tested to ensure that interfaces between modules work (integration testing), the system works on the intended platform and with the expected volume of data (volume testing) and that the system does what the user requires (acceptance/beta testing).
Maintenance
Inevitably the system will need maintenance. Software will definitely undergo change once it is delivered to the customer. There are many reasons for the change. Change could happen because of some unexpected input values into the system. In addition, the changes in the system could directly affect the software operations. The software should be developed to accommodate changes that could happen during the post implementation period.

Question 2
Explain the function and purpose of each and every stages of the SDLC in context of the SSADM. Clearly describe which measures must be taken after completing each stage and before starting the next stage of the life cycle.
Answer
  Planning and feasibility study
In this level analysis get all the information about the company, which need system of information. In another hand analysis must get good acknowledgement about all information that belongs to the system that going to build
The aim is to evaluate the feasibility of the proposal, involving an analysis of the problem and determination of the best solution; usually a range of potential solutions are presented. Context diagrams, current physical DFDs, overview ERDs, a requirements catalogue, project management techniques such as activity networks and Gantt charts are produced. To pass this stage and go through to system development a proposal must demonstrate fallowing stages:

• Economic feasibility
• Technical feasibility
• Operational feasibility

Economic feasibility
   Economic feasibility is to assess the costs required for alternative systems and set them against the expected benefits. The types of alternatives that are frequently considered are the manual/computer boundaries as some tasks may benefit more than other s from computerization and non-functional characteristics such as the time delay between the real world and the different parts of the system: should we be looking at batch, on-line or real-time or a combination? The system costs should also be estimated in terms of basic resources of money, people and time
      Technical Feasibility
This is concerned with whether the solution can be implemented using existing technology. If it can then existing technology may require upgrading or adding to. If it can be done then the solution may require the integration of equipment or software that has not been combined before. Non-functional requirements such as batch or on-line processing, maximum response time for user-computer interaction, estimated frequency of transactions, maximum record and file sizes, networking loads and typical number of users are considered here. In addition, requirements of system expansion, security, data archiving and reliability are considered
      Operational Feasibility
This investigates factors such as the likely reaction of employees and union representatives to job and other proposed organisational changes. The main aim is to assess whether the solution will operate and be used after installation. For example, if users are happy with the current system and see no reason to change then there may be a high degree of resistance to the new proposal. Relevant factors here concern whether the solution has general management support and whether or not the users have been involved in the development of the proposal.
Basically analysis is getting information by several survey methods .and investigate them as much as deep in side and decide kind of options available to resolve the case. An overview of the current processing and data is created. Current problems are documented as necessary improvements and any new data or functions that will be required. The intended users of the new system are also identified
One option that covers the stated minimum requirements and no more One option that covers every new requirement; Up to four options that each cover the stated minimum requirement and a different set of the other requirements.
The six options will then cover six different boundaries and six different functionalities - all will cover the minimum functionality required.
  “Business System Option-A Business System Option (BSO) describes a suggested new system in terms of its functionality and its boundary: inputs, outputs, processes and data are described. The aim is to help the users choose, from all the listed requirements, just what they want their new system to do.”


Logical system specification
Technical System Options
This assesses the different options for implementing the specification and describes the costs, benefits and constraints. Factors include internal and external constraints. External constraints consist of, for example, time, cost, business performance and any hardware or software constraints set in the feasibility study.
The procedure for producing and selecting Technical System Options is very similar to that for BSOs. First, draw up an initial list of approximately six options. The skeletal TSOs(technical system option)  should then be expanded to include details derived from potential suppliers such as:
• Cost;
• Facilities;
• Performance;
• Support etc.
The intention is not to decide on a choice of vendor but to establish ballpark figures and estimates to present to the Project Board for each TSO. As with BSOs, the range should cover:
• One option that suggests no change;
• One option that covers the stated minimum requirements and no more;
• One option that covers every new requirement;
• Up to four options that each covers the stated minimum requirement and a different set of the other requirements.
The range should then be examined to eliminate obvious non-starters. The remaining TSOs should then be presented to the board
“Logical Design
The Logical Dialogue of the system is defined. This does not  include the physical dialogues (menu structures, form designs etc.). Neither is this the stage at which the physical screen characteristics are defined. At this stage the logical exchange of data is defined.
The Update Processing is also defined. This specifies the logic of each database update required for an event. The Entity Life Histories are updated with State Indicators. State Indicators describe the specific state of the data associated with each event in the ELH. For example, when a Customer Record is created the initial state of all the attributes is empty. As the Customer Record is processed the state of the attributes will change over time. “

Physical Design
The Physical Environment the system will operate in is considered.
A Physical Environment Classification Scheme is used to categorize the physical environment. The scheme considers factors including:
• Data storage;
• Performance;
• Processing characteristics.
The characteristics, demands and constraints of the environment will clearly have an effect on translation from the Logical Design. Decisions such as demoralising, clustering and indexing will be made at this time.

Question 3
Describe the advantages and disadvantages of waterfall model and spiral model of system development.
Answer
Waterfall model
    The waterfall model is a sequential software development process, in which progress is seen as flowing steadily downwards (like a waterfall) through the phases of Conception, Initiation, Analysis, Design (validation), Construction, Testing and maintenance.
The waterfall development model has its origins in the manufacturing and construction industries; highly structured physical environments in which after-the-fact changes are prohibitively costly, if not impossible. Since no formal software development methodologies existed at the time, this hardware-oriented model was simply adapted for software development.
The first formal description of the waterfall model is often cited to be an article published in 1970 by Winston W. Royce (1929–1995), although Royce did not use the term "waterfall" in this article. Royce was presenting this model as an example of a flawed, non-working model (Royce 1970). This is in fact the way the term has generally been used in writing about software development—as a way to criticize a commonly used software practice.

Advantages of Waterfall Model
1. Clear project objectives.
2. Stable project requirements.
3. Progress of system is measurable.
4. Strict sign-off requirements.

Disadvantages of Waterfall Model
1. Time consuming
2. Never backward (Traditional)
3. Little room for iteration
4. Difficulty responding to changes
Spiral model
   Spiral model combines the iterative nature of prototyping with the controlled and systematic aspects of the waterfall model, therein providing the potential for rapid development of incremental versions of the software.  In this model the software is developed in a series of incremental releases with the early stages being either paper models or prototypes. Later iterations become increasingly more complete versions of the product.
Advantages of the Spiral Model
  1. The spiral model is a realistic approach to the development of large-scale software products because the software evolves as the process progresses. In addition, the developer and the client better understand and react to risks at each evolutionary level.
  2. The model uses prototyping as a risk reduction mechanism and allows for the development of prototypes at any stage of the evolutionary development.
  3.  It maintains a systematic stepwise approach, like the classic life cycle model, but incorporates it into an iterative framework that more reflect the real world.
  4. If employed correctly, this model should reduce risks before they become problematic, as consideration of technical risks are considered at all stages.
Disadvantages of the Spiral Model
  1. Demands considerable risk-assessment expertise
  2. It has not been employed as much proven models and hence may prove difficult to ‘sell’ to the client that this model is controllable and efficient.
  3. Highly customized limiting re-usability
  4.  Applied differently for each application
  5.  Risk of not meeting budget or schedule
  6.  Possibility to end up implemented as the Waterfall framework


Assignment 2
Assume that you have to build an IT system for Flaters Limited. Use the information from handout and a produce a project report which should include the following parts:
Question 1
Using your fact finding techniques, clearly identify the user needs and system requirements throughout all the departments. Annex any questionnaires or forms which you will be using for the above purpose.
Answer




Departments
Order Handling
Order Progress
Invoicing
Sales

Production
Component manufacture
Assembly
Packing & Despatch
Maintenance
Raw Materials

Accounts
Sales Ledger
Purchase Ledger
Budgetary Control

Personnel
Recruitment
Payroll
Sick Records
Pensions

Order Handling:
  • Despatch instructions are sent to despatch section (production dept)
  • Invoice is sent to customers
  • Invoice copy is sent to account department

Production Department:
  • Component Manufacture
    • Barrels
    • Caps
    • Pistons
    • Mountings
      1. Sides
      2. Spacers
      3. Name Plates
    • Springs
  • Assembly Shop: Body of the pump & the mountings are assembled first. Paint & dry the parts. Piston, valve and pressure gauge are added if required.
  • Packing & Dispatch
    • Checking the assembled pump;
    • Boxing the pump and putting into the storage;
    • Matching pumps to order and packing for despatch;
    • Preparing the despatch documentation;
    • Ensuring that adequate stocks are maintained.
  • The Maintenance
    • Maintaining the production Machines;
    • General Building Maintenance
    • Personnel Maintenance
  • The Raw Materials
    • Receipt of Raw Materials
    • Maintaining stock
    • Raising purchase orders

Personnel Department
Staff Recruitment: Recruitment of clerks, typists and production personnel.
Sick & Pension Fund Records: Maintain personnel records and prepare the statutory returns to the DSS for sick payments.
Payroll: Extensive references made to the personnel records to obtain relevant information.
  1. Time Recording (time office): Produces weekly time-sheet for each employee.
    • Hours worked
    • Hours worked on a given machine type
    • Overtime worked
  2. Wages Calculation: Calculates basic pay, bonus pay and net pay. The wages office receives information from:
    • Time-office – time-sheets
    • Personnel – Sick pay requirements
    • Tax Code
    • Pension and other deductions
    • Production – Production figures
  3. Pay office: Basic pay is calculated.  Employees can work on different machines or in different sections. ‘Idle time’ is produced for Production Management. Production sends the wages office a weekly report on production levels.


The output from the wages office:
  • Pay-slips which go to pay office
  • Inland revenue returns (tax, N.I.,sick pay)
  • Idle time statement to production management
  • Cost statement to by department/section to accounts
  • Cash requirement statements to bank

The pay-office is responsible for preparing the pay packets and issuing them to the employees.

Question 2
Produce a first cut use case diagram.
Answer























Question 3
Investigate the Flaters Limited organisation from the handout. Use information from the handout to produce the following using a case tool for the existing system:
  • Context diagram for the existing system
Answer














































·         Entity Relationship Diagram

Answer
































If you found the answer useful, please visit my other website. Exercise or Fitness Training has huge psychological and physical benefits. Train and dress up for the occasion