Wednesday, March 05, 2014

Lab Report For Simulation And modeling

[1] Poission's Arrival Parttern::

#include<stdlib.h>
#include<stdio.h>
#include<conio.h>
#include<math.h>
#define e 2.71

void fact(int a);

int main()
{
int lamda;
float x, poi;                                                    
clrscr();

printf("\n service rate 'lamda':");
scanf("%d", &lamda);
printf("\n Enter the capacity of lamda 'x':");
scanf("%f", &x);

poi=(pow(e,(-lamda)))*(pow(lamda,(x)));

printf("\n probability: %f",(1-(poi/fact(x))));
getch();

}

int fact(int a)
{
 if(a==1)
 {
   return 1;
 }
 else
 {
  return (a*fact(a-1));
 }
}


[2] Measures of QUEUE:

#include<stdio.h>
#include<conio.h>

void main()
{
 float mu, lambda, rho, Ls, Lq, Wq, Ws;
 clrscr();
 printf("\n Enter the arrival rate:");
 scanf("%f", &lambda);
 printf("\n Enter the Service rate:");
 scanf("%f", &mu);
 Ls=lambda/(mu-lambda);
 rho=lambda/mu;
 Lq=(lambda*lambda)/mu*(mu-lambda);
 Ws=1/(mu-lambda);
 Wq=lambda/mu*(mu-lambda);
 printf("\n The avg no. of customers in system is: %f",Ls);
 printf("\n Server Utilization:%f", rho);
 printf("\n The avg no. of customers in queue is: %f", Lq);
 printf("\n Avg waiting time in system is: %f", Ws);
 printf("\n the avg waiting time  in the queue is: %f",Wq);
 getch();
 }


[3] Markov chain And Its applications::

#include<stdio.h>
#include<conio.h>

void main()
{
 float mu, lambda, rho, Ls, Lq, Wq, Ws;
 clrscr();
 printf("\n Enter the arrival rate:");
 scanf("%f", &lambda);
 printf("\n Enter the Service rate:");
 scanf("%f", &mu);
 Ls=lambda/(mu-lambda);
 rho=lambda/mu;
 Lq=(lambda*lambda)/mu*(mu-lambda);
 Ws=1/(mu-lambda);
 Wq=lambda/mu*(mu-lambda);
 printf("\n The avg no. of customers in system is: %f",Ls);
 printf("\n Server Utilization:%f", rho);
 printf("\n The avg no. of customers in queue is: %f", Lq);
 printf("\n Avg waiting time in system is: %f", Ws);
 printf("\n the avg waiting time  in the queue is: %f",Wq);
 getch();
 }

Monday, February 24, 2014

Cryptoarithematic problem1: SEND + MORE = MONEY



  1. From column 5, M = 1 since it is the only carry-over possible from the sum of two single digit numbers in column 4.
  2. Since there is a carry in column 5, O must be less than or equal to M (from column 4). But O cannot be equal to M, so O is less than M. Therefore O = 0.
  3. Since O is 1 less than M, S is either 8 or 9 depending on whether there is a carry in column 4. But if there were a carry in column 4, N would be less than or equal to O (from column 3). This is impossible since O = 0. Therefore there is no carry in column 4 and S = 9.
  4. If there were no carry in column 3 then E = N, which is impossible. Therefore there is a carry and N = E + 1.
  5. If there were no carry in column 2, then ( N + R ) mod 10 = E, and N = E + 1, so ( E + 1 + R ) mod 10 = E which means ( 1 + R ) mod 10 = 0, so R = 9. But S = 9, so there must be a carry in column 2 so R = 8.
  6. To produce a carry in column 2, we must have D + E = 10 + Y.
  7. Y is at least 2 so D + E is at least 12.
  8. The only two pairs of available numbers that sum to at least 12 are (5,7) and (6,7) so either E = 7 or D = 7.
  9. Since N = E + 1, E can't be 7 because then N = 8 = R so D = 7.
  10. E can't be 6 because then N = 7 = D so E = 5 and N = 6.
  11. D + E = 12 so Y = 2

Friday, February 21, 2014

Present Global Trends of Growth In E-Governance-3

source: Barsha Kunwar (CSIT 5th Sem)

Present Global Trends of Growth In E-Governance
• According to press reports during the end of 2002
– Indicate a trend of global growth in e-governance utilization
– Adults using internet world wide increase by 15% according to the
findings of Second Government Online Study published my Taylor
and Nelson.
– 3 out of 10 citizens (30%) access government services online
compared with only a quarter (26%) in 2001
• Government online services mostly used for
– Search Information (24%)
– Download Information (11%)
– Increase in % to search info – 20% to 24% from Sep 2001 to Sep
2002
• Globally, online government transactions increased from
just 6% to 7% during 2001 and 2002 and the percentage of
those providing personal details to government increased
from 7% to 8%
• E governance usage in different countries (between 2001-
2002)
– Australia – significant increase from 31% to 46%
– Turkey – 3% to 13%
– Netherlands – 32% 41%
– US – 34% to 43%
– Japan – decrement by 4% - 17% to 13%
• In 2001, security issue was the main concern which improved globally
in 2002.
• 2001 – 14% felt secured with credit card and bank account numbers
• 2002 – this increased to 23%
• Highest levels of safety was seen in the Scandinavian Market (Denmark,
Finland, Norway and Sweden) together with some South East Asian
markets (Singapore and Hong Kong)--- around 1/3 of users felt safe.
• In contrast- 90% of Japanese felt accessing online services unsafe.
• Germany 82% and France 76% --- unsafe
Present Global Trends of Growth In E-Governance

Evolution of E-governance, Its Scope and Content-2

Evolution of E-governance, Its Scope and Content
• Initiatives were take up as early as 1972 by Chile
• Prof. Stafford Beer implemented for President Allende of
Chile, the first governance software that would help the
government survive a severe crisis.
• Major contribution by US Vice President Al Gore in early
1990s which rooted worldwide in the information
superhighway.
• Widespread in US, UK, Canada, Australia and India
• focus largely on development of infrastructure such as fiber
optic networks.
• concept of Information Society or Knowledge Society
evolved
• E-governance came into a formalized and focused manner
with partial success to implement Information System in the
government departments and public organizations
• During 1980s and 90s, govt. all over the world lagged
behind the commercial world in accepting and
implementing ICT.
• Commercial and industrial world went far ahead all over
the world in harnessing the potential of ICT in their core and
peripheral activities. They used ICT to reach out to their
customers and business partners, thereby impressively
enhancing their quality, speed and convenience.
• Visible success cases of use of ICT
– ATM services
– 24 hour call center
– E-Shopping
• Software export increase (banking, financial, aviation,
industrial sector from India, Ireland, Israel, China)
• 1990s and 2000 - Development of ITES (IT enabled Society)
– resulted in remote services like call centers, data entry

E-Governance-part1

E-Governance for Good Governance in Nepal
What is e-Government?
E-government is the use of information and communications technologies (ICT) to
transform the traditional government by making it accessible, transparent, effective
and accountable. E-government does not mean putting more computers on the desks
of government officials. And e-government is more than just a government website on
the Internet. Political, social, economic and technological aspects determine egovernance.
It establishes a relationship between government officials and citizens,
providing greater access to government information and services by making the
government accessible online; promoting citizen participation by enabling citizens to
interact more conveniently with government officials, such as by requesting
government service and filing required documents through website; increasing
government accountability by making its operations more transparent, thereby
reducing the opportunities for corruption; and supporting development goals by
providing business, rural and traditionally underserved communities with information,
opportunities and communications capabilities. E-government is not only used in
developed countries. Some of the most innovative uses of the Internet in governance
are being successfully used in the developing countries, as well.
E-government will not be successful just only buying more computers and putting up
websites. It’s not sufficient to automate administrative practices from the paper system
to digital system. Rather, e-government is a process of transforming government; it
requires planning, political will and a sustained dedication of resources. Success of egovernment
will not be guaranteed with the mere purchase of advanced technology or
the direct automation of complex procedures until it can increase the rate of citizen
participation there by bringing about the greater effectiveness in government.
Technology introduction can not change the mentality of bureaucrats who do not view
the citizen as valued customer of government or an important participant in decisionmaking.
Why e-Governance?
We are in the process of building "New Nepal". "New Nepal " should not become only
a popular slogan but really the "New Nepal" with all the positive values and
aspirations of its citizens geared towards the peace and progress. There are many
dimensions streamlined and drivers identified to make our "New Nepal" dreams come
true. One of such dimensions is the reformation of the government. Governance and
its service process should be well reengineered to fulfill the aspirations of its citizens.
Information and Communication Technology (ICT) and its tools can help its effective
and efficient transformation.
With the advent of the information age, the ways we work, study, and live have been
experiencing dramatic changes. Due to the influence of economic and information
globalization and the rise of the digital economy, governments are "reinventing"
themselves to meet new expectations and the priorities of citizens and businesses.
These dynamics are compelling many governments to create a new vision for its
relationship with businesses and citizens and to create a new organizational structure
to fulfill its mandate. E-Government can fulfill the mandate of government formulating
a new vision of how government views its citizens, employees and businesses, and
building a citizen-centered, service-oriented, public-participative government with
efficient, accountable, transparent and performance government system. ICT based
online service is the most democratic and unbiased service system. It offers equal
opportunity to all races, genders, ethnic groups.
E-Government breaks the barrier of geographical diversity and makes the government
services handy to all citizens at villages who are even not connected by roads and
opens up many opportunities, provided Internet connectivity is available either through
wireless communication, fiber optic cables, dial-ups, VSATs or whatever other
medium.
Besides providing service to citizens, it’s important to empower and motivate
government employees to expect better service from them. E-Governance should
transform the government workers into empowered knowledge workers. Nepal should
not miss the benefits of global economy and specially the benefits offered by Internet.
Strategic Objectives of e-Governance:
The strategic objective of e-governance is to support and simplify governance for all
parties - government, citizens, businesses and its employees. The use of ICTs can
connect all three parties and support processes and activities. There may be two major
objectives of e-governance:
1. Service to the Public: This objective of e-government is to satisfactorily fulfill the
public’s needs and expectations on the front-office side, by simplifying their interaction
with various online services. The use of ICTs in government operations facilitates
speedy, transparent, accountable, efficient and effective interaction with the public,
citizens, business and other agencies.
2. Efficient Government: In the back-office, the objective of e-government in
government operations is to facilitate a speedy, transparent, accountable, efficient and
effective process for performing government administration activities. Significant cost
savings (per transaction) in government operations can be the result.
For implementing these strategies into reality, government must be subjected to
transformation.
The transformation process is not so easy and not so simple. It requires a coherent
strategy and should begin with an examination of the nation’s regulatory environment
and the ability of the population to make use of planned technologies. The primary
driving factor for e-government reform should not be the potential it offers to save
money and reformation does not mean cutting staff. The savings incurred from egovernment
initiatives most often benefit the businesses and citizens utilizing the
improved system more so than the government agencies that invested in them to begin
with. In order to realize the benefits of transformation themselves, governments must
develop a citizen-centric model involving key stakeholders outside of government—
community, businesses, professional associations, scientists, academics and NGOs.
Without their input and demand, even e-government projects that focus on internal
government processes may not prove successful because citizens are unlikely to use a
system that does not respond to their needs.
Process reform, leadership, strategic investment, collaboration and citizen participation
are essential elements in the transformation process. Once government makes
strategies to transform the governance process, it must prepare to meet the significant
challenges and opportunities that will arise during implementation. The
implementation process should address the issues of infrastructure development, law
and public policy, e-literacy, accessibility, privacy, security and workforce issues.
Awareness, education and rollout programs are also needed. To make the egovernance
initiative successful, a good marketing program is required through out
the country to encourage citizens to make use of them.

Sunday, May 26, 2013

REAL TIME OS VS TIME SHARING OS

                                        REAL TIME OS VS TIME SHARING OS
SN
Real time OS
Time sharing OS
1
It is used where there are rigid time requirement on the operation.
It is used where there are multiple jobs and CPU has to switch among them.
2
It does not allow sharing the computer with many users simultaneously.
It allows many users to share the computer simultaneously.

3
It has well defined, fixed time constraints.
OS divides the time of CPU and provides a fraction of time to each process in schedule.
4
Processing must be done within the defined time otherwise system will be failed.
In this os there is no fixed time limit.
 5
Time slot can be extended.
Time slot will not be extended.
6
This OS is used in scientific experiments, medicals, imaging system, industrial control system, missile launching system.
Time sharing system is used in general purpose computers and in non real time OS.

Wednesday, May 08, 2013

MOTIVATION VS DE-MOTIVATION





Motivation definitions:
[1] Motivation is an inner power or energy that pushes toward acting/working/performing actions and achieving goals.
[2] Motivation means to inspire, instigate and encourage a person to do their best.
[3] Motivation strengths the ambition, increase the initiatives and gives direction to follow one goals.
[4] Motivation becomes strong when you have a vision, a clear mental image of what you want to achieve and `also a strong desire to materialize it.
[5] Motivation awakes and pushes you forwards, towards taking action and making a vision a reality
Some of the indicators of motivation and de-motivation are as follows:

SN
Indicators of motivation
Indicators of De-motivation
1
Higher work efficiency
Increase in absenteeism
2
Willingly work
Excessive turnover/need gap
3
Be responsible and accountable
Low output /result
4
Belonging in work
Low profile discipline
5
Best result
Frustration
6
Regularity in work
Violet behavior


                                                                                                                                                                                                                

Monday, May 06, 2013

USER LEVEL THREAD VS KERNEL LEVEL THREAD:


USER LEVEL THREAD:

[1]User threads are supported above the kernel and are implemented by thread library at the user level.
[2] A library provides support for thread creation, scheduling and management with no support from kernel.
[3] Kernel is unaware of user level thread.  Creation and scheduling are done without need for kernel interaction. So user level threads are faster and easier to create and manage than kernel level thread.
[4]If the kernel is single threaded then any user level thread performing a blocking system call will cause the entire process to block even if there are other threads available to run within application.
[5]User level thread library includes POSIX P threads, MACH C threads, SOLARIS
[6] User level thread are created managed in user level memory.

KERNEL LEVEL THREAD:

[1] Kernel threads are supported directly from OS.
[2]Thread creation scheduling and management are done in kernel space (kernel memory) with the help of OS directory.
[3]It is slower to create and manage. However the kernel is managing the thread if a thread (user) performing a block system call, another thread of kernel can schedule another thread in the application for execution.
[4]Window’s NT, SOLARIS and digital UNIX are the operating system that supports kernel thread.

PROCESS VS THREADS


Some points of differences between process and thread are as follows:

[1]  Threads cannot live on its own, it must live within a process while process cam live on its own. Process has its own input, resources etc.

[2]   There can be more than one thread in a process but there it is not possible to have two process in a single thread.

[3]   The thread creation is inexpensive because OS  does not involve while the process creation is expensive .

[4]   Threads minimize the context switching while the process has expensive context switching.

[5]   If a thread in a process dies, another thread in a thread stack can run. but if a process dies, its resources are de-allocated and all its thread dies.

[6]  Process has separate address space where as thread share the address space.

[7]  Threads are easier to create because they don’t require separate address space where as process are complex to create because it requires separate address space.

[8]  Threads are considered light weight because they uses less resources then processes.

Saturday, May 04, 2013

Isolated I/O VS memory-mapped I/O:


Some points of differences between isolated  i/o and memory-Mapped i/o are as follows:
sn
Isolated  I/O
Memory-Mapped I/O
1
i/o  transfer is made through separate read and write line.
Memory transfer is  made through separate read and write lines.
2
The I/O transfer read and write control lines are enabled during the i/o are enabled during a memory transfer.
The memory read and memory write control lines are enabled during a memory transfer.
3
The isolated i/o configuration the CPU has distinct input and output instructions and each instruction is associated with the address of an interface register.
Computer with memory mapped i/o can use memory type instructions to access i/o data.



4
The isolated i/o method isolates memory and  i/o address values are not  affected by interface address assignment.
In a memory mapped i/o organization theme are no specific input or output instructions.




Friday, May 03, 2013

HARDWIRED CONTROL VS MICRO PROGRAM CONTROL



Some point of differences between hardwired control  and Micro program control are as tabulated below:
SN
Hardwired control
Micro programmed control
1
It is the mechanism to generate control  signals by using appropriate finite state machine(FSM)
Micro programmed control control is a control mechanism to generate control signals by using a memory called control storage (cs), which contains the control signals.
2
This is based on conditional circuit’s .
These are implemented as micro programs of routines.
3
In this type of control, the input and transforms are sent into control signals.
The control unit implemented in micro program is implemented in the form of a CPU inside another CPU.
4
These controls are faster and are known to have a more complex structure.
These types of circuits are simple but comparatively slower.

MICROPROCESSOR VS MICRO PROGRAM


Some points of differences  between  microprocessor and  micro program are as follows:
SN
Microprocessor
Micro program
1
Microprocessor is an integrated circuit on a chip.
Micro program is the software component of a processor.
2
Microprocessor is most often used to design computer such as laptops and desktops.
These are the commands which let the system to carry basic instructions.
3
Microprocessor consists of number of micro programs.
Micro programs are the components of all computer micro processors.
4
It interfaces with the clock, memory and input and output.
This stored-program logic substitutes for hardwired control circuitry.

Thursday, May 02, 2013

INTRODUCTION TO MANAGEMENT-7(MOTIVATION)


Motivation
Some indicators of Motivation and de-motivation
Indicator of Motivation
Indicator of de-motivation
-         Higher work efficiency
-         Increase Absenteeism
-         Willing work
-         Excessive turnover/ need gap
-         Be responsible and accountable
-         Low output/ result/ productivity
-         Belongness in work
-         Low profile discipline/ attitude
-         Best result
-         Frustration
-         Regular in work
-         Violent behavior

-         Motivation is the inner power or energy that pushes toward acting/ working, performing action and achieving goals.
-         Motivation means to inspire, instigate (activate) and encourage a person to do their best.
-         Motivation strength the ambition, increase initiative and its direction, courage, energy and the persistence to follow one goals.
-         Motivation becomes strong when you have vision, a clear mental image of what you want to achieve, and also a strong desire to materialize it.
-         Motivation awakens and pushes you forward toward taking action and making the vision a reality.

Motivation and Performance
There is an old saying, you can take a horse to the water but you can’t force it to drink water. It will drink only if it is thirsty so with people as same. They will do what they want to do or otherwise motivate to do.
Job performance = Ability + Motivation
ð Motivation = Job performance – Ability

Motivation leads to job performance (This is wrong).
Job performance leads to motivation (This is correct).

The link between performance and motivation is positive. Means increased motivation result in improved performance. However improvement performance also reinforces motivation resulting from the sense of achievement. So that job performance leads to motivation.
In other word, relationship between motivation and performance is something of chicken and egg situation.
Theory of motivation
The job of manager in the work place is to get things done through employees. To do this the manager should be able to motivate employees. But that’s easier said than done motivation practices and theories are different subject where touching in several discipline.
1.    Abraham Maslow’s “Need Hierarchy theory”: One of the widely mentioned theories of the motivation is the hierarchy of needs theory, which puts forth by psychologist Abraham Maslow. Maslow saw human needs in the form of hierarchy ascending from the lowest to highest and concluded that when set of needs is satisfied, this kind of need cease to by motivator. As per his theory this needs are:
-         Physiological need
-         Security / safety need
-         Social / love need
-         Esteem need
-         Need for self actualization

                   I.            Physiological needs: These are important needs for sustaining the human life. Food, water shelter, properly, etc. It also includes protection against any emotional harm.
                 II.            Security or safety needs: These are the needs to free of physical danger and of the fear of losing job. E.g. security, safety shelter, warm clothes, etc.
              III.            Social/ love needs: Since people are social beings, they need to be belonging and be accepted by others. People try to satisfy their needs for affection, acceptance and friendship.
             IV.            Esteem needs: This kind of need produces such satisfaction as power, prestige, status, self confidence. It includes both internal esteem factors like self respect, autonomy and achievement and external esteem factors such as status recognition, attention, physical personality and etc. Esteem need cannot be met without fulfillment of the lower level needs.
                V.            Need for self actualization: Maslow regards this as the highest need in this hierarchy. It is the drive to become what one is capable of becoming. It includes growth, achieving ones potential and self-fulfillment. It is to maximize one’s potential and to accomplish something.







2.    Frederick Herzberg’s Motivation-Hygiene theory (This is two factor theories): Motivation Hygiene theory – Frederick Herzberg, a professor of psychology at case Western Reserve University, studied the attitudes of workers towards their job. Herzberg proposed that an individual will be moved to action based on the desire to avoid deprivation (deficiency). However this motivation does not provide positive satisfaction because it deep not provides a dense of growth. Herzberg’s research found that positive job attitudes were associated with a feeling of psychological growth. The thought that people work for two reasons: for financial reasons to avoid physical deprivation and for achievement because of the happiness and meaning it provides. Herzberg also identified the concept of job enrichment where by the responsibilities of a job are changed to provide greater growth and challenge. Each motivation- hygiene theory is called two factor theories.

Motivator (Esteem and self actualization need)
Hygiene factors ( Basic, Security and Social needs)
-Achievement
-Recognition for accomplishment
-Challenging work
-Growth and development
(Higher Level Need)
-Policies and administration
-Supervision
-Working condition
-Interpersonal relation
-Money, security, benefits
(Lower Level Need)

Maslow Theory                   Herzberg (Motivation – Hygiene Theory)
Achievement, growth potential, work itself
and responsibilities

Basic Physiological
 

Security
 

Social
 

Esteem
 

Self actualization
 
                                    Advancement, recognition, status


                                                                                                                                Interpersonal relationship with
Supervisor, peers, subordinates
Job security working condition, company policies
Administration, supervision
Salary, personal life, food, water, shelter