Chapter 2 – Know Your Standards

attentionclewInternet και Εφαρμογές Web

2 Φεβ 2013 (πριν από 4 χρόνια και 2 μήνες)

133 εμφανίσεις

CS 8672

Embedded Systems

Homework

Chapter
2
Review Questions
, by Warren Taylor

Chapter 2


Know Your Standards


1)

How can embedded systems standards typically be classified?

Embedd
ed systems are generally classif
ied as
market
-
specific

or
general
-
purpose
.

2)



a)

Name and define four groups of market
-
specific standards.

Four market
-
specific standards groupings:



Consumer Electronics



Industrial Control



Networking and Communications



Automotive

b)

Give three examples of standards that fall under each of the four
market
-
specific groups.

Examples of the above

market
-
specific standards groupings:



Consumer Electronics

o

ATSC


American Television Standards Committee

o

JavaTV

o

OCAP


Open Cable Application Forum



Industrial Control

o

IEC International Electrotechnical
Commission 60204
-
1

o

ISO International Standards Organization

o

DICOM Digital Imaging and Communications in Medicine



Networking and Communications

o

TCP/IP Transmission Control Protocol/Internet Protocol

o

PPP Point
-
to
-
Point Protocol

o

IEEE Institute of Electronics
and Electrical Engineers
802.3 Ethernet



Automotive

o

GM Global

o

FMVSS Federal Motor Vehicle Safety Standards

o

OPEL Engineering Material Specifications

3)


a)

Name and define four classes of general
-
purpose standards.

Four general
-
purpose standards groupings:



Network
ing



Programming Languages



Security



Quality Assurance

b)

Give three examples of standards that fall under each of the four general
-
purpose groups.

Examples of the above general
-
purpose standards groupings:



Networking

o

HTTP Hypertext Transfer Protocol

o

Bluetooth

o

TCP/IP Transmission Control Protocol/Internet Protocol



Programming Languages

o

pJava

o

J2ME Java 2 Micro Edition

o

.NET Compact Framework



Security

o

IEEE 802.10 Standards for Interoperable LAN/MAN Security

o

Netscape IETF Secure Socket Layer 128
-
bit Encryption

o

256
-
bit AES Advanced Encryption Standard



Quality Assurance

o

International

Standards Organization ISO 9000

o

NASA
-
STD
-
8739.8 Software Assurance Standard

o

ISO/IEC 12207
:2008
Sys
tems and software engineering

Software life cycle processes

4)

Which standard below is
neither a market
-
specific nor a general
-
purpose
embedded system standard?

a)

HTTP


Hypertext Transfer Protocol

b)

MHP


Multimedia Home Platform

c)

J2EE


Java 2 Enterprise Edition



this one

d)

All of the above.

e)

None of the above.

5)


a)

What is the difference between a
high
-
level language and a low
-
level
language?

A
low
-
level language

has an instruction set that closely
resembles machine code; it is specific to a particular processor
architecture.
High
-
level languages

are more hardware
-
independent
and semanticall
y are fa
rther away from machine
code. They are
usually easier to understand.

b)

Give an example of each.

Assembly language is an example of a low
-
level language. Each set
of processors had their own. For example PowerPC assembly
language is different from Intel 80386

assembly language. There
are many examples of high
-
level languages: C, Pascal, Fortran,
Java, etc.

6)

[Select] A compiler can be located on:

a)

a target.

b)

A host.

c)

A target and/or a host.

d)

None of the above.

Answer is C. A compiler is usually located on a host com
puter and
generates code for the target system. This is particularly true
for embedded systems. However, on a PC, the compiler can be
located on the host and the host can also be the target.

7)


a)

What is the difference between a compiler and a cross
-
compiler?

A standard compiler generates code for the type of host
environment that it is actually running on. A cross
-
compiler
generates code for a different type of system than the one it is
running on.

b)

What is the difference between a compiler and an assembler?

An

assembler generates machine code. Usually, it translates
assembly language into machine code. A compiler does not
necessarily generate machine code. It may produce some other
target, such as a different language or assembly language. It may
also use an as
sembler as part of its process.

8)


a)

What is an interpreter?

An interpreter translates a language into machine code one line
at a time. It does not produce an executable file.

b)

Give two examples of interpreted languages?

JavaScript is an interpreted language th
at runs inside a browser.
PERL is another commonly
-
used scripting language.

9)

[T/F] All interpreted languages are scripting languages but not all scripting
languages are interpreted.

False. Most early forms of BASIC are interpreted but were not
considered to

be scripting languages.

10)


a)

In order to run Java, what is required on the target?

The target must have a JVM (Java Virtual Machine) to execute the
java bytecode.

b)

How can the JVM be implemented in an embedded system?

The JVM c
an be implemented in any of the
embedded system model
layers: the hardware layer, the application layer, or the system
software layer.

11)


Which standards below are embedded Java standards?

a)

pJava


Personal Java

b)

RTSC


Real Time Core Specification

c)

HTML


Hypertext Markup Language

d)

A and B on
ly.

e)

A and C only

pJava is the only embedded system standard mentioned here. The
J2ME is another one.

12)


What are the two main differences between all embedded JVMs?

The garbage collector and the byte processing method

13)


Name and describe three of the most com
mon byte processing schemes.



Interpretation



the JVM turns each block of bytecode

into
machine code

at the time it tries to execute that line of
code. If the code is executed multiple times, it is
interpreted again each time.



Compilation



also called WAT or way
-
ahead
-
of
-
time
compilation, where the whole source code file is turned into
bytecode and stored before any execution, eliminating the need
to reinterpret each time the code is re
-
executed.



Just In Time Compilation



a combination o
f interpreting and
compiling where each block of
byte
code is compiled just before
it is executed, and then stored for future executions.

14)


a)

What is the purpose of a GC?

A garbage collector frees up memory occupied by objects that are
no longer being used by

any other object in the JVM

b)

Name and describe two common GC schemes.



Mark and sweep


the GC first marks all objects to which it
finds references and then sweeps or deallocates any objects
that are not marked. It is non
-
blocking but can lead to
fragmentat
ion because it does not compact memory.



Generational


all objects are grouped into generations
according to when they were allocated. The assumption is that
most ob
jects are short
-
lived in memory. Objects in younger
generations are cleaned up more often.

15)


a)

Name three qualities that Java and scripting languages have in common.



They are both more platform
-
independent than most compiled
high
-
level languages.



They can import and generate source code at runtime, which is
then executed immediately.



They require a run
-
time device to
execute them. For example,
with Java, it is the JVM. For JavaScript, it is the built
-
in
interpreter in the web browser.

b)

Name two ways that they differ.



Most interpreted languages use dynamic, or late
-
binding of
data types,

which allows for greater flexibility in their
resolution



Many interpreted languages are excellent for efficient
programming and rapid prototyping. Java, without late
-
binding,
is not as well suited for this.

16)


a)

What is the .NET compact framework?

It is a gro
up of applications that allow a number of high
-
level
languages to compile to a common language specification that can
then be executed on the Common Language Runtime (CLR) execution
engine.

b)

How is it similar to Java?

It is similar in that the JVM and the C
LR do not execute machine
code. They execute an intermediate language, bytecode for Java,
and MSIL (Microsoft Intermediate Language) for the CLR. Both
provide greater platform compatibility and safer code execution
due to the sandboxing effect.

c)

How is it d
ifferent?

It is different largely in the details of the sp
ecifications.
Also, t
he only CLRs available are those from Microsoft. For
embedded systems, they are only implemented in the system
software layer. At one time, the JVM only ran Java while the CLR
c
ould run any language written to the Common Language
Specification (CLS). These days, however, the JVM is capable of
running a number of languages, including some dynamic languages
such as Ruby
.

17)


What is the difference between LANs and WANs?

The distance b
etween the connected devices is the biggest
difference. L means Local and W means Wide. LANs usually span a
single building at most. WANs can cover any larger territory all
the way up to global coverage.

18)


What are the two types of transm
ission mediums that

can connect

devices?


Bound (guided) and unbound (unguided). Basically, it means wired
or unwired.

19)


a)

What is the OSI model?

The Open Systems Interconnection reference model is a universal
networking model that can be used to represent all types of
networki
ng schemes.

b)

What are the layers of the OSI model?

There are seven layers in the OSI model: Physical, Data
-
Link,
Network, Transport, Session, Presentation, Application.

c)

Give examples of two protocols under each layer.



Physical


IEEE802.11 Wireless Radio &
IR, IEEE802.3 Ethernet



Data
-
Link


IEEE802.11 MAC, IEEE802.5 Token Ring



Network


IP, ISDN



Transport


TCP, WDP



Session


DNS, NFS



Presentation


JPEG, MPEG



Application


SMTP, FTP

d)

Where in the Embedded Systems Model does each layer
of the OSI model
fall?
Draw it.




Application Layer

Presentation Layer

Session Layer

Transport Layer

Network Layer

Data
-
Link Layer

Physical Layer


20)


a)

How does the OSI model compare to the TCP/IP model?

The TCP/IP model is similar to the OSI model but the TCP/IP model
has fewer

layers. Some of the OSI models are combined into single
layers in the TCP/IP model.

The
Network Access Layer corresponds
to the
OSI
Physical and Data
-
Link Layer

The Internet Layer corresponds to the
OSI
Network Layer

The Transport Layer corresponds to the

OSI Transport Layer

The Application Layer corresponds to the OSI Transport Layer,
Session Layer, and Presentation Layer.

b)

How does the OSI model compare to Bluetooth?

The Bluetooth model has only three layers, each one roughly
corresponding to the OSI laye
rs found in the Hardware Layer, the
Systems Software Layer, and the
Application Software Layer.