Computer Network | Hamming Code

Hamming code is a set of error-correction codes that can be used to detect and correct the errorsthat can occur when the data is moved or stored from the sender to the receiver. It is technique developed by R.W. Hamming for error correction.

Redundant bits –

Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer.
The number of redundant bits can be calculated using the following formula:

2^r ≥ m + r + 1 
 where, r = redundant bit, m = data bit

Suppose the number of data bits is 7, then the number of redundant bits can be calculated using:
= 2^4 ≥ 7 + 4 + 1
Thus, the number of redundant bits= 4

Parity bits –
A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in the data are even or odd. Parity bits are used for error detection. There are two types of parity bits:

  1. Even parity bit:
    In the case of even parity, for a given set of bits, the number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0.
  2. Odd Parity bit –
    In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.

General Algorithm of Hamming code –
The Hamming Code is simply the use of extra parity bits to allow the identification of an error.

  1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
  2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
  3. All the other bit positions are marked as data bits.
  4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form.
    a. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least significant
    position (1, 3, 5, 7, 9, 11, etc).
    b. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position from
    the least significant bit (2, 3, 6, 7, 10, 11, etc).
    c. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third position from
    the least significant bit (4–7, 12–15, 20–23, etc).
    d. Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth position from
    the least significant bit bits (8–15, 24–31, 40–47, etc).
    e. In general each parity bit covers all bits where the bitwise AND of the parity position and the bit position is
    non-zero.
  5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is
    odd.
  6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.

Determining the position of redundant bits –
These redundancy bits are placed at the positions which correspond to the power of 2.
As in the above example:

  1. The number of data bits = 7
  2. The number of redundant bits = 4
  3. The total number of bits = 11
  4. The redundant bits are placed at positions corresponding to power of 2- 1, 2, 4, and 8

Suppose the data to be transmitted is 1011001, the bits will be placed as follows:

Determining the Parity bits –

1. R1 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the least significant position.

R1: bits 1, 3, 5, 7, 9, 11

To find the redundant bit R1, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R1 is an even number the value of R1 (parity bit’s value) = 0

2. R2 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the second position from the least significant bit.

R2: bits 2,3,6,7,10,11

To find the redundant bit R2, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R2 is an odd number the value of R2(parity bit’s value)=1

3. R4 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the third position from the least significant bit.

R4: bits 4, 5, 6, 7

To find the redundant bit R4, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R4 is an odd number the value of R4(parity bit’s value) = 1

4. R8 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the fourth position from the least significant bit.

R8: bit 8,9,10,11

To find the redundant bit R8, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R8 is an even number the value of R8(parity bit’s value)=0.

Thus, the data transferred is:

Error detection and correction –
Suppose in the above example the 6th bit is changed from 0 to 1 during data transmission, then it gives new parity values in the binary number:

The bits give the binary number as 0110 whose decimal representation is 6. Thus, the bit 6 contains an error. To correct the error the 6th bit is changed from 1 to 0.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences, and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions.

You can use this cheat-sheet which I personally use!

You can learn more from us on Facebook, Twitter, and Instagram.

Computer Network | Hamming Code

Hamming code is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. It is technique developed by R.W. Hamming for error correction.

Redundant bits –

Redundant bits are extra binary bits that are generated and added to the information-carrying bits of data transfer to ensure that no bits were lost during the data transfer.
The number of redundant bits can be calculated using the following formula:

2^r ≥ m + r + 1 
 where, r = redundant bit, m = data bit

Suppose the number of data bits is 7, then the number of redundant bits can be calculated using:
= 2^4 ≥ 7 + 4 + 1
Thus, the number of redundant bits= 4

Parity bits –
A parity bit is a bit appended to a data of binary bits to ensure that the total number of 1’s in the data are even or odd. Parity bits are used for error detection. There are two types of parity bits:

  1. Even parity bit:
    In the case of even parity, for a given set of bits, the number of 1’s are counted. If that count is odd, the parity bit value is set to 1, making the total count of occurrences of 1’s an even number. If the total number of 1’s in a given set of bits is already even, the parity bit’s value is 0.
  2. Odd Parity bit –
    In the case of odd parity, for a given set of bits, the number of 1’s are counted. If that count is even, the parity bit value is set to 1, making the total count of occurrences of 1’s an odd number. If the total number of 1’s in a given set of bits is already odd, the parity bit’s value is 0.

General Algorithm of Hamming code –
The Hamming Code is simply the use of extra parity bits to allow the identification of an error.

  1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
  2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
  3. All the other bit positions are marked as data bits.
  4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form.
    a. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least significant
    position (1, 3, 5, 7, 9, 11, etc).
    b. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position from
    the least significant bit (2, 3, 6, 7, 10, 11, etc).
    c. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third position from
    the least significant bit (4–7, 12–15, 20–23, etc).
    d. Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth position from
    the least significant bit bits (8–15, 24–31, 40–47, etc).
    e. In general each parity bit covers all bits where the bitwise AND of the parity position and the bit position is
    non-zero.
  5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is
    odd.
  6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.

Determining the position of redundant bits –
These redundancy bits are placed at the positions which correspond to the power of 2.
As in the above example:

  1. The number of data bits = 7
  2. The number of redundant bits = 4
  3. The total number of bits = 11
  4. The redundant bits are placed at positions corresponding to power of 2- 1, 2, 4, and 8

Suppose the data to be transmitted is 1011001, the bits will be placed as follows:

Determining the Parity bits –

1. R1 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the least significant position.

R1: bits 1, 3, 5, 7, 9, 11

To find the redundant bit R1, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R1 is an even number the value of R1 (parity bit’s value) = 0

2. R2 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the second position from the least significant bit.

R2: bits 2,3,6,7,10,11

To find the redundant bit R2, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R2 is an odd number the value of R2(parity bit’s value)=1

3. R4 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the third position from the least significant bit.

R4: bits 4, 5, 6, 7

To find the redundant bit R4, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R4 is an odd number the value of R4(parity bit’s value) = 1

4. R8 bit is calculated using parity check at all the bits positions whose binary representation includes a 1 in the fourth position from the least significant bit.

R8: bit 8,9,10,11

To find the redundant bit R8, we check for even parity. Since the total number of 1’s in all the bit positions corresponding to R8 is an even number the value of R8(parity bit’s value)=0.

Thus, the data transferred is:

Error detection and correction –
Suppose in the above example the 6th bit is changed from 0 to 1 during data transmission, then it gives new parity values in the binary number:

The bits give the binary number as 0110 whose decimal representation is 6. Thus, the bit 6 contains an error. To correct the error the 6th bit is changed from 1 to 0.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences, and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions.

You can use this cheat-sheet which I personally use!

You can learn more from us on Facebook, Twitter, and Instagram.

Software Engineering | User Interface Design

User interface is the front-end application view to which user interacts in order to use the software. The software becomes more popular if its user interface is:

  • Attractive
  • Simple to use
  • Responsive in short time
  • Clear to understand
  • Consistent on all interface screens

There are two types of User Interface:

  1. Command Line Interface: Command Line Interface provides a command prompt, where the user types the command and feeds to the system. The user needs to remember the syntax of the command and its use.
  2. Graphical User Interface: Graphical User Interface provides the simple interactive interface to interact with the system. GUI can be a combination of both hardware and software. Using GUI, user interprets the software.

User Interface Design Process:

The analysis and design process of a user interface is iterative and can be represented by a spiral model. The analysis and design process of user interface consists of four framework activities.

  1. User, task, environmental analysis, and modeling: Initially, the focus is based on the profile of users who will interact with the system, i.e. understanding, skill and knowledge, type of user, etc, based on the user’s profile users are made into categories. From each category requirements are gathered. Based on the requirements developer understand how to develop the interface. Once all the requirements are gathered a detailed analysis is conducted. In the analysis part, the tasks that the user performs to establish the goals of the system are identified, described and elaborated. The analysis of the user environment focuses on the physical work environment. Among the questions to be asked are:
  • Where will the interface be located physically?
  • Will the user be sitting, standing, or performing other tasks unrelated to the interface?
  • Does the interface hardware accommodate space, light, or noise constraints?
  • Are there special human factors considerations driven by environmental factors?

2. Interface Design: The goal of this phase is to define the set of interface objects and actions i.e. Control mechanisms that enable the user to perform desired tasks. Indicate how these control mechanisms affect the system. Specify the action sequence of tasks and subtasks, also called a user scenario. Indicate the state of the system when the user performs a particular task. Always follow the three golden rules stated by Theo Mandel. Design issues such as response time, command and action structure, error handling, and help facilities are considered as the design model is refined. This phase serves as the foundation for the implementation phase.

3. Interface construction and implementation: The implementation activity begins with the creation of prototype (model) that enables usage scenarios to be evaluated. As iterative design process continues a User Interface toolkit that allows the creation of windows, menus, device interaction, error messages, commands, and many other elements of an interactive environment can be used for completing the construction of an interface.

4. Interface Validation: This phase focuses on testing the interface. The interface should be in such a way that it should be able to perform tasks correctly and it should be able to handle a variety of tasks. It should achieve all the user’s requirements. It should be easy to use and easy to learn. Users should accept the interface as a useful one in their work.

Golden Rules:

The following are the golden rules stated by Theo Mandel that must be followed during the design of the interface.

Place the user in control:

  • Define the interaction modes in such a way that does not force the user into unnecessary or undesired actions: The user should be able to easily enter and exit the mode with little or no effort.
  • Provide for flexible interaction: Different people will use different interaction mechanisms, some might use keyboard commands, some might use mouse, some might use touch screen, etc, Hence all interaction mechanisms should be provided.
  • Allow user interaction to be interruptable and undoable: When a user is doing a sequence of actions the user must be able to interrupt the sequence to do some other work without losing the work that had been done. The user should also be able to do undo operation.
  • Streamline interaction as skill level advances and allow the interaction to be customized: Advanced or highly skilled user should be provided a chance to customize the interface as user wants which allows different interaction mechanisms so that user doesn’t feel bored while using the same interaction mechanism.
  • Hide technical internals from casual users: The user should not be aware of the internal technical details of the system. He should interact with the interface just to do his work.
  • Design for direct interaction with objects that appear on screen: The user should be able to use the objects and manipulate the objects that are present on the screen to perform a necessary task. By this, the user feels easy to control over the screen.

Reduce the user’s memory load:

  • Reduce demand on short-term memory: When users are involved in some complex tasks the demand on short-term memory is significant. So the interface should be designed in such a way to reduce the remembering of previously done actions, given inputs and results.
  • Establish meaningful defaults: Always initial set of defaults should be provided to the average user, if a user needs to add some new features then he should be able to add the required features.
  • Define shortcuts that are intuitive: Mnemonics should be used by the user. Mnemonics means the keyboard shortcuts to do some action on the screen.
  • The visual layout of the interface should be based on a real-world metaphor: Anything you represent on a screen if it is a metaphor for real-world entity then users would easily understand.
  • Disclose information in a progressive fashion: The interface should be organized hierarchically i.e. on the main screen the information about the task, an object or some behavior should be presented first at a high level of abstraction. More detail should be presented after the user indicates interest with a mouse pick.

Make the interface consistent:

  • Allow the user to put the current task into a meaningful context: Many interfaces have dozens of screens. So it is important to provide indicators consistently so that the user know about the doing work. The user should also know from which page has navigated to the current page and from the current page where can navigate.
  • Maintain consistency across a family of applications: The development of some set of applications all should follow and implement the same design, rules so that consistency is maintained among applications.
  • If past interactive models have created user expectations do not make changes unless there is a compelling reason.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well-explained solutions for selected questions.

Come and start learning at http://www.techcodebit.com

You can use this cheat-sheet which I personally use!

Software Engineering | SDLC V-Model

The V-model is a type of SDLC model where process executes in a sequential manner in V-shape. It is also known as Verification and Validation model. It is based on the association of a testing phase for each corresponding development stage. Development of each step directly associated with the testing phase. The next phase starts only after completion of the previous phase i.e. for each development activity, there is a testing activity corresponding to it.

Verification: It involves a static analysis technique (review) done without executing code. It is the process of evaluation of the product development phase to find whether specified requirements meet.

Validation: It involves dynamic analysis technique (functional, non-functional), testing is done by executing code. Validation is the process to evolute the software after completion of the development phase to determine whether software meets the customer expectations and requirements.

So V-Model contains Verification phases on one side of the Validation phases on the other side. Verification and Validation phase joined by coding phase in V-shape. So it is called as V-Model.

Design Phase:

  • Requirement Analysis: This phase contains detailed communication with the customer to understand the requirement and their expectations. This stage is known as Requirement Gathering.
  • System Design: This phase contains the system design and the complete hardware and communication setup for developing the product.
  • Architectural Design: System design is broken down further into modules taking up different functionality. The data transfer and communication between the internal modules and with the outside world (other systems) is clearly understood.
  • Module Design: In this phase, the system breaks down into small modules. The detailed design of system modules is specified, known as Low-Level Design (LLD).

Testing Phases:

  • Unit Testing: Unit Test Plans are developed during module design phase. These Unit Test Plans are executed to eliminate bugs at code level or unit level.
  • Integration testing: After completion of unit testing Integration testing performs. In integration testing, integrate modules and test the system. Integration testing performs on the Architecture design phase. This test verifies the communication of modules among themselves.
  • System Testing: System testing test the complete application with their functionality, interdependency, and communication. The System Testing test the functional and non-functional requirements of the developed application.
  • User Acceptance Testing (UAT): UAT is performed in a user environment that resembles the production environment. UAT verifies that the delivered system meets user’s requirement and system is ready for use in real time.

Industrial Challange: As the industry has evolved, the technologies have become more complex, increasingly faster, and forever changing, however, there remains a set of basic principles and concepts that are as applicable today as when IT was in its infancy.

  • Accurately define and refine user requirements.
  • Design and build an application according to the authorized user requirements.
  • Validate that the application they had built adhered to the authorized business requirements.

Principles of V-Model:

  • Large to Small: In V-Model, testing is done in a hierarchical perspective, For example, requirements identified by the project team, create High-Level Design, and Detailed Design phases of the project. As each of these phases is completed the requirements, they are defining become more and more refined and detailed.
  • Data/Process Integrity: This principle states that the successful design of any project requires the incorporation and cohesion of both data and processes. Process elements must be identified at each and every requirements.
  • Scalability: This principle states that the V-Model concept has the flexibility to accommodate any IT project irrespective of its size, complexity or duration.
  • Cross-Referencing: Direct correlation between requirements and corresponding testing activity is known as cross-referencing.
  • Tangible Documentation: This principle states that every project needs to create a document. This documentation is required and applied by both the project development team and the support team. Documentation is used to maintaining the application once it is available in a production environment.

Why preferred?

  • It is easy to manage due to the rigidity of the model. Each phase of V-Model has specific deliverables and a review process.
  • Proactive defect tracking — that is defects are found at early stage.

When to use?

  • Where requirements are clearly defined and fixed.
  • The V-Model is used when ample technical resources are available with technical expertise.

Advantages:

  • This is a highly disciplined model and Phases are completed one at a time.
  • V-Model is used for small projects where project requirements are clear.
  • Simple and easy to understand and use.

Disadvantages:

  • High risk and uncertainty.
  • It is not good for complex and object-oriented projects.
  • It is not suitable for projects where requirements are not crear and contains high risk of changing.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well-explained solutions for selected questions.

Come and start learning at http://www.techcodebit.com

You can use this cheat-sheet which I personally use!

Software Engineering | Classification of Software

The software is used extensively in several domains including hospitals, banks, schools, defence, finance, stock markets and so on. It can be categorized into different types:

On the basis of application:

  1. System Software –
    System Software is necessary to manage the computer resources and support the execution of application programs. Software like operating systems, compilers, editors and drivers etc., come under this category. A computer cannot function without the presence of these. Operating systems are needed to link the machine dependent needs of a program with the capabilities of the machine on which it runs. Compilers translate programs from high-level language to machine language.
  2. Networking and Web Applications Software –
    Networking Sofware provides the required support necessary for computers to interact with each other and with data storage facilities. The networking software is also used when software is running on a network of computers (such as the World Wide Web). It includes all network management software, server software, security and encryption software and software to develop web-based applications like HTML, PHP, XML, etc.
  3. Embedded Software –
    This type of software is embedded into the hardware normally in the Read Only Memory (ROM) as a part of a large system and is used to support certain functionality under the control conditions. Examples are software used in instrumentation and control applications, washing machines, satellites, microwaves, washing machines etc.
  4. Reservation Software –
    A Reservation system is primarily used to store and retrieve information and perform transactions related to air travel, car rental, hotels, or other activities. They also provide access to bus and railway reservations, although these are not always integrated with the main system. These are also used to relay computerized information for users in the hotel industry, making a reservation and ensuring that the hotel is not overbooked.
  5. Business Software –
    This category of software is used to support the business applications and is the most widely used category of software. Examples are software for inventory management, accounts, banking, hospitals, schools, stock markets, etc.
  6. Entertainment Software –
    Education and entertainment software provides a powerful tool for educational agencies, especially those that deal with educating young children. There is a wide range of entertainment software such as computer games, educational games, translation software, mapping software, etc.
  7. Artificial Intelligence Software –
    Software like expert systems, decision support systems, pattern recognition software, artificial neural networks, etc. come under this category. They involve complex problems which are not affected by complex computations using non-numerical algorithms.
  8. Scientific Software –
    Scientific and engineering software satisfies the needs of a scientific or engineering user to perform enterprise specific tasks. Such software is written for specific applications using principles, techniques and formulae specific to that field. Examples are software like MATLAB, AUTOCAD, PSPICE, ORCAD, etc.
  9. Utilities Software –
    The programs coming under this category perform specific tasks and are different from other software in terms of size, cost and complexity. Examples are anti-virus software, voice recognition software, compression programs, etc.
  10. Document Management Software –
    A Document Management Software is used to track, manage and store documents in order to reduce the paperwork. Such systems are capable of keeping a record of the various versions created and modified by different users (history tracking). They commonly provide storage, versioning, metadata, security, as well as indexing and retrieval capabilities.

On the basis of copyright:

  1. Commercial –

It represents the majority of the software which we purchase from software companies, commercial computer stores, etc. In this case, when a user buys a software, they acquire a license key to use it. Users are not allowed to make the copies of the software. The copyright of the program is owned by the company.

2. Shareware –

Shareware software is also covered under copyright but the purchasers are allowed to make and distribute copies with the condition that after testing the software, if the purchaser adopts it for use, then they must pay for it.

In both of the above types of software, changes to software are not allowed.

3. Freeware –

In general, according to freeware software licenses, copies of the software can be made both for archival and distribution purposes but here, distribution cannot be for making a profit. Derivative works and modifications to the software are allowed and encouraged. Decompiling of the program code is also allowed without the explicit permission of the copyright holder.

4. Public Domain –
In the case of public domain software, the original copyright holder explicitly relinquishes all rights to the software. Hence software copies can be made both for archival and distribution purposes with no restrictions on distribution. Modifications to the software and reverse engineering are also allowed.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well-explained solutions for selected questions.

Come and start learning at http://www.techcodebit.com

You can use this cheat-sheet which I personally use!

Software Engineering | Project Management Process

Project Management is the application of knowledge, skills, tools and techniques to project activities to meet the project requirements.

Project Management Process consists of the following 4 stages:

  • Feasibility study
  • Project Planning
  • Project Execution
  • Project Termination

Feasibility Study:
Feasibility study explores system requirements to determine project feasibility. There are several fields of feasibility study including economic feasibility, operational feasibility, technical feasibility. The goal is to determine whether the system can be implemented or not. The process of feasibility study takes as input the requirement details as specified by the user and other domain-specific details. The output of this process simply tells whether the project should be undertaken or not and if yes, what would the constraints be. Additionally, all the risks and their potential effects on the projects are also evaluated before a decision to start the project is taken.

Project Planning:
A detailed plan stating stepwise strategy to achieve the listed objectives is an integral part of any project.
Planning consists of the following activities:

  • Set objectives or goals
  • Develop strategies
  • Develop project policies
  • Determine courses of action
  • Making planning decisions
  • Set procedures and rules for the project
  • Develop a software project plan
  • Prepare budget
  • Conduct risk management
  • Document software project plans

This step also involves the construction of a work breakdown structure(WBS). It also includes size, effort, schedule and cost estimation using various techniques.

Project Execution:
A project is executed by choosing an appropriate software development lifecycle model(SDLC). It includes a number of steps including requirements analysis, design, coding, testing and implementation, testing, delivery and maintenance. There are a number of factors that need to be considered while doing so including the size of the system, the nature of the project, time and budget constraints, domain requirements, etc. An inappropriate SDLC can lead to failure of the project.

Project Termination:
There can be several reasons for the termination of a project. Though expecting a project to terminate after successful completion is conventional, but at times, a project may also terminate without completion. Projects have to be closed down when the requirements are not fulfilled according to given time and cost constraints.
Some of the reasons for failure include:

  • Fast changing technology
  • Project running out of time
  • Organizational politics
  • Too much change in customer requirements
  • Project exceeding budget or funds

Once the project is terminated, a post-performance analysis is done. Also, a final report is published describing the experiences, lessons learned, recommendations for handling future projects.

Description:

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences, and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions.

Come and start learning at http://www.techcodebit.com

You can use this cheat-sheet which I personally use!

Line Configuration in Computer Networks

A network is two or more devices connected through a link. A link is a communication pathway that transfer data from one device to another. Devices can be a computer, printer or any other device that is capable to send and receive data. For visualization purpose, imagine any link as a line drawn between two points.
For communication to occur, two devices must be connected in some way to the same link at the same time. There are two possible types of connections:

  1. Point-to-Point Connection
  2. Multipoint Connection

Point-to-Point Connection :

  1. A point-to-point connection provides a dedicated link between two devices.
  2. The entire capacity of the link is reserved for transmission between those two devices.
  3. Most point-to-point connections use a actual length of wire or cable to connect the two end, but other options such as microwave or satellite links are also possible.
  4. Point to point network topology is considered to be one of the easiest and most conventional network
    topologies.
  5. It is also the simplest to establish and understand.

Example: Point-to-Point connection between remote control and Television for changing the channels.

Multipoint Connection :

  1. It is also called Multidrop configuration. In this connection two or more devices share a single link.
  2. More than two devices share the link that is the capacity of the channel is shared now. With shared capacity, there can be two possibilities in a Multipoint Line configuration:

Spatial Sharing: If several devices can share the link simultaneously, its called Spatially shared line configuration.
Temporal (Time) Sharing: If users must take turns using the link , then its called Temporally shared or Time Shared Line configuration.

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.

We also get you connected with the right companies worldwide based on your skills and preferences, and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions.

Come and start learning at http://www.techcodebit.com

You can learn more from us on Facebook, Twitter, and Instagram.

Basics of Computer Networking

Open system:
A system which is connected to the network and is ready for communication.

Closed system:
A system which is not connected to the network and can’t be communicated with.

Computer Network: 
It is the interconnection of multiple devices, generally termed as Hosts connected using multiple paths for the purpose of sending/receiving data or media.
There are also multiple devices or mediums which helps in the communication between two different devices which are known as Network devices. Ex: Router, Switch, Hub, Bridge.

The layout pattern using which devices are interconnected is called as network topology. Such as Bus, Star, Mesh, Ring, Daisy chain.

OSI:
OSI stands for Open Systems Interconnection. It is a reference model that specifies standards for communications protocols and also the functionalities of each layer.

Protocol: 
Protocol is the set of rules or algorthims which define the way how two entities can communicate across the network and there exists different protocol defined at each layer of OSI model. Few of such protocols are TCP, IP, UDP, ARP, DHCP, FTP and so on.

UNIQUE IDENTIFIERS OF NETWORK
Host name:
Each device in the network is associated with a unique device name known as Hostname.
Type “hostname” in the command prompt and press ‘Enter’, this displays the hostname of your machine.

IP Address (Internet Protocol address):
Also know as Logical Address, is the network address of the system across the network.
To identify each device in the world-wide web, Internet Assigned Numbers Authority (IANA) assigns IPV4 (Version 4) address as unique identifier for each device on the Internet.
Length of the IP address is : 32-bits. (Hence we have 2³² ip addresses available.)
Type “ipconfig” in the command prompt and press ‘Enter’, this gives us the IP address of the device.

MAC Address (Media Access Control address): 
Also known as physical address, is the unique identifier of each host and is associated with the NIC (Network Interface Card).
MAC address is assigned to the NIC at the time of manufacturing.
Length of the MAC address is : 12-digit/ 6 bytes/ 48 bits
Type “ipconfig/all” in the command prompt and press ‘Enter’, this gives us the MAC address.

Port: 
Port can be referred as logical channel through which data can be sent/received to an application. Any host may have multiple applications running, and each of this application is identified using the port number on which they are running on.
Port number is a 16-bit integer, hence we have 2¹⁶ ports available which are categorized as shown below:

Number of ports: 65,536
Range: 0–65535
Type “netstat -a” in the command prompt and press ‘Enter’, this lists all the ports being used.

Socket:
The unique combination of IP address and Port number together are termed as Socket.

Few more concepts
DNS Server:
DNS stands for Domain Name system.
DNS is basically a server which translate web addresses or URL (ex: www.google.com) into their corresponding IP addresses. We don’t have to remember all the IP addresses of each and every website.
The command ‘nslookup’ gives you the IP address of the domain you are looking for. This also provides the information of our DNS Server.

ARP:
ARP stands for Address Resolution Protocol.
It is used to convert the IP address to its corresponding Physical Address(i.e.MAC Address).
ARP is used by the Data Link Layer to identify the MAC address of the Receiver’s machine.
RARP:
RARP stands for Reverse Address Resolution Protocol.
As the name suggest, it provides the IP address of the a device given physical address as input. But RARP has become obsolete since the time DHCP has come into picture.

We help you polish your skills and get ready for the job, whether you are a fresh college graduate or a working professional.
We also get you connected with the right companies worldwide based on your skills and preferences, and do everything needed to make sure you get your dream job.

How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions.
Come and start learning at http://www.techcodebit.com

You can learn more from us on Facebook, Twitter, and Instagram.

Virtual Memory | Operating System

Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of main memory. The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites, and program generated addresses are translated automatically to the corresponding machine addresses.
The size of virtual storage is limited by the addressing scheme of the computer system and amount of secondary memory is available not by the actual number of the main storage locations.

It is a technique that is implemented using both hardware and software. It maps memory addresses used by a program, called virtual addresses, into physical addresses in computer memory.

  1. All memory references within a process are logical addresses that are dynamically translated into physical addresses at run time. This means that a process can be swapped in and out of main memory such that it occupies different places in main memory at different times during the course of execution.
  2. A process may be broken into number of pieces and these pieces need not be continuously located in the main memory during execution. The combination of dynamic run-time addres translation and use of page or segment table permits this.

If these characteristics are present then, it is not necessary that all the pages or segments are present in the main memory during execution. This means that the required pages need to be loaded into memory whenever required. Virtual memory is implemented using Demand Paging or Demand Segmentation.

Demand Paging :
The process of loading the page into memory on demand (whenever page fault occurs) is known as demand paging.
The process includes the following steps :

  1. If CPU try to refer a page that is currently not available in the main memory, it generates an interrupt indicating memory access fault.
  2. The OS puts the interrupted process in a blocking state. For the execution to proceed the OS must bring the required page into the memory.
  3. The OS will search for the required page in the logical address space.
  4. The required page will be brought from logical address space to physical address space. The page replacement algorithms are used for the decision making of replacing the page in physical address space.
  5. The page table will updated accordingly.
  6. The signal will be sent to the CPU to continue the program execution and it will place the process back into ready state.

Hence whenever a page fault occurs these steps are followed by the operating system and the required page is brought into memory.

Advantages :

  • More processes may be maintained in the main memory: Because we are going to load only some of the pages of any particular process, there is room for more processes. This leads to more efficient utilization of the processor because it is more likely that at least one of the more numerous processes will be in the ready state at any particular time.
  • A process may be larger than all of main memory: One of the most fundamental restrictions in programming is lifted. A process larger than the main memory can be executed because of demand paging. The OS itself loads pages of a process in main memory as required.
  • It allows greater multiprogramming levels by using less of the available (primary) memory for each process.

Page Fault Service Time :
The time taken to service the page fault is called as page fault service time. The page fault service time includes the time taken to perform all the above six steps.

Let Main memory access time is: m
Page fault service time is: s
Page fault rate is : p
Then, Effective memory access time = (p*s) + (1-p)*m

Swapping:

Swapping a process out means removing all of its pages from memory, or marking them so that they will be removed by the normal page replacement process. Suspending a process ensures that it is not runnable while it is swapped out. At some later time, the system swaps back the process from the secondary storage to main memory. When a process is busy swapping pages in and out then this situation is called thrashing.

Thrashing :

At any given time, only few pages of any process are in main memory and therefore more processes can be maintained in memory. Furthermore time is saved because unused pages are not swapped in and out of memory. However, the OS must be clever about how it manages this scheme. In the steady state practically, all of main memory will be occupied with process’s pages, so that the processor and OS has direct access to as many processes as possible. Thus when the OS brings one page in, it must throw another out. If it throws out a page just before it is used, then it will just have to get that page again almost immediately. Too much of this leads to a condition called Thrashing. The system spends most of its time swapping pages rather than executing instructions. So a good page replacement algorithm is required.

In the given diagram, initial degree of multi programming upto some extent of point(lamda), the CPU utilization is very high and the system resources are utilized 100%. But if we further increase the degree of multi programming the CPU utilization will drastically fall down and the system will spent more time only in the page replacement and the time taken to complete the execution of the process will increase. This situation in the system is called as thrashing.

Causes of Thrashing :

  1. High degree of multiprogramming : If the number of processes keeps on increasing in the memory than number of frames allocated to each process will be decreased. So, less number of frames will be available to each process. Due to this, page fault will occur more frequently and more CPU time will be wasted in just swapping in and out of pages and the utilization will keep on decreasing.
  2. For example:
    Let free frames = 400
    Case 1: Number of process = 100
    Then, each process will get 4 frames.
  3. Case 2: Number of process = 400
    Each process will get 1 frame.
    Case 2 is a condition of thrashing, as the number of processes are increased,frames per process are decreased. Hence CPU time will be consumed in just swapping pages.
  4. Lacks of Frames:If a process has less number of frames then less pages of that process will be able to reside in memory and hence more frequent swapping in and out will be required. This may lead to thrashing. Hence sufficient amount of frames must be allocated to each process in order to prevent thrashing.

Recovery of Thrashing :

  • Do not allow the system to go into thrashing by instructing the long term scheduler not to bring the processes into memory after the threshold.
  • If the system is already in thrashing then instruct the mid term schedular to suspend some of the processes so that we can recover the system from thrashing.

We have built the accelerating growth-oriented website for budding engineers and aspiring job holders of technology companies such as Google, Facebook, and Amazon
If you would like to study our free courses you can join us at

http://www.techcodebit.com. #techcodebit #google #microsoft #facebook #interview portal #jobplacements
#technicalguide