System Software Question Answer Part 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Differentiate between different types of computer architecture:

Computer Architecture is a blueprint for design and implementation of a


computer system. It refers to the overall design of a computer system, including
the hardware and software components that make up the system and how they
interact with each other.

Computer architecture provides the functional details and behavior of a computer


system. It involves the design of the instruction set, the microarchitecture, and
the memory hierarchy, as well as the design of the hardware and software
components that make up the system.

Computer Architecture mainly deals with the functional behavior of a computer


system and covers the "What to do?" part. It gives the functional description of
requirements, design, and implementation of the different parts of a computer
system.

Different type of computer architecture:

A) Purpose: Computer architecture explains what a computer should do.


B) Target: Computer architecture provides functional behavior of computer system.
C) Design: Computer architecture deals with high level design.
D) Role: Computer architecture assists in understanding the functionality of the computer.
E) Actors: Actors in Computer architecture are hardware parts.
F) Order: Computer architecture is designed first.
G) Involves: Computer architecture involves the relationship among logical attributes of the
system like instruction sets, data types, addressing modes, etc.
Classify the computer languages with proper diagram.

A programming language defines a set of instructions that are compiled together


to perform a specific task by the CPU (Central Processing Unit). The programming
language mainly refers to high-level languages such as C, C++, Pascal, Ada, COBOL,
etc.

Each programming language contains a unique set of keywords and syntax, which
are used to create a set of instructions. Thousands of programming languages
have been developed till now, but each language has its specific purpose. These
languages vary in the level of abstraction they provide from the hardware. Some
programming languages provide less or no abstraction while some provide higher
abstraction. Based on the levels of abstraction, they can be classified into two
categories:

o Low-level language
o High-level language

The image which is given below describes the abstraction level from hardware. As
we can observe from the below image that the machine language provides no
abstraction, assembly language provides less abstraction whereas high-level
language provides a higher level of abstraction.

Define and discuss the different steps of software development life cycle (SDLC)
with diagram

SDLC is a process followed for a software project, within a software organization.


It consists of a detailed plan describing how to develop, maintain, replace and
alter or enhance specific software. The life cycle defines a methodology for
improving the quality of software and the overall development process.

Stage 1: Planning and Requirement Analysis


Requirement analysis is the most important and fundamental stage in SDLC. It is
performed by the senior members of the team with inputs from the customer,
the sales department, market surveys and domain experts in the industry. This
information is then used to plan the basic project approach and to conduct
product feasibility study in the economical, operational and technical areas.

Planning for the quality assurance requirements and identification of the risks
associated with the project is also done in the planning stage. The outcome of the
technical feasibility study is to define the various technical approaches that can be
followed to implement the project successfully with minimum risks.

Stage 2: Defining Requirements

Once the requirement analysis is done the next step is to clearly define and
document the product requirements and get them approved from the customer
or the market analysts. This is done through an SRS (Software Requirement
Specification) document which consists of all the product requirements to be
designed and developed during the project life cycle.

Stage 3: Designing the Product Architecture

SRS is the reference for product architects to come out with the best architecture
for the product to be developed. Based on the requirements specified in SRS,
usually more than one design approach for the product architecture is proposed
and documented in a DDS - Design Document Specification.

This DDS is reviewed by all the important stakeholders and based on various
parameters as risk assessment, product robustness, design modularity, budget
and time constraints, the best design approach is selected for the product.

A design approach clearly defines all the architectural modules of the product
along with its communication and data flow representation with the external and
third party modules (if any). The internal design of all the modules of the
proposed architecture should be clearly defined with the minutest of the details
in DDS.

Stage 4: Building or Developing the Product


In this stage of SDLC the actual development starts and the product is built. The
programming code is generated as per DDS during this stage. If the design is
performed in a detailed and organized manner, code generation can be
accomplished without much hassle.

Developers must follow the coding guidelines defined by their organization and
programming tools like compilers, interpreters, debuggers, etc. are used to
generate the code. Different high level programming languages such as C, C++,
Pascal, Java and PHP are used for coding. The programming language is chosen
with respect to the type of software being developed.

Stage 5: Testing the Product

This stage is usually a subset of all the stages as in the modern SDLC models, the
testing activities are mostly involved in all the stages of SDLC. However, this stage
refers to the testing only stage of the product where product defects are
reported, tracked, fixed and retested, until the product reaches the quality
standards defined in the SRS.

Stage 6: Deployment in the Market and Maintenance

Once the product is tested and ready to be deployed it is released formally in the
appropriate market. Sometimes product deployment happens in stages as per the
business strategy of that organization. The product may first be released in a
limited segment and tested in the real business environment (UAT- User
acceptance testing).

Define Life Cycle of a Source Program

The meaning of source code is determined and then intermediate code is created
from the source program. Analysis phase contains mainly three sub-phases
named lexical analysis, syntax analysis and semantic analysis.Synthesis Phase: This
phase of compilation process is machine dependent.
Explain Semantic gap, Execution domain, specification gap, execution gap

The “semantic gap” as it is often referenced in IT is the difference between high-


level programming sets in various computer languages, and the simple computing
instructions that microprocessors work with in machine language. This classic
difference has compelled engineers and designers to look at different ways of
mediating between high-level language and basic machine language.

Execution domain specification allows you to set a model and its subsystems and
referenced models to simulate as discrete-time or data-driven systems.

Specification gap: It is the semantic gap between the application domain and the
PL domain. It can also be defined as the semantic gap between the two
specifications of the same task. The specification gap is bridged by the software
development team.

Execution gap: It is the gap between the semantics of programs written in


different programming languages. The execution gap is bridged by the translator
or interpreter.

Between stack and heap

Stack Allocation: The allocation happens on contiguous blocks of memory. We


call it a stack memory allocation because the allocation happens in the function
call stack. The size of memory to be allocated is known to the compiler and
whenever a function is called, its variables get memory allocated on the stack.
And whenever the function call is over, the memory for the variables is de-
allocated. This all happens using some predefined routines in the compiler. A
programmer does not have to worry about memory allocation and de-allocation
of stack variables. This kind of memory allocation is also known as Temporary
memory allocation because as soon as the method finishes its execution all the
data belonging to that method flushes out from the stack automatically. This
means any value stored in the stack memory scheme is accessible as long as
the method hasn’t completed its execution and is currently in a running state.

Heap Allocation: The memory is allocated during the execution of instructions


written by programmers. Note that the name heap has nothing to do with
the heap data structure. It is called a heap because it is a pile of memory space
available to programmers to allocate and de-allocate. Every time when we
made an object it always creates in Heap-space and the referencing information
to these objects is always stored in Stack-memory. Heap memory allocation
isn’t as safe as Stack memory allocation because the data stored in this space
is accessible or visible to all threads. If a programmer does not handle this
memory well, a memory leak can happen in the program.

Hash Table is a data structure which stores data in an associative manner. In a


hash table, data is stored in an array format, where each data value has its own
unique index value. Access of data becomes very fast if we know the index of
the desired data. Thus, it becomes a data structure in which insertion and
search operations are very fast irrespective of the size of the data. Hash Table
uses an array as a storage medium and uses hash technique to generate an
index where an element is to be inserted or is to be located from.

Different Elements of Assembly Language Programming

An assembly language is a programming language that


communicates with the hardware of a computer directly.
An assembly language allows a software developer to
code using words and expressions that can be easier
to understand and interpret than the binary or
hexadecimal data the computer stores and reads.

There are common components an assembly language is


likely to use, including:

Syntax

The syntax of an assembly language is its structural composition. For a computer


to interpret and assemble code, it requires a consistent format the computer
assembler understands. The syntax for assembly languages often uses a basic
structure with a single command on each line of code.

Label
A label is a word, number or symbol the assembly code uses as a reference point
to locate the date or instruction to use. The code can call the label elsewhere to
access the information in that location. Often, labels in assembly languages
comprise a numerical system, with lines of code possessing higher numbers as
you progress down the code.

Command

A command is an order in a piece of assembly code that tells the assembler what
action to perform. This provides a basic method of data manipulation the
assembler can use to simplify a user's interactions with the system. Often,
commands in assembly languages use abbreviations to keep the terminology
short while also using self-descriptive abbreviations, such as a language using
"ADD" for addition and "MOV" to transfer data.

Operand

An operand is a component the assembler can manipulate, such as a variable or


piece of data. By including operands in instructions, you can tell the assembly
language to which data to apply any commands on that line. This makes operands
a critical coding component with an assembly language to create functional
applications.

Directive

A directive is a type of statement that provides instruction to the assembler to


change a setting or perform an action. The syntax for an assembly language
commonly dictates a specific character at the start of a directive, such as a period.
This tells the assembler the following text is a directive to follow. Syntax also
commonly requires each directive to begin on a new line in the code.

Macro

A macro is a statement that functions as a short representation of a sequence of


other instructions and directives. You then can call this macro elsewhere in the
code, which triggers the macro to run. This makes your code more efficient by
allowing you to replicate extensive code sections more than once as shorter
macro calls. You also can update your code more efficiently because changing the
macro changes all references to the macro.

Mnemonic

A mnemonic is a term that calls an operation, and it commonly comprises an


abbreviation of a description of the action it performs. It's a symbolic name for a
task a machine language can process. Mnemonics add functionality to an
assembly language by providing coders with a basic method of calling and using
functions, such as moving data to a new location or manipulating a piece of data
to store a new value.

Explain Design of Assembler with diagram

Assembler Directives
Assembler directives supply data to the program and control the assembly
process. Assembler directives enable you to do the following:

 Assemble code and data into specified sections

 Reserve space in memory for uninitialized variables

o Control the appearance of listings

o Initialize memory

o Assemble conditional blocks

o Define global variables

o Specify libraries from which the assembler can obtain macros

o Examine symbolic debugging information

Write a small assembly level program to input two number


and add them and store the result in memory.

Problem – Write an assembly language program to add two 8 bit numbers stored
at address 2050 and address 2051 in 8085 microprocessor. The starting address of
the program is taken as 2000.

Algorithm –

1. Load the first number from memory location 2050 to accumulator.


2. Move the content of accumulator to register H.
3. Load the second number from memory location 2051 to accumulator.
4. Then add the content of register H and accumulator using “ADD” instruction
and storing result at 3050
5. The carry generated is recovered using “ADC” command and is stored at
memory location 3051
Memory Address Mnemonics Comment

2000 LDA 2050 A<-[2050]

2003 MOV H, A H<-A

2004 LDA 2051 A<-[2051]

2007 ADD H A<-A+H

2008 MOV L, A L←A

2009 MVI A 00 A←00

200B ADC A A←A+A+carry

200C MOV H, A H←A

200D SHLD 3050 H→3051, L→3050

2010 HLT

You might also like