EmbLogic's Blog

program of threads and checking load of processor

head    1.1;
access;
symbols;
locks
root:1.1; strict;
comment    @ * @;

1.1
date    2014.06.07.07.30.30;    author root;    state Exp;
branches;
next    ;

desc
@simple program of thread.
@

1.1
log
@Initial revision
@

Posted in Uncategorized | Leave a comment

Python Program

RCS file: ./1.py,v
Working file: ./1.py
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
this is python program
i have print name and age
—————————-
revision 1.1
date: 2014/06/07 07:21:42;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

PYTHON-simple program using format()

RCS file: ./hello.py,v
Working file: ./hello.py
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
printing “Hello” in python
successfully done…..:)
—————————-
revision 1.5 locked by: root;
date: 2014/06/07 07:15:09; author: root; state: Exp; lines: +1 -1
again analyzing the format() statement
—————————-
revision 1.4
date: 2014/06/07 07:13:14; author: root; state: Exp; lines: +1 -0
now analysing the result when we want to have three
decimal values if any number is divided by any value
successfully obtained
—————————-
revision 1.3
date: 2014/06/07 06:42:42; author: root; state: Exp; lines: +3 -0
using format() in which
I am printing name and age
—————————-
revision 1.2
date: 2014/06/07 06:37:47; author: root; state: Exp; lines: +1 -0
printing another statement and analyzing that
print statement written in next line
will also print in next line
—————————-
revision 1.1
date: 2014/06/07 06:36:15; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Embedded Linux | Leave a comment

a program of even and odd number

RCS file: fun2,v
Working file: fun2
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
check the even and odd number
—————————-
revision 1.1
date: 2014/06/07 05:06:48; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

sum of two number using function

description:
sum of two number using function
—————————-
revision 1.1
date: 2014/06/07 05:00:40; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

draw a line using function

description:
draw a line usig function
—————————-
revision 1.1
date: 2014/06/07 04:55:05; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

project01–>pointers

1>>    *s++  and *(s++)   OR    *s– and *(s–)

both behaves in the same manner.prints the same value.

2>> ++*s   means value print the the incremented value at pointer s.

 

Posted in Data Structures with C | Leave a comment

Use Of Class in C++

RCS file: ./class.cpp,v
Working file: ./class.cpp
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
Using Class in C++
from the main function I have created the object file to transfer the data into the public section of the class
and the public section will access the private section of the class
I have entered the values from user into the the public function of C++
successfully written and read
from the public function
—————————-
revision 1.1
date: 2014/06/06 14:02:33;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Embedded Linux | Leave a comment

C++

RCS file: ./3.cpp,v
Working file: ./3.cpp
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
used c++ in this program
made class and objects
successfully running.
—————————-
revision 1.1
date: 2014/06/06 13:58:38;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Simple program in c++

RCS file: ./simple.cpp,v
Working file: ./simple.cpp
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
printing “My name is Ruchi”using
string mystring
—————————-
revision 1.1
date: 2014/06/06 12:46:39; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Embedded Linux | Leave a comment

string

why it is necessary to declare the size of an array when entring the string from terminal while there is no need to declare the size when entering string  through program??

Posted in Uncategorized | Leave a comment

what does a makefile contain??

A make file consists of a set of targets, dependencies and rules. A target most of time is a file to be created/updated. target depends upon a set of source files or even others targets described in Dependency List. Rules are the necessary commands to create the target file by using Dependency List.

As you see in figure 1 each command in the Rules part must be on lines that start with a TAB character. Space issue errors. Also, a space at end of the rule line may cause make issues an error message.

The makefile is read by make command which determines target files to be built by comparing the dates and times (timestamp) of source files in Dependency List.If any dependency has a changed timestamp since the last build make command will execute the rule associated with the target.

 

Posted in Data Structures with C | Leave a comment

Thread concept

  • Thread operations include thread creation, termination, synchronization (joins,blocking), scheduling, data management and process interaction.
  • A thread does not maintain a list of created threads, nor does it know the thread that created it.
  • All threads within a process share the same address space.
  • Threads in the same process share:
    • Process instructions
    • Most data
    • open files (descriptors)
    • signals and signal handlers
    • current working directory
    • User and group id
  • Each thread has a unique:
    • Thread ID
    • set of registers, stack pointer
    • stack for local variables, return addresses
    • signal mask
    • priority
    • Return value: errno
  • pthread functions return “0? if OK.
Posted in Uncategorized | Leave a comment

Thread

The POSIX thread libraries are a standards based thread API for C/C++. It allows one to spawn a new concurrent process flow. It is most effective on multi-processor or multi-core systems where the process flow can be scheduled to run on another processor thus gaining speed through parallel or distributed processing. Threads require less overhead than “forking” or spawning a new process because the system does not initialize a new system virtual memory space and environment for the process. While most effective on a multiprocessor system, gains are also found on uniprocessor systems which exploit latency in I/O and other system functions which may halt process execution. (One thread may execute while another is waiting for I/O or some other system latency.) Parallel programming technologies such as MPI and PVM are used in a distributed computing environment while threads are limited to a single computer system. All threads within a process share the same address space. A thread is spawned by defining a function and its arguments which will be processed in the thread. The purpose of using the POSIX thread library in your software is to execute software faster

Posted in Uncategorized | Leave a comment

Thread concept

  • Thread operations include thread creation, termination, synchronization (joins,blocking), scheduling, data management and process interaction.
  • A thread does not maintain a list of created threads, nor does it know the thread that created it.
  • All threads within a process share the same address space.
  • Threads in the same process share:
    • Process instructions
    • Most data
    • open files (descriptors)
    • signals and signal handlers
    • current working directory
    • User and group id
  • Each thread has a unique:
    • Thread ID
    • set of registers, stack pointer
    • stack for local variables, return addresses
    • signal mask
    • priority
    • Return value: errno
  • pthread functions return “0″ if OK.

 

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment