Tuesday, 29 May 2018

Big Data - Hadoop Overview


What is Big Data?

The Collection of data with huge size. Its too large and complex that none of the relational/traditional data management tools are able to store it or process it efficiently. 
Example: We have laptop and the data doesn't fit in that laptop that's the big data, the data which exceed the capacity of storage.

Data management tools: Informatica, SAS Data Management, Tableau etc.

How it's Impacted Social media

500+ terabytes of new data gets ingested into the databases of social media site Facebook, every day. This data is mainly produced in the form of photos and video uploads, message exchanges, comments etc.

Why Hadoop needed:

Since 2003, the amount of data produced by us was 5 billion gigabytes. The same amount was created in every two days in 2011, and in every ten minutes in 2013. This rate is still growing enormously.Although all this information produced is meaningful and can be useful when processed, it is being neglected.

If we talk about one liner for this, it would be 'Challenges involved in its storage (Huge amount of Data) and processing'. Traditional data management tools are not able to store it or process it efficiently this amount of data, Hence Hadoop needed.

Categories of Big Data:

Big data could be found in three forms as described below:
  • Structured: Any data that can be stored, accessed and processed in the form of fixed format. Example. DB tables.
  • Unstructured: The data which is not in fixed format. ExampleGoogle Search, word, pdf.
  • Semi-structured: Semi-structured data can contain both the forms of data. Example. xml data.
Characteristics of Big Data:

We will discuss this in brief as a one liner. There are mainly 5 which is also called V's of Big Data and can be asked in Interview.
  1. Volume: which is growing at an exponential rate i.e. in Petabytes and Exabyte.
  2. Variety: During the early days, spreadsheets and databases were the only source of data considered by most application, now data such as email, photo, video, surveillance device, PDF, audio etc.
  3. Velocity: How fast the data is generated and processed to meet demands. Today, yesterday’s data are considered as old data. Nowadays, social media is a major contributor in the velocity of growing data.
  4. Veracity: Accuracy of data, inconsistency and incompleteness. The volume is often the reason for lack of quality and accuracy in the data.
  5. Value: At last, we all have access of big data but turn it into a values is profit.
Sources of Data:


Big Problems with big data:

There may be lots of problem with big data in handling & processing prospective, but below are 2 major problems which you need to understand.
  • False data: Ex: Google Maps giving you directions and suggesting an alternate, “faster” route. You take it only to find that it’s a dirt road under construction. Sometimes BigData systems think that they got a shortcut, but in reality, it is not exactly what the user was looking for. 
  • Big complexity: The more data you have, sometimes the harder it can be to find true value from the data. Where to put it: the more data you have, the more complex the problem of managing it can become.
Handling Big Data

When "Big Data" emerged as a problem, Apache Hadop developed as its solution. Apache Hadop is a framework that gives us different services or tools to store and process large data. It helps to analyze big data and make business decisions, which can not be used efficiently and effectively using traditional systems.

Terms commonly used in Hadoop:

Here is a list of most important Hadoop terms you need to know and understand, before going into the Hadoop eco-system.
  • HDFS: An acronym for “Hadoop Distributed File System”, which breaks large applications workloads into smaller data block, To store huge amount of data with the cluster of commodity hardware for faster processing.
  • MapReduce: A software framework for easily writing applications, To process huge data which is stored in HDFS.
  • HBase: HBase is called the Hadoop database because it is a NoSQL database that runs on top of Hadoop. It combines the scalability of Hadoop by running on the Hadoop Distributed File System (HDFS), with real-time data access as a key/value store and deep analytic capabilities of Map Reduce.
  • Hive: A data warehouse infrastructure built on top of Hadoop to provide data abbreviation, query and analysis. This allows you to query the data using a SQL-like language called HiveQL (HQL).
  • HiveQL(HQL): A SQL like query language for Hadoop used to execute MapReduce jobs on HDFS.
  • Sqoop: A tool designed to transfer data between Hadoop and relational databases.
  • Flume: A service for collecting, aggregating, and moving large amounts of log and event data into Hadoop.
Tools used in Big Data


Note: I have started this for those, who want to learn Hadoop and thinking to add this as a additional skills for their resume. The information contained as per the experience of less than a year. Some salient topics would be uploaded as soon as possible with exercises.

Stay tuned.


Skils Set would be asJava, Hadoop, HDFS, Map Reduce, HBase, Zookeeper, Hive, Pig, Sqoop, Flume, Oozie.

Sunday, 27 May 2018

Object Oriented Analysis and Design - MCQS



Question
AC001. Which of the following does not belong to OOAD?
Select one:
a. Swim lane diagram
b. Fully dressed use case
c. State transition diagram
d. Domain model

The correct answer is: Fully dressed use case

Question 
CA019 A boundary class is an analysis class that represents _____.
Select one:
a. the user interface or Presentation layer of a system
b. the interface between the client and middleware tiers in a system
c. an intermediary or interface to something outside the system
d. an API that is supplied by a third-party vendor and used to integrate with an external system

The correct answer is: an intermediary or interface to something outside the system

Question
STQ102 Which phase of unified process model focuses over system conversions and user training?
Select one:
a. Inception
b. Construction
c. Elaboration
d. Transition

The correct answer is: Transition

Question 
JNQ109. When acceptance testing is performed in Agile development?
Select one:
a. At the end of each iteration
b. After system is ready
c. Daily
d. On request of customer

The correct answer is: At the end of each iteration

Question 
SKQ106 An object is considered an external entity in object-oriented modelling
Select one:
a. its attributes change during operation of the system
b. it has no attributes relevant to the system
c. its attributes are invariant during operation of the system
d. it has numerous attributes

The correct answer is: its attributes are invariant during operation of the system

Question 
CA009 Which of the following is a technique for hiding the internal implementation details of an object?
Select one:
a. Abstraction
b. Encapsulation
c. Inheritance
d. Polymorphism

The correct answer is: Encapsulation

Question 
CA017 What are the components of a structured class?
Select one:
a. ports, roles, and threads
b. roles, ports, and connectors
c. attributes, roles, and ports
d. messages, connectors, and roles

The correct answer is: roles, ports, and connectors

Question 
MDQ102 The three types of relationships use cases have in a use case diagram include?
Select one:
a. Elaboration, generalization, boundarization
b. Inclusion, representation, realization
c. Extension, representation, elaboration
d. Extension, inclusion, and generalization

The correct answer is: Extension, inclusion, and generalization

Question 
VVKQ105 Attributes are assigned value
Select one:
a. When methods are invoked
b. When instances of objects are defined
c. When operations are performed on an object
d. When classes are identified

The correct answer is: When instances of objects are defined

Question 
JNQ104. Which of the following UML diagrams has a static view?
Select one:
a. Activity
b. State chart
c. Collaboration
d. Use case

The correct answer is: Use case

Question 
CA035 The designing phase includes the following activities, EXCEPT
Select one:
a. Designing the user interface
b. Designing the application architecture
c. Designing the project team
d. Designing and integrating the network

The correct answer is: Designing the project team

Question 
CA030 A class is
Select one:
a. template for objects of a particular type
b. a class of objects
c. a classification of objects
d. a group of objects

The correct answer is: template for objects of a particular type

Question 
SKQ103 What type of core-relationship is represented by the symbol in the figure below?
relationship symbols

Select one:
a. Dependency
b. Aggregation
c. Association
d. Generalization

The correct answer is: Aggregation

Question 
AE002) Attach additional responsibilities to an object dynamically.It provides a flexible alternative to subclassing for extending functionality.
Select one:
a. Adapter
b. Composite
c. Chain of responsibility
d. Decorator

The correct answer is: Decorator

Question 
AE003) Define a family of algorithms, encapsulate each one, and make them interchangeable. It lets the algorithm vary independently from clients that use it.
Select one:
a. Template method
b. Strategy
c. Decorator
d. Visitor

The correct answer is: Strategy

Question 
UMQ103. Which of the following process model is best suited for developing object-oriented systems?
Select one:
a. Unified Process model
b. Prototype model
c. Waterfall model
d. Spiral model

The correct answer is: Unified Process model

Question 
CA039 Which of the following relationships are used in a use-case diagram?
Select one:
a. Communication
b. ALL given choices
c. Extends
d. Uses

The correct answer is: ALL given choices

Question 
SHQ105. Which of these are the heuristics ?
Select one:
a. Stick to binary associations
b. Name classes, attributes, and roles with noun phrases
c. All of the mentioned
d. Name operations and associations with verb phrases

The correct answer is: All of the mentioned

Question 
CA023 The essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer is called
Select one:
a. Encapsulation
b. Hierarchy
c. Modularity
d. Abstraction

The correct answer is: Abstraction

Question 
JNQ103. Product backlog is prioritized by
Select one:
a. Product owner
b. Scrum master
c. All the given options
d. Scrum team

The correct answer is: Product owner

Question 
CA008 constructor operation does which of the following?
Select one:
a. Updates an existing instance of a class
b. Creates a new instance of a class
c. Deletes and existing instance of a class
d. All of the given choices.

The correct answer is: Creates a new instance of a class

Question 
VIDQ105 The most common way to depict the functional model is by using the______________?
Select one:
a. Diagrams?
b. Tables?
c. Flowcharts?
d. DFD!

The correct answer is: DFD!

Question 
CA015 During analysis an architect is concerned about _____.
Select one:
a. implementation
b. behavioral
c. technology
d. deployment

The correct answer is: behavioral

Question 
CA027 Inheritance in object-oriented modelling can be used to
Select one:
a. generalize classes
b. specialize classes
c. generalize and specialize classes
d. create newclasses

The correct answer is: generalize and specialize classes

Question.
A tagged value extends the --------------- of a UML building block.
Select one:
a. Definition
b. Properties
c. Vocabulary
d. Semantics

Answer: Properties

Question.
The object act and react in state change and message passing, this is knows as ---------
Select one:
a. State of an object
b. None of the given options
c. Behaviour
d. Parameter passing

Answer: Behaviour

Question.
Which of the following is not one of the elements of a design pattern?
Select one:
a. Context
b. Problem
c. Solution
d. Environment

Answer: Solution

Question.
Which of the following is not true
Select one:
a. Controller is a kind of Facade pattern
b. A controller object can handle multiple system events
c. A controller object helps identify out of sequence events
d. Controller pattern is used to control data

Answer: Controller pattern is used to control data

Question.
Given the following scenario: You want to create families of related objects, to be used interchangeably to configure you application. What is the most appropriate GoF pattern to use?
Select one:
a. Observer
b. Builder
c. Chain of Responsibility
d. Abstract Factory

Answer: Abstract Factory

Question.
______ provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Select one:
a. Fabrication
b. Abstracct Factory
c. Singleton
d. Factory Method

Answer: Abstract Factory

Question.
Which of the following is the first step in user interface design process?
Select one:
a. prototype the dialogue and the user interface
b. chart the dialogue
c. none of the given options
d. test the dialogue
e. re-design the dialogue

Answer: chart the dialogue

Question.
Which of the following are the efforts to the Systems Construction Phase?
Select one:
a. documentation
b. redesigned business processes
c. physical design specifications
d. design prototypes
e. all of the given options.

Answer: all of the given options

Question.
A package diagram consists of the following?
Select one:
a) Package symbols
b) Groupings of Use cases, classes, components
c) Interface
d)  both a and b

Answer:  both a and b [According to Bits- Answer is Interface but as per other sources answer is both a and b ]

Question.
Which of the following pattern creates object without revealing the creation logic to the user and refer to newly formed object using a common interface?
Select one:
a. Factory Pattern
b. Transfer Object Pattern
c. Abstract Factory Pattern
d. Singleton Pattern

Answer: Factory Pattern

Question.
Which of the following is not true
Select one:
a. High coupling leads to high change impact
b. High coupling makes it harder to reuse
c. High coupling makes the design easy to understand
d. High coupling means higher reliance on other objects

Answer: High coupling makes the design easy to understand

Question.
Which of the following is(are) the deliverables of the Systems Implementation phase?
Select one:
a. operational system
b. physical design specification
c. functional system
d. training materials

Answer: operational system

Question.
Which of the following are the primary inputs into the job of writing and testing fresh programs?
Select one:
a. both A and C
b. B database structure
c. A programming plan
d. D integration requirements
e. C test data

Answer: both A and C

Question.
Which of the following instruction-driven interfaces allows a customer to enter a question about a given product?
Select one:
a. mnemonic
b. textual
c. language-based
d. natural language
e. none of the given options

Answer: natural language

Question.
Most user interface design patterns fall with in one of ____ categories of patterns.
Select one:
a. 10
b. 5
c. 25
d. 100

Answer: 10

Question.
Which design pattern defines one-to-many dependency among objects?
Select one:
a. Facade Pattern
b. Observer pattern
c. Singleton pattern
d. Factory method pattern

Answer: Observer pattern

Question.
In a System sequence diagram, life lines are depicted as
Select one:
a. Bars
b. Horizontal arrows from actors to system.
c. Object classes
d. Dashed vertical lines extended downwards

Answer: Dashed vertical lines extended downwards

Question.
Which diagram depicts classes that correspond to software components that are used to build the software application?
Select one:
a. design class
b. state transition
c. sequence
d. none of the given options
e. state machine

Answer: design class

Question.
The messages of a Use case can be graphically depicted using
Select one:
a. Activity diagram
b. System sequence diagram
c. Composite diagram
d. Logical use case

Answer: System sequence diagram

Question.
Describe an interface for making an object, but let the subclasses decide which class to instantiate. It lets the instantiation vary to subclasses.
Select one:
a. Prototype
b. Builder
c. Factory Method
d. Abstract Factory

Answer: Abstract Factory

Question.
The recurring aspects of designs are called?
Select one:
a. Patterns
b. Structures
c. Documents
d. Methods

Answer: Patterns

Question.
MVC is a three layer architecture that contains a
Select one:
a. model, view, and controller
b. machine, view, content objects
c. machine, view, controller
d. model, view, and content objects

Answer: model, view, and controller

Question.
Subtypes must be substitutable for their base types, is suggested by
Select one:
a. LSP
b. OCP
c. DIP
d. SRP

Answer: LSP

Question.
Which of the following UML diagrams has a static view?
Select one:
a. State chart
b. Collaboration
c. Activity
d. Use case

Answer: Use case

Question.
Physical relationship between software components and the hardware in the delivered system can be shown by which diagrams?
Select one:
a. Deployment diagram
b. Class diagram
c. Domain model
d. Network diagram
e. Component diagram

Answer: Deployment diagram

Question.
A link is a subset of
Select one:
a. Realization
b. Generalization
c. Dependency
d. Association

Answer: Association

Question.
The process of grouping the elements of an abstraction that constitute its structure and behavior is called as
Select one:
a. Encapsulation
b. Entity Abstraction
c. Modularity
d. Hierarchy

Answer: Entity Abstraction

Question.
A class is divided into which of these compartments?
Select one:
a. Name Compartment
b. All of the mentioned
c. Attribute Compartment
d. Operation Compartment

Answer: All of the mentioned

Question.
Which of the following is(are) the UML level of visibility?
Select one:
a. both B and C
b. all A and B and C
c. A persistent
d. B public
e. C protected

Answer: both B and C

Question.
Which model depicts the image of a system that an end user creates in his or her head?
Select one:
a. design model
b. user model
c. system perception
d. system model

Answer: system perception

Question.
What is main benifit of Indirection?
Select one:
a. Lower cohesion
b. More number of small classes
c. Higher copuling
d. Lower coupling

Answer: Lower coupling

Question.
Which one of the tests is performed on a subset of a program?
Select one:
a. program test
b. unit test
c. stub test
d. subset test
e. system test

Answer: stub test

Question.
Which of these depicts the true definition for the UML extensions?
Select one:
a. A property is a characteristic of the entity designated by a model element
b. A constraint is the statement that must be true of the entities designated by one or more model elements
c. A stereotype is a UML model element given more specific meaning
d. All of the mentioned

Answer: All of the mentioned

Question.
Which of the following is the last phase of the Systems Construction phase?
Select one:
a. none of the given options
b. build and test databases
c. build and test networks
d. write and test new programs
e. prepare conversion plan

Answer: write and test new programs

Question
Which of the following is(are) the task(s) of the Systems Conversion phase?
Select one:
a. prepare conversion plan
b. convert to new system
c. build and test networks
d. train users
e. none of the given options

Answer: build and test networks

Question.
Which design pattern ensures that only one object of particular class gets created?
Select one:
a. Observer Pattern
b. Strategy Pattern
c. Singleton Pattern
d. Facade Pattern

Answer: Singleton Pattern

Question.
Which of the following is not true regarding Facade pattern
Select one:
a. Provides simpler interface
b. Hides complexity
c. Exposes implementation details
d. Improves maintainability

Answer: Exposes implementation details

Question.
Which kind of menu is planned primarily for expert users as there is no visual clue to its presence?
Select one:
a. options Cascading
b. pull-down
c. Iconic
d. Pop-up
e. none of the given

Answer: Pop-up

Question.
Which of the tests is a last system test executed by end users using real data over an extended period of time?
Select one:
a. final test
b. parallel test
c. systems acceptance test
d. complete test
e. none of the given options

Answer: systems acceptance test

Question.
Which GRASP pattern helps to find out answer for "Who should be responsible for creating a new instance of some class?"?
Select one:
a. Creator
b. Fabircation
c. Adapter
d. Protected Vairation

Answer: Creator

Question.
Define one to many dependency among objects so that after one object changes state, all its dependents are alerted and updated automatically.
Select one:
a. Mediator
b. Chain of responsibility
c. Event Notification
d. Observer

Answer: Observer

Question.
A general purpose mechanism for organizing elements into groups
Select one:
a. Package
b. Component
c. Node
d. Class

Answer: Package

Question.
A Patter language
Select one:
a. None of the given options
b. Is implemented using hyper text
c. Encompasses a collection of patterns
d. Resembles the structure of natural language

Answer: Encompasses a collection of patterns

Question.
A class is divided into which of these compartments?
Select one:
a. Name Compartment
b. Operation Compartment
c. All of the mentioned
d. Attribute Compartment

Answer: All of the mentioned

Question.
In object oriented approach, objects are
Select one:
a. Discrete
b. Both Identical and Discrete
c. None
d. Identical

Answer: Discrete

Question.
A Relationship between use cases and collaborations can be viewed as
Select one:
a. Association
b. Generalization
c. Realization
d. Link

Answer: Realization

Question.
The person generally responsible for the program design strategy, standards, and construction is called a(n):
Select one:
a. systems analyst
b. backup chief programmer
c. chief programmer
d. network designer
e. program librarian

Answer: chief programmer

Question.
Which of these framework events are not normally associated with the user interface design processes?
Select one:
a. user and task analysis
b. interface validation
c. interface construction
d. cost estimation

Answer: cost estimation

Question.
When we want to replace a class with another class which is more efficient but has a different interface, which pattern comes handy?
Select one:
a. Strategy
b. Composite
c. Facade
d. Adaptor

Answer: Adaptor

Question.
The humans cope with the complexity in a fundamental way using ________
Select one:
a. Object
b. Class
c. Encapsulation
d. Abstraction

Answer: Abstraction

Question.
Which of the below instruction-driven interfaces is constructed everywhere a broadly known command language that can be used by the customer to invoke actions?
Select one:
a. a command-control syntax
b. none of the given options
c. a language-based syntax
d. a mnemonic syntax
e. a natural language syntax

Answer: a language-based syntax

Question.
An observer pattern does not involve
Select one:
a. Observing changes
b. Notifying changes / events to observers
c. Keeping track of all observers
d. Analyzing observers

Answer: Analyzing observers

Question.
Which of the following is NOT a tool that can be used for discovering class behaviors and responsibilities?
Select one:
a. class diagram
b. none of the given options
c. sequence diagram
d. CRC card
e. interface diagram

Answer: interface diagram

Question.
Which mechanism is applied to use a design pattern in an OO system?
Select one:
a. None of the mentioned
b. Composition
c. All of the mentioned
d. Inheritance

Answer: All of the mentioned

Question.
Ensure a class has only one instance, and provide a global access point to it.
Select one:
a. Proxy
b. Flyweight
c. Singleton
d. Single Class Factory

Answer: Singleton

Question.
Which design pattern would decide mismatched interfaces or provide a steady interface to similar components with different interfaces?
Select one:
a. Mediator
b. Visitor
c. Adapter
d. Controller

Answer: Adapter

Question.
Which among these are the rules to be considered to form Class diagrams?
Select one:
a. Attributes and operations can be listed at any suitable place
b. Compartment can be in random order
c. None of the mentioned
d. Class symbols must have at least a name compartment

Answer: Class symbols must have at least a name compartment

Question.
Which of the following is(are) human engineering guideline(s)?
Select one:
a. The system user should always be aware of what to do next.
b. Anticipate the errors users might make.
c. All of the given options
d. Users should not be allowed to proceed without correcting an error.
e. Use display attributes sparingly.

Answer: All of the given options

Question.
Which of the following is not included on a design class diagram?
Select one:
a. navigability
b. dependencies
c. methods with parameters
d. classes
e. entities

Answer: entities

Question.
The view which addresses the configuration management of the system’s releases.
Select one:
a. Implementation
b. Use case
c. Design
d. Process

Answer: Use case

Question.
Given classes A and B, which of the following is not a common type of coupling in object-oriented software?
Select one:
a. A invokes methods of B
b. A method parameter or local variable in A references B
c. A has an instance variable that refers to B
d. None of the given options
e. A is a direct or an indirect subclass of B

Answer: A is a direct or an indirect subclass of B

Question.
Which of the following is important in user interface design?
Select one:
a. D test the system on a limited number of actual users
b. both A and B
c. A practice iterative design
d. C use automated tools in designing user interface
e. B understand your users and their tasks

Answer: both A and B

Question.
Which one of the following mechanisms is used to implement generalization?
Select one:
a. Encapsulation
b. Abstraction
c. Polymorphism
d. Inheritance

Answer: Inheritance

Question.
With respect to the tone of a dialogue, which of the following should not be used?
Select one:
a. use simple, grammatically correct sentences
b. use abbreviations so that users can read them more quickly
c. be consistent in the use of terminology
d. use simple term
e. use appropriate action verbs

Answer: use abbreviations so that users can read them more quickly

Question.
Which of the following diagram is time oriented?
Select one:
a. Collaboration
b. Activity
c. Sequence
d. None of the given options

Answer: Sequence

Question.
Who will test the system in agile development?
Select one:
a. Business Analyst
b. Developer
c. All the given options
d. software tester

Answer: All the given options

Question.
Arrange the following scrum practices according to the order in which they are carried out. 1. Sprint 2. Daily scrum meet 3. Sprint review meet 4. Sprint retrospective meet 5. Sprint planning
Select one:
a. 5 1 2 3 4
b. 5 4 2 3 1
c. 5 1 2 4 3
d. 5 2 1 3 4

Answer: 5 1 2 3 4

Question.
The fact that  similar operation may be applied to two or more classes is named what
Select one:
a. Polymorphism
b. Encapsulation
c. Multiple classification
d. Inheritance

Answer: Polymorphism

Question.
Multiplicity is the same as what concept for an ERD?
Select one:
a. Attribute
b. Entity
c. Cardinality
d. Relationship

Answer: Cardinality

Question.
During Use Case Analysis, which UML diagrams should you use when allocating use-case behavior to classes?
Select one:
a. sequence and communication diagrams
b. sequence and activity diagrams
c. class and composite structure diagrams
d. use-case and activity diagrams

Answer: sequence and communication diagrams

Question.
The object-oriented development life cycle is which of the following?
Select one:
a. Analysis, design, and implementation steps in the given specific order and using multiple iterations.
b. Analysis, design, and implementation steps in the given order and using the steps not more than one time.
c. Analysis, design, and implementation steps in any random order and using multiple iterations.
d. Analysis, design, and implementation steps in any order and using the steps no more than one time.

Answer: Analysis, design, and implementation steps in the given order and using multiple iterations.

Question.
Noun-Phrase Approach and CRC Approach are used to identify
Select one:
a. collaborators
b. classes
c. objects
d. Use cases

Answer: classes

Question.
Which of the following statements is true about use-case realization?
Select one:
a. It is created by the System Analyst.
b. It lists the different steps performed by a use-case.
c. Its creation is part of the Requirements discipline.
d. It provides traceability from Analysis and Design back to requirements.

Answer: It provides traceability from Analysis and Design back to requirements.

Question.
The vertical dimension of a sequence diagram represents
Select one:
a. messages
b. time
c. objects
d. lines

Answer: time

Real time Operating Systems - MCQS


Question.
IRIS Stands:

Iney Reward with Increased Service
Increased Raw with Increased Service
Increased Reward with Increased Service
None of these

The correct answer is: Increased Reward with Increased Service

Question 
Which of these is true about an open loop system vs closed loop system:

Closed loop systems are comparatively cheaper as they require less components & design effort
Open loop system provides better control in the presence of environmental disturbance
An open loop system can be made closed loop by introducing  and controlling
A kitchen toaster is a closed loop system

The correct answer is: An open loop system can be made closed loop by introducing  and controlling

Question 
RTOS is ________ in nature

timely
memory oriented
high cpacity
non-accurate

The correct answer is: timely

Question 
True for a task vis-à-vis a process?

Tasks are complex compared to processes
Tasks and processes are one and the same thing
Processes can spawn threads but tasks cannot spawn tasks
Tasks represent only a single sequence of instructions 

The correct answer is: Tasks represent only a single sequence of instructions

Question 
Cheddar is written in

 Perl
Ada
Python

The correct answer is: Ada

Question 
In real time operating system

kernel is not required
all processes have the same priority
process scheduling can be done only once
a task must be serviced by its deadline period Correct

The correct answer is: a task must be serviced by its deadline period

Question 
Time gap in-between release time of the job and the time when it completes is

Response Time
Turn around time
Rotation Time

The correct answer is: Response Time

Question 
Hard real time operating system has   ---------jitter than a soft real time operating system

less
more
equal

The correct answer is: less

Question 
The family of processor used in Raspberry Pi is _______

Intel
Motorola
Broadcomm
ARM Correct

The correct answer is: ARM

Question 
Tasks whose execution would begin randomly and within the interval of arrival times of consecutive tasks is known as

Periodic Task
Aperiodic Task
Sporadic Task

The correct answer is: Sporadic Task

Question 
The time T between any two consecutive sensor reading is called

Sampling Period
Response Time
Turn around time

The correct answer is: Sampling Period

Question 
Identify the odd one out:

Periodic Task
Aperiodic
Sporadic Tasks
Non-periodic

The correct answer is: Non-periodic

Question 
The problem of priority inversion can be solved by

priority inheritance protocol
priority inversion protocol
both (a) and (b)
none of the mentioned

The correct answer is: priority inheritance protocol

Question 
In real time operating system

all processes have the same priority
a task must be serviced by its deadline period
process scheduling can be done only once
kernel is not required

The correct answer is: a task must be serviced by its deadline period

Question 
What are the risks and challenges that we should be aware of when it comes to the Internet of Everything :

Privacy.
Security
Network congestion
Electricity consumption at the peaks
All of these

The correct answer is: Electricity consumption at the peaks

Question 
Embedded system does not contain _________.

Sensors
Actuators
Microcontrollers
None of these

The correct answer is: None of these

Question 
System which processes data instructions without any delay is classified as

real time system
online system
offline system
instruction system

The correct answer is: real time system

Question 
The default language supported by Raspberry Pi board is _________.

Java
Python
C
C#

The correct answer is: Python

Question 
Proportion of Real time and Non-real time tasks in a system

70%, 30%
50%,50%
60%,40%
80%, 20%

The correct answer is: 70%, 30%

Question 
What is the top M2M  acronym stands for:

The acronym M2M application stands for Machine to Man applications
The acronym M2M application stands for Mobile to Mobile applications
The acronym M2M application stands for Machine to Machine applications
None of these

The correct answer is: The acronym M2M application stands for Machine to Machine applications

Question.
The EDF scheduler uses ________ to order requests according to their deadlines.

Select one:
stack
disks
queue
none of the mentioned

Answer: queue

Question.
Use of robot by the car manufacturing companies is an example of

Select one:
machine controlled computers
network controlled computers
applicant controlled computers
user controlled computers

Answer: machine controlled computers

Question.
VxWorks is centered around

Select one:
wind microkernel
linux kernel
unix kernel
none of the mentioned

Answer: wind microkernel

Question.
EDF algorithm assigns priorities according to :

Select one:
periods
deadlines
burst times
none of the mentioned

Answer: deadlines

Question.
The priority of a real time task :

Select one:
must degrade over time
must not degrade over time
may degrade over time
none of the mentioned

Answer: must not degrade over time

Question.
What is jitter in Real-time terminology:

Select one:
Variation in a parameter. For example, variation in arrival rates, computation durations, or communication latencies.
An event with an arrival pattern that has a bounded minimum interarrival time with stochastic jitter.
The activation of a task such that it will be considered by the RTOS for execution on the CPU..
None of these

Answer: Variation in a parameter. For example, variation in arrival rates, computation durations, or communication latencies.

Question.
Scheduling of tasks is a very important consideration in RTOS. Which of the following best described the scheduling policy design:

Select one:
The scheduler must follow a pre-emptive policy
The scheduler must not use pre-emptive policy option
The scheduler must not only use pre-emptive policy options with the priority considerations.
The scheduler must not use pre-emptive policy option, but must employ priority consideration

Answer: The scheduler must not use pre-emptive policy option, but must employ priority consideration

Question.
Type of processor in which single task of a particular application is process is termed as

Select one:
real time processor
dedicated processor
applicant processor
one task processor

Answer: dedicated processor

Question.
Chose the statement with respect to RTOS.

Select one:
A real time operating system (RTOS) is an operating system that guarantees a certain capability within a specified time constraint.
An OS is a system program that provides an interface between application programs and the computer system (hardware)
The applications where dependability that a certain task will finish before a particular deadline is just as obtaining the correct results.
Besides meeting deadlines RTOS must also be able to respond predictably to unpredictable events and process multiple events concurrently.
all of above

Answer: all of above

Question.
Keeping a task’s schedulability in mind, which way a task may be scheduled

Select one:
The task has a predetermined time after which it may be scheduled.
The task has a predetermined time before which it may be scheduled
The task has a predetermined time interval during which it must be scheduled any time.
The task start has a worst case delay estimate before which it must be scheduled

Answer: The task has a predetermined time interval during which it must be scheduled any time.

Question.
Time duration required for scheduling dispatcher to stop one process and start another is known as

Select one:
process latency
dispatch latency
execution latency
interrupt latency

Answer: dispatch latency

Question.
if jobs have unpredictable release times, a task is termed  :

Select one:
aperiodic
sporadic
periodic.
None of these

Answer: aperiodic

Question.
Time required to synchronous switch from the context of one thread to the context of another thread is called

Select one:
threads fly-back time
jitter
context switch time
none of the mentioned

Answer: context switch time

Question.
Which of the following describes the RTOS design philiosophy best

Select one:
Maximize the throughput of the system
Maximize the processor utilization
Minimizing the response time
Response within certain stipulated time period

Answer: Minimizing the response time

Question.
Delay and Jitter :

Select one:
mean the same thing
are two completely different things
all of the mentioned
none of the mentioned

Answer: are two completely different things

Question.
IRIS Stand for :

Select one:
Increased Reward with Increased Service
Iney Reward with Increased Service
Increased Raw with Increased Service
None of these

Answer: Increased Reward with Increased Service

Question.
Which one of the following is a real time operating system?

Select one:
RTLinux
VxWorks
Windows CE
All of the mentioned

Answer: All of the mentioned

Question.
In rate monotonic scheduling

Select one:
shorter duration job has higher priority
longer duration job has higher priority
priority does not depend on the duration of the job
none of the mentioned

Answer: shorter duration job has higher priority

Question.
The major difference between a multimedia file and a regular file is :

Select one:
the size
the attributes
the ownership
the rate at which the file must be accessed

Answer: the ownership

Question.
Rate monotonic scheduling assumes that the :

Select one:
processing time of a periodic process is same for each CPU burst
processing time of a periodic process is different for each CPU burst
periods of all processes is the same
none of the mentioned

Answer: processing time of a periodic process is same for each CPU burst.

Question.
System which processes the data instructions without any delay is classified as

Select one:
online system
offline system
instruction system
real time system

Answer: real time system

Question.
Delay is :

Select one:
the time from when a request is first submitted to when the desired result is produced
the delay that occurs during playback of the stream
how the errors are handled during transmission and processing of continuous media
none of the mentioned

Answer: the time from when a request is first submitted to when the desired result is produced

Question.
Preemptive, priority based scheduling guarantees :

Select one:
hard real time functionality
soft real time functionality
protection of memory
none of the mentioned

Answer: soft real time functionality

Question.
Describe which of these scheduling policies is most suited for controlling a set of periodic tasks.

Select one:
FCFS
Least laxity first
Earliest dead line first
Rate monotonic policy schedule

Answer: FCFS

Question.
Designing of system take into considerations of

Select one:
hardware
communication system
operating system
all of above

Answer: all of above

Question.
RM Schedulable upper bound for a system with 4 tasks is

Select one:
0.66
0.95
0.44
0.76

Answer: 0.76 [This has been calculated using Utilization Bound]

Question.
Real time systems must have :

Select one:
preemptive kernels
non preemptive kernels
preemptive kernels or non preemptive kernels
neither preemptive nor non preemptive kernels

Answer: preemptive kernels

Question.
Consideration of storage, input and output devices are considered as requirement of

Select one:
hardware requirement
communication requirement
software requirement
process requirement

Answer: hardware requirement

Question.
If a set of processes cannot be scheduled by rate monotonic scheduling algorithm, then :

Select one:
they can be scheduled by EDF algorithm
they cannot be scheduled by EDF algorithm
they cannot be scheduled by any other algorithm
none of the mentioned

Answer: they cannot be scheduled by EDF algorithm

Question.
Hard real-time system is A

Select one:
system with deadline is very Hard
system with stringent deadlines
system whose deadline is very hard to determine
System whose deadline is not so hard to determine

Answer: system with stringent deadlines

Question.
Which one of the following is the characteristic of a multimedia system?

Select one:
high storage
high data rates
both high storage and high data rates
none of the mentioned

Answer: both high storage and high data rates

Question.
Identify which of these are real-time applications scenarios:

Select one:
An on-line bus ticketing system
Printing of annual report of a company’s annual report
Reconciling a day’s transactions in an account book of a small company
An aircrafts  yaw control system

Answer: Printing of annual report of a company’s annual report

Question.
Hyper period of the following tasks T(e,p) {T1(3,6) T2(4,12)}
Select one:
6
4
12
2

Answer: 12

Question.
Slack time

Select one:
is the amount of time left after a job if the job was started now.
is the amount of time left before a job if the job was started now.
is the amount of time left from a job if the job was started now.
is the amount of time left required by a job if the job was started now.

Answer: is the amount of time left after a job if the job was started now

Question.
The delay that occur during the playback of a stream is called

Select one:
stream delay Incorrect
playback delay
jitter
event delay

Answer: jitter

Wednesday, 23 May 2018

Real Time Operating Systems Importance - MID Sem Excercise


Question.1What is Real time Systems and Categories of Real time Systems with example ?.Identify with justification the type of real time system used in the following scenarios. 

a)      Bank security based system to gain access into the safety vault
b)      Pantry service in an IT company to deliver snacks and Beverages
c)      Fire alarm setting in a server room
d)     Flight simulator video game

e)      Battery operated toy robot used at home for normal routine task.
Answer:  Real time systems are systems that need to run continuously and take decisions in a timely manner.

Categories of Real time Systems: There are 2 broad categories.
  • Hard Real Time Systems
  • Soft Real Time Systems
Hard Real time Systems:
  • Failure to meet deadlines lead to catastrophe
  • Example would be an automatic flight control scenario
Soft Real Time Systems:
  • Failure to meet deadlines would not cause everlasting damages
  • Examples could range from a video game to washing machines, etc
Identification of Hard and Soft Real Time Systems
(a)    Bank security based system to gain access into the safety vault-Hard RTOs
(b)   Pantry service in an IT company to deliver snacks and Beverages-Soft RTOs
(c)    Fire alarm setting in a server room-Hard RTOs
(d)    Flight simulator video game-Soft RTOs
(e)    Battery operated toy robot used at home for normal routine tasks-Soft RTOs
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.2.  Elements/Terms used in Real time Systems.

Answer
  1. Resources – Basically this can be a CPU, memory, time or any resource directly related to a task.
  2. Tasks– A set of programs that may have to run on the real time system to accomplish the system’s underlying functionality of a particular application.[A task can be aperiodic if the jobs in it have soft or no deadlines]
  3. Algorithm – This is basically a scheduling algorithm that decides the quantum of resource a task should utilize and also ensure that no task must have fallen short of resources.
  4. Execution time: Execution time is an essential temporal parameter as it decides the duration of a job. Two types : Minimum execution time and Maximum execution time.
  5. Period - Minimum time interval between release times of consecutive jobs.
  6. Task utilization: Task utilization is the ratio of execution time of a task to its period                                                                – Ui = ei/pi. [should be less than or equal to unity]
  7. Makespan: The makespan is the completion time of the last job in the sequence or The makespan is the sum of all the processing times.
  8.  Periodic Task: If jobs have predictable release times, a task is termed aperiodic. 
  9. Aperiodic Task: If jobs have unpredictable release times, a task is termed aperiodic.
  10. Sporadic Task: A sporadic task is an aperiodic task where jobs have deadlines once released.
 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.3. Characteristics of a real time system as well as components. Differentiate the schedulability test among all algorithm.

AnswerCharacteristics for a Real Time System:
  • Timely in nature
  • Capable of handling exceptions
  • Reliable
  • Fault tolerant
  • Sub-optimal
Components for a Real Time System:
  • Job
  • Task
  • Control law computation
Schedulability analysis:


Note: EDF for tasks with D <= T, It's more complicated (out of scope of the course according to me)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.4. Tasks parameters.

Answer: Any task is defined by the following parameters.
  • Release time: It is the time at which task is available for execution.
  • Deadline : It is the time by which the task execution must complete.
    • Relative deadline : It is the maximum allowable response time.
    • Absolute deadline : It is the sum of the relative deadline and its release time.
  • Response time is the time interval from the release time of the task to its completion time
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.5. Check the schedulability of the independent, preemptable, tasks T1(3, 1), T2(5, 2), and T3(8,3); whether they are schedulable using the rate monotonic algorithm.

Answer:
Check schedulability:

1. First constraint(Precise test):
                     Total utilization U ≤ 1 .

                        Hence,
                                                U = ∑ Ei / Pi =1/3+2/5+3/8= 0.33 + 0.4 + 0.38 = 1.11 > 1

                   Hence the tasks are not schedulable under RM algorithm.

2. Second constraint: UB Test(Utilization bound)

                      Again we need to prove that

                                       where n is the number of task need to schedule.
                      Hence,

                                     1.11 ≤ 3 .(21/3 – 1) = 3. (1.26 - 1) = 3 . 0.26 = 0.78

        => 1.11 ≤ 0.78 is False. We can conclude from here that the tasks are not schedulable
             according to RM algorithm.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.6.  Difference between EDF and RM.

Answer:
EDF characteristics:
  • Dynamic Priority Scheduling Algorithm
  • Schedule on deadline basis; i.e., earliest deadline jobs need to execute first.
  • Here Preemption is allowed.
RM characteristics:
  • Fixed/Static Priority Scheduling Algorithm
  • Schedule on priority basis; i.e., higher priority jobs need to execute first.
  • Here Preemption is allowed
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Question.7.  A system consists of three periodic tasks: T1=(3, 1), T2=(5, 2) and T3=(8, 3). Suppose we want to reduce the execution time of the task with period 8 in order to make the task system schedulable according to the earliest deadline first (EDF) algorithm. What is the minimum amount of reduction necessary for the system to be schedulable by the EDF algorithm?

AnswerThe tasks can be scheduled provided the total utilization is ≤ 1
Hence,
       u1 + u2 + u3 ≤ 1
=> u1 + u2 + E3/p3 ≤ 1
=> 0.33 + 0.4 + E3/8 ≤ 1
=> E3 should be reduced from 3 to 2.16
Hence the modified Tasks are
 T1=(3, 1), T2=(5, 2) and T3=(8, 2.16)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.8. What is meant by online scheduling of tasks?  Name the algorithm which would be used?

Answer : Online Scheduling
  • Online scheduling is done at run-time based on the information about the tasks arrived so far.
  • If the scheduler creates each scheduling choice without knowledge about the jobs that will be released in the future, then scheduling is said to be done online. 
  • Scheduling is done online when we use an online scheduling algorithm.
  • Online scheduling can accommodate dynamic variant in user demands and resource readiness but it cannot make the top use of system resource.
Algorithms Used for Online Scheduling:
  • Static priority driven algorithms
    • assign fixed priorities to the tasks before the start of the system. 
    • Rate monotonic (RM) scheduling algorithm is a uni-processor static-priority preemptive scheme.
    • Priority inheritance protocol (PIP) dynamically changes the priority of a task if it is blocking a higher priority task. 
    • Priority ceiling protocol (PCP)avoids deadlock by taking each semaphore allocated a priority ceiling which is the priority of the uppermost priority task that practices it.
  • Dynamic priority driven algorithms 
    • assign the priorities to tasks during run-time. 
    • Earliest deadline first (EDF) is a dynamic priority driven scheduling algorithm which gives tasks priority based on deadline.
    • Least laxity first (LLF) also known as least slack time, is a dynamic priority driven scheduling algorithm that assigns priority based on the laxity.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.9: What is RMScheduling ? Check if the following tasks are schedulable by RM scheduling algorithm T(e,d) { T1(3,4), T2(4,5) , T3(5,6) and T4(6,7) }.

Answer:
RM Scheduling:  It's an important event-driven scheduling algorithm, RMA assigns priorities to tasks based on their rates of occurrence. The lower the incidence rate for a job, the lower priority will be given. The priority of a task is inversely proportional to its period (or, directly proportional to its rate).

The following are some important criteria that can be used to check the schedulability of a set of tasks set under RMA.
  • First Constraint: A set of periodic real-time tasks will not be scheduled until the RMA is completed, as long as they do not meet the following required condition.
                                                       Total utilization = ∑ Ei / Pi 
                                                       Total utilization U ≤ 1
  • Second Constraint:  The below condition should satisfy i.e. Utilization Bound Test
                                                        

Given:  T1(3,4), T2(4,5) , T3(5,6) and T4(6,7)

Check schedulability:

1. First constraint(Precise test):
                     Total utilization U ≤ 1 .
                        In this case the task is in order T(e,d)
                             Therefore ,    Ei or e = execution time 
                                                   Di or d = period or Pi


                   Now by the formula          U = ∑ Ei / Pi 
                                                             U = 3/4+4/5+5/6+6/7
                                                             U = 0.75 + 0.8 + 0.83 + 0.85
                                                             U =3.23 > 1

                   Hence the tasks are not schedulable under RM algorithm.

2. Second Constraint(Utilization bound Test):  Again we need to prove that,

Hence,

                                     3.23 ≤ 4 *(21/4 – 1) = 4* (1.18 - 1) = 4 * 0.18 = 0.72

        => 3.23 ≤ 0.72 is False. We can conclude from here that the tasks are not schedulable

             according to RM algorithm.


Therefore the tasks T1(3,4), T2(4,5), T3(5,6) and T4(6,7) are not schedulable by RM scheduling algorithm.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Question.10.: Consider the task set: {(1,3),(1,5),(1,6),(2,10)}, is task 4 set schedulable?

Answer: To solve this question, we need to go through with Response Time first.

Study material:

Calculate the worst case response time R for each task with deadline D. If R<=D(period), the task is schedulable/feasible. Repeat the same check for all tasks.

Ri= Ci + åΠHP(i) éRi/Tjù*Cj
where,
Ri stand for the response time for task i
Ci is the computing time.[execution time] 

Let U= Σ Ci/Ti [ei/pi or ei/di] 
and B(n) = n*(21/n-1) [Utilization Bound Test]

Three possible outcomes: 
0<= U<= B(n): schedulable
 B(n)<U<=1: no conclusion 
1< U : overload

Example:
Assume a task set:T(e,d) {(1,3),(1,5),(1,6),(2,10)}
CPU utilization U= 1/3+1/5+1/6+2/10=0.899  
The utilization bound B(4)=0.756

The task set fails in the UB test due to U>B(4)

Solution: Given as, {(1,3),(1,5),(1,6),(2,10)}

CPU utilization U= 1/3+1/5+1/6+2/10=0.899> B(4)= 0.756
Fail the UB test!
But U(3)= 1/3+1/5+1/6=0.699
This means that the first 3 tasks are schedulable.

is task 4 set schedulable? 
Hence, Not schedulable. 
Because If R<=D(period), the task is schedulable/feasible.

Question.11.:  What do you understand by the term makespan ? Give an example.

Answer:
Makespan: The makespan is the completion time of the last job in the sequence or The makespan is the sum of all the processing times.

Example: Consider a single machine that processes five jobs. The jobs are named J1 to J5. The processing times are 10, 8, 6, 12 and 14 minutes. The delivery timings (due dates) of the five jobs are 8, 16, 25, 30 and 40 respectively. If you choose to follow a sequence J2-J4-J3-J1-J5 then what would be the makespan ?

The jobs are sent in the order or sequence J2-J4-J3-J1-J5. Job J2 enters at time = 0 and is completed at time = 8. Job J4, which is the next job in the sequence immediately enters at time = 8 and finishes at time = 8 + 12 = 20. This process continues till the last job J5 is completed at time = 50. The completion times for the jobs (according to the given sequence) is J2 = 8, J4 = 20, J3 = 26, J1 = 36 and J5 = 50.

The makespan is the completion time of the last job in the sequence. For the sequence J2- J4-J3-J1-J5, the makespan is the completion time of J5 which is 50.

Study material: The completion times for the jobs (according to the given sequence) is J2 = 8, J4 = 20, J3 = 26, J1 = 36 and J5 = 50. The total completion time is 140 and the mean completion time is 140/5 = 28

Question.12.: What do you understand by the term makespan ? Compute the makespan on the following processors.
Assume the schedule to be work conserving
T(e,d) T1(2,3), T2(3,7) and T3(4,13) on Processor P1.
T4(3,5) T5 (4,11) and T6(5, 18) on Processor P2.

Answer: Makespan: The makespan is the sum of all the processing time scheduled on a processors.

Makespan on P1 =  2+3+4 = 9 units; Makespan on P2 = 3+4+5=12 units

As given,  Scheduler is a work conserving, The processor is never idle when tasks are awaiting execution.

Question.13: What do you understand by the  term hyperperiod ? Compute the hyperperiod of the following tasks T(e,p) {T1(3,6) T2(4,12) and T3(5,18)}.

Answer: Hyperperiod: Hyperperiod is the duration of the largest task present in the task set under consideration. Mathematically it is the least common multiple of all task periods of the task set under consideration.
  Hyperperiod of task set = LCM {6,12,18} = 36 units

Question.14.: Compute the RM Schedulability upper bound for a system with 4 tasks.

Answer:
RM schedulability upper bound = (n*(2(1/n)-1))
Here n=4
RMupper =  (4* (2(1/4)-1))=  0.76

Question.15.:
Schedule the following tasks by non-weighted round robin ?
Task
Execution time
T1
5
T2
6
T3
4
T4
7
T5
5
Compute the   makespan, number of cycles for the above task set with a time slice of 3 units?

Answer:


Cycle 1:
T1 (3) T2(3) T3(3) T4(3) T5(3)
Cycle 2:
T1(2) T2(3) T3(1) T4(3) T5(2)
Cycle 3:
T4(1)

3 Cycles and Makespan = 3+3+3+3+3+2+3+1+3+2+1=27 units.

Question.16: Consider the tasks T(e,d) T1(2,5), T2(3,6), T3(2,7), T4(1,8), T5(2,9)
The start times of the tasks which is also the current time of T1,T2,T3,T4 and T5 is 1,2,3,4 and 5
The min and max execution times of tasks T(min, max) T1(2,3), T2(3,4), T3(2,4),T4(1,2) and
T5(2,3). Compute the laxity for all tasks..

Answer:

Laxity =(deadline –(current time + min exec time))
L1=5-(1+2)=2
L2=6-(2+3)=1
L3=7-(3+2)=2
L4=8-(4+1)=3
L5=9-(5+2)=2

Facebook