Sunday, October 31, 2010

Using offbiz

1.start with -- http://www.opensourcestrategies.com/ofbiz/tutorials.php -- hello1
2./home/ranjith/Desktop/OFBiz-An-Insider-View.pdf --- Illustrative
3.http://www.mail-archive.com/user@ofbiz.apache.org/msg16444.html -- revealing

Saturday, October 30, 2010

item-pipeline

1.ebay-netgear router
2.ebay-motherboard
3.ebay-ups
4.ebay-power conditioner APC AV C10 50$
http://www.tigerdirect.ca/applications/SearchTools/item-details.asp?EdpNo=5039285&CatId=4715
Apc 800va ups
http://www.thisoldhouse.com/toh/article/0,,218003,00.html
http://www.dbstalk.com/archive/index.php/t-93991.html -- apc for av receiver and tv

5.ebay-bluetooth headset for mobile -- motorola 1k
6.hp mini 110 ---- 22k --netbook
7.How much VA do i need
http://www.jetcafe.org/npc/doc/ups-faq.html#0402
8.speakers
http://forum.teamxbox.com/archive/index.php/archive/t-547011.html
9.typical home power
http://reviews.cnet.com/green-tech/tv-power-efficiency/
http://michaelbluejay.com/electricity/howmuch.html ---- watt calculator
10.coaxial splitters to watch tv in different rooms
11,Tivo satallite recorder
12.iptv transeiver --- rf to ip ... ip to rf,rca,svideo
13.netgear usb wifi dongle -- 2k
14.remote extender -- converts ir to radio so that can use remote from different room
15.using coax cabling to network tv
http://www.digital501.com/2006022138/how-to-extend-your-tivo-or-other-device-throughout-your-house/

Friday, October 29, 2010

eclipse short cut,commands

1.http://dmy999.com/article/29/using-eclipse-efficiently
2.http://sandarenu.blogspot.com/2008/02/using-bookmarks-in-eclipse.html
3.
ctrl+pgup/pgdown toggle open files
alt+d,alt+s --bookmark

=============
1.find . -name \*.ko -print0 | xargs -0 rm

A/V receiver mania

1.Package
Onkyo TX-NR808 7.2 receiver
+Boston Acoustics SoundWare XS 5.1 speakers
+netgear client/server wireless router
using netgear as a wireless repeater --- http://kb.netgear.com/app/answers/detail/a_id/77
OR WPN802 rangemax

memory barriers: more

1.there is a control logic outside pipeline of all the cpus that determines which instruction and
data blocks go where

2.sequence of instructions on one cpu does not follow any ordering(weakest ordering)
even if there are barrier commands ,the same cpu will still see random ordering
but some possibilities will be restricted in special sequences

3.The barrier in a sequence of instructions in a cpu will make sense with a complementary barrier in
another cpu.

4.best way to picture barrier operations is:
imagine,
one cpu
a sequence of instructions
imagine a output pipeline that contains the result of the above sequence
pipeline is a queue,and the front of the queue will be committed to memory first

we can see that the pipeline can contain a permutation of the sequence of instructions

also when analysing the pipeline remember that the sequence in the pipeline is as seen by another cpu

ie at any execution point in the cpu2(its pipeline) any element in cpu1 pipeline can be assumed to be the current point.

1.smart-fetch strategy dma cache
http://www.usenix.org/event/nsdi09/tech/full_papers/tan/tan_html/index.html

Understanding memory barriers

http://www.mjmwired.net/kernel/Documentation/memory-barriers.txt

1.fix the model
for single cpu
cpu-->data cache-->multiple instr cache--->controller--->memory
cpu-->multiple data cache-->multiple instr cache--->controller--->memory

2.
cpu1 cpu2
stmt 1;
stmt 2;
O[ ]
I[ ]
stmt 3;
stmt 4;

the analysis of memory barriers use will be based on
values of variables at "O" and "I"

At beginning of analysis,assume ctrl is at stmt4
then evaluate values of ALL variables at "O" and "I"
combine with stmt4 or stmt5 the above results

A barrier may come between stmt1 and stmt2 also stmt3 and stmt4
combine above analysis in the context of barriers

Thursday, October 28, 2010

Maybe FL studio first

http://www.youtube.com/watch?v=JGttxDgo6jc&feature=related
1.wish list: power jack in car
M studio : min keys midi controller
midi out to car speakers
2.http://www.youtube.com/watch?v=CHL95HSXHbE&feature=fvw

fpga and verilog

1.language for hardware --- http://iverilog.wikia.com/wiki/Simulation
2.operating system ----- http://www.drdobbs.com/blog/archives/2010/06/inexpensive_fpg.html;jsessionid=HHOOB0RLEB2XLQE1GHOSKH4ATMY32JVN
3.future is using systemC for synthesis of phy
4.http://www.edaboard.com/thread68357.html --- basic level wimax phy/mac

5.Before implementing a radio phy
decide using
matlab + dsp + pcb radio
systemC + fpga + pcb radio
verilog + fpga + pcb radio

6.TASK is to find minimal requirement to test
3rd party lte phy against -------------- one item in 5
7.C and MATLAB are languages



8.
systemC
| |
| synthesis-----mentorgraphics
|
-------simulation----modelsim
9.one APPROACH

download wimax phy code from hack site
its in systemC
use the above conversion model

10.TI tranceiver
http://docs.google.com/viewer?a=v&q=cache:kS_vtFHnmXoJ:focus.ti.com/general/docs/lit/getliterature.tsp%3FliteratureNumber%3Dslwu045%26fileType%3Dpdf+TI+dsp+kit+for+wimax+testing&hl=en&gl=in&pid=bl&srcid=ADGEESi3KhqXSbtILjhIRHJf6mn8I0jDyPRHOIuSIPSoIdjpXLJeBlb32MAy7bQF_jyfGaHDyxYsK7LGhxtPOjaUIupoVQ6W-VQ4ePIJhGLrvR_Uq_TTDpqFsaznpOszKccfk7GhmGbp&sig=AHIEtbR9No5uMxON8fylSqynDhJOqibhJw

arm cache and memory barrier

1.The main issue
compiler by default orders the instructions
optimizations may further reorder them
once the instructions get loaded into L1/L2 cache,then its rearranged by the core before
feeding into the cpu...here is where barrier comes into picture

A C code line should be converted to assembly,before we can decide whether we need to
use some kind of barrier or not

1.http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka14041.html
2.Memory barrier detailed
http://www.mjmwired.net/kernel/Documentation/memory-barriers.txt

MESI,MSI

MSI - modified,shared,invalid state of cache protocol

Cache Invalidation and Flushing
The VIRTUAL address is the argument for invalidation and flushing

wbinvd ---- writes cache back to memory and marks it empty
invd ---- just marks the cache as invalid without writing to ram

Excellent optimization tip
http://www.agner.org/optimize/

dma cache coherency

1.while a cpu has updated a buffer and about to give control and dma is about to start to device,
another cpu may update the same variable ... dma stales
2.after device dma's buffer, one cpu writes a variable to same buffer and another cpu reads it ...again its stale


1.cache invalidation and cache flushing are complementaries
2.Assume a copy of variable is read into cache
cpu modifies the cache value
but the ram value is old
if at this time device reads the variable(dma writes to device)
device sees incorrect value

3.Again a variable is reflected in cache
device updates the value in ram of variable
but cpu reads the stale value from cache

http://msdn.microsoft.com/en-us/library/ff545924(VS.85).aspx

===========================
1.above dma coherence simple scenario
2.cache line dma coherence scenario

scenario 2 explained
device writes to ram for a variable x
vaiable shares a cache line with another variable y
cpu modifies the variable y and flushes y
stale value of x is also flushed
it overwrites x in ram
later wrong value of x is read into cache and by cpu

another one
system is about to write x to device
another thread cpu modifies x
system will write old value

Wednesday, October 27, 2010

dma and intr

1.dma needs specially reserved ram block(real physical pages)
2.dma needs virtual physical pages ie a block of physical addresses that is not mapped to ram
3.cpu write-->cache-->dma phy addr-->hardware
4.dma read-->dma phy addr-->cache-->cpu read
5.if cache line is shared by dma buffer and cpu buffer
copy dma part to phy buffer
cpu write new data to dma part
cpu invalidates cpu buffer
dma part data is over written in phy buffer
phy buffer is dma'ed

hw dma reads to phy buffer
cpu writes to cpu buffer
invalidation writes stale dma part to phy buffer,data overwritten
cpu reads the dma phy buffer ,finds old value


================

1.irq save , saves the current cpus all interrupt flags(or current drivers interrupt?) and
disables "this or all" interrupt on current cpu, also takes the spinlock raw variable
1.1 other cpu gets this interrupt, but spins on the spinlock hence, interrupt waits

2.if the same was done using semaphore, interrupts are not disabled , function takes the semaphore,
an interrupt comes on the same cpu,calls the same function,reaccquires the semaphore and deadlock,because previous invokation has to run on the same cpu

3.from timer irq save is not required since local cpu interrupt is disabled

4.

multithreads

1.
thread1:
add to list
increment

thread2
add to list
increment

if the requirement is thread muxing ie 2 threads --> 1 thread processing
best implementation is
lock
add to list
if( increment ) {
release
}
else {
release
}
otherwise at cpu register level there should be an atomic xchange like cmd

any two register values modified complete state cannot be determined using single register

on the processing side ,with the above construct one variable can determine state
since incr and addlist is done atomic

========================
main process and deinit

deinit:
set flag
check if process increment flag is 0 else loop
proceed

process:
if flag do nothing
else carry on

project execution

1.Need 5 or more teams with min 2 resources
2.sliding window method of project execution
ie at any point of time in the project execution phase 1 of the 5 teams will be in focus
the subsideries will do codebuild up or unilevel testing
the window will rotate over the teams
and a release will be reached

======================
1.successful project
1.1 team skill set
1.2 number of human resources
1.3 number of non-human resources
1.4 task breakup and distribution
1.5 tracking progress

Tuesday, October 26, 2010

project doc

1.In oof create a collection of tables,frames and sections
2.Each table will represent a group of methods
3.a frame can contain diagrams
4.a section can contain diagrams and text
5.pre-development,development,post-development
6.during development, color filling should be used to show the progress
7.predevelopment links should point to relevent info
8.Every element in the document starts at root element
9.for eg: a document can have 2 root elements one for directory structure,one for binary layout
one for abstract component layout,one for abstract subcomponent layout,one for object enumeration,
one for method enumeration,one for sequence diagrams
10.A sequence diagram can be built inside a frame or section

oof usage
===================
1.>insert -- to add tables,frames , sections
2.>autoformat -- select a table,save the tables current settings under name,use the same later
3.>table,frame,section border -- select all lines
4.>press for new row
5.>select heading type
6.>select styles and formatting
7.>to create hyperlinks within same doc, upper is blank,middle select component,select destination
and save
8.oof work on .odt and save in .doc or .html

Monday, October 25, 2010

Sunday, October 24, 2010

software devel

1.structural design
a.directories
b.files
c.makefiles , binary modules
d.header file organization
e.export functions organization
f.inter module communication

2.white space filling
a.engineers filling c and header files with raw logic
b.usage of tools like git,svn/svk, eclipse

3.code smoothening
a.experienced engineers refactoring,reorganizing,rewriting the source code
b.usage of tools like gnu indent,uncrustify

Thursday, October 21, 2010

programming style

1.http://en.wikipedia.org/wiki/Programming_style
2.indent software

Wednesday, October 20, 2010

vlan intro

1.http://archive.networknewz.com/networknewz-10-20030725IntroductiontoVLANs.html

Tuesday, October 19, 2010

patch and hunks

1.http://www.markusbe.com/2009/11/how-to-apply-a-patch-and-solve-hunk-failed-cant-find-file-to-patch-and-others/

app engine -- application

1.A gui planner app
2.drag interface with hourly and days,months unit
3.like openproj
4.can allot time scale over http interface
5.timer that will intimate using email,mobile
6.upcoming possibilities prediction in a context
7 can add rule set to interface to make prediction in context

google app engine --next

1.Http goes into nic hardware
2.App engine works on http applications
3.single door to all services ...through a google account
4.A device is something that has a gui,sound,and http connectivity
5.All services video,voice,sip,audio,editors,compilers,svn will be accessible through google

Monday, October 18, 2010

extensible concept

1.a simple concept -- involves 3 to 4 concrete tokens
2.It defines a two or 3 actions with an outcome
3.Many domains can converge onto this domain using simple bridge,converters

protocol ..local remote

1.An event occurence at remote site ... reflected by arrival of a packet at local machine can cause
2.reaction:
1.Some memory allocated in the local machine protocol layers to be freed/or new allocated
2.Some variable values will be modified
3.Packets coming from the upper layer is discarded , queued or it is morphed and forwarded
4.Packets are routed in a different channel other than normal
5.states are changed(some variables are changed)

app engine -- structure

1.Frame object
Looper object
Container object
Instruction object
Param object
Param object

Setup Frame
Looper.Start(Frame)
Get Container
Get Instruction
Get Param
Get Param
do_work with them
Generate Container
Gen Instr
Gen param
Gen param
Make Frame
PushFrame
Make Frame 1
Push Frame 1
Looper.Stop

Looper.start(Frame)
-----

Ideally in do_work function if there is a next layer call and new buffer...its candidate for frame

2.A change
if do_work has to call multiple layer routines within the same context then both the calls should
be encapsulated in the frame and taken out in FIFO

Flexibility
The container object can be of different types ....inherited
similarly I,P,P also

In case of protocol ,Container closely resembles layer in protocol,I layer entry point, P,P buffers

3.If multiple threads are accessing this engine ..then each thread will have a context in which the frame will be stotred and each context will have a looper or one looper for all

Sunday, October 17, 2010

ARM Dma and Cache Coherency

1.http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0228a/index.html
2.http://peeterjoot.wordpress.com/2009/11/29/an-attempt-to-illustrate-differences-between-memory-ordering-and-atomic-access/

xor flash and nand flash

1.in place execution
2.multiple read write
3.uboot,redboot
4.basic file operations

ecos compile

1.http://ecos.sourceware.org/docs-1.3.1/guides/user-guides.10.html
2.ecos synthetic targets
http://www.kelvinsthunderstorm.com/ecos-synthetic-target-with-ethernet/
http://www.ecoscentric.com/ecospro/doc.cgi/html/ref/synth.html

ipsec + l2tp tunnel setup linux

1.http://www.natecarlson.com/2006/07/10/configuring-an-ipsec-tunnel-with-openswan-and-l2tpd/

sound card + speakers

Creative extigy for my laptop

Ive been looking at these speakers:
Cambridge SoundWorks® MegaWorks® THX® 5.1 550
Creative® Inspire™ P580

NAT,DMZ,PAT,Portforwarding,Machine to Machine

1.https://supportforums.cisco.com/message/3190440
2.
Router has:
inner bound || DMZ || outer bound
NAT SPAM NAT

1.DMZ input is a local ip
2.NAT is a wrapper around DMZ
3.NAT has a ART table
4.if there is only single public ip,in the ART public ip,port local ip,port will be the entry
5.NAT is inbound initiated by default,it acts similar to a firewall since only the applications
that seeks a connection will have entry in the ART

6.static nat,port forwarding are similar
7.nat can be interface,ip,port based
8.NAT from inner to outer,portforward,dmz,static nat outer to inner

9.Subnets
1.all nodes behind a single gw assigned ip addresses in different subnets is of less use
arp will resolve the mac and that will direct the packets
2.if the nodes are on two sides of the gw it will be more useful
the gw will have routing information about two subnets and packets will trascend the gw
3.

10.Use ip tables to setup DMZ and NAT entries

11.Illustrated nat setup
http://doc.m0n0.ch/handbook/examples.html

12.typical nat rule
Original Packet:
==============
Source: DMZ Network (or object for DMZ server)
Destination: Internal Network (usually a group object containing all your internal subnets)
Service: Any

Translated Packet:
=================
Source: Original
Destination: Original
Service: Original

12.Features
In current router,dmz is single ip based,any malware with access on dmz ip can access other pc on lan

Next advanced is router with wan ,wifi,lan + optional interface.This optional i/f can be configured for a dmz subnet.That subnet can be prevented from accessing lan subnet

13.wherever iptables command is accessible in firmware..advanced configurations can be tested

14.For VPN on Router the server acts like a gw with dhcp and different subnet/same subnet
the configuration can be software switch with one port bridged to hardware switch ... ??

Saturday, October 16, 2010

webdav on linux windows

1.http://andres.jaimes.net/setting-up-a-webdav-server/
2.use webdav to rsync
http://forums.dropbox.com/topic.php?id=8957

apache virtual host

1.single machine -- running multiple web server simulation
follow
http://www.debuntu.org/2006/02/22/7-virtual-hosting-using-apache-2

2.directory access
http://www.cyberciti.biz/faq/apache-restrict-access-based-on-ip-address-to-selected-directories/
http://httpd.apache.org/docs/1.3/howto/auth.html#basic

git and ssh

1.initialize the git in git user login home ... link ssh public key with git home
2.it will create .gitosis.conf
3.next to clone gitosis-admin

Server
=====
install gitosis and git

Configuration
=============
create a user called git
give appropriate permissions to critical files
ensure .ssh folder

git unlike ssh uses gitosis-init to append public key(id_rsa.pub) to authorized_keys file(please remove the previous conflicting entries if any)

Client
======
use git clone to get the init files

follow http://www.hackido.com/2010/01/installing-git-on-server-ubuntu-or.html

At any point to reset
rm -r gitosis,repositories,.gitosis.conf

Creating a new repo
====================
in the gitosis-admin folder cloned initialially on the client there is the file gitosis.conf
Add entries for the new repo in it,note that the writable should have "folder(project)" name
Add group can be arbitrary
add this to remote using commit

follow the link
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way

on any client use git clone git@localhost:test.git

ssh and localhost

server
/etc/init.d/ssh restart
/etc/ssh/sshd_conf
PermitRootLogin no

#RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no

UsePAM no
AllowUsers git

Directory
=========
using adduser ..created user git
using sudo -u git -i ..logged in on the client as git

Permissions
===========
chown -R git:git /home/git/.ssh
chmod 700 /home/git/.ssh
chmod 700 /home/git/.ssh/id_rsa
chmod 700 /home/git/.ssh/id_rsa.pub
chmod 700 /home/git/.ssh/authorized_keys === id_rsa.pub

Debug
=====
/usr/sbin/sshd -d -p 54321
ssh -p 54321 -v git@localhost

Client
======
/etc/ssh/ssh_conf

creating and deleting user accnt

1.adduser ....user --interactive
2.userdel user
3.su -s -u user
4.useradd -- non interactive
5.passwd user
6./etc/adduser.conf
7.deluser user
8.difference of system and non system user

9.useful ssh
http://kimmo.suominen.com/docs/ssh/

10.a client server setup
11.need to start a ssh session with the server,as a user on the server
12.the user account needs private and public key
13.the client gets the public key and is used with the server
14.article
http://www.symantec.com/connect/articles/ssh-host-key-protection
15.ssh-add can be used to add keys to frequently used secure sessions
16.ssh-agent

17.ssh has a client d and server daemon
/etc/init.d/ssh restart

18.ssh checklist
http://ubuntuforums.org/showthread.php?t=231451
19.ssh test
http://sial.org/howto/openssh/publickey-auth/
20.#ChallengeResponseAuthentication no -- modification in /etc/ssh/sshd_conf
AllowUsers gitosis,git
21.whoami .....login commands
22.basics of shell
http://www.linuxfromscratch.org/blfs/view/cvs/postlfs/profile.html

23.sudo -u git -i .... resets the $HOME etc

24.sudo useful
http://www.freesoftwaremagazine.com/articles/command_line_intro

25.Each user needs to be at /etc/sudoers file..use visudo ...use passwd to change password

26.standalone testing openssh
/usr/sbin/sshd -d -p 54321
ssh -p 54321 localhost
http://docstore.mik.ua/orelly/networking_2ndEd/ssh/ch12_01.htm

sshd configuration

1.http://www.faqs.org/docs/securing/chap15sec122.html

Friday, October 15, 2010

app engines and data encryption

1.only instructions to the app engines should be sent without encryption
2.All data should go encrypted to the remote engine
3.there should be two domains like time and frequency
4.on the remote machine data manipulation should be in encryption domain and once it reaches back
it should be converted to decrypted domain

storage and database

1.A system device or switch that involves a database, that can absorb the drive contents on a click and lay it out on drive on click ..can be useful
2.there is already drive raw image creation tools available

tunnels

1.tunnels are possible over
http,https,ssh,ssl,vpn,sip,rtsp,ftp,git,svn etc

using webdav for local and remote plug

1.a drive or directory can be plugged to apache using webdav
2.this drive or directory can be accessed either over internet or lan by plugging on to webdav
3.this helps in moving the integrated development environment and wiki and even test setup live over
web or local instantly
4.sites on the apache are like plugs, one side can be interfaced with a filesystem etc and the other for client access

public/private key ssh-keygen and md5 sum

1.by default the file is named id_rsa,id_rsa.pub and is in /root/.ssh //home/.ssh/
2.md5 is used to check identity of binary files
3.using ssh
http://inside.mines.edu/~gmurray/HowTo/sshNotes.html

git server on ubuntu

1.http://www.hackido.com/2010/01/installing-git-on-server-ubuntu-or.html

usb ext drive,failure in ubuntu due power failure

1.on windows machine
run scandisk.exe from cmdline with /f --verbose
2.run diskdefrag.exe /f --verbose from cmdline

openoffice pdf--html public link

1.open openoffice document
2.add diagrams
3.preview as web documents
4.ensure to group all diagrams before preview
5.save locall to /var/www/site
6.give links in wiki
7.the above method is for custom server
8.it can be done using scribd links,googledoc links,skydrive links

using svk and trac

1.tool used for distributed development
2.powerful with diff,patch,kompare
3.svk steps
create a symbolic directory structure of remote svn to local its called mirror
checkout a project from mirror to a local folder its called workcopy
do modification on workcopy
push to mirror
push from mirror
reference links
===============
http://code.google.com/p/google-gadgets-for-linux/wiki/SVKQuickStart
http://lists.bestpractical.com/pipermail/svk-users/2008-August/000315.html
4.setup anatomy query commands
svk info
svk list
5.svk installation asks for perl:time module...needs to get it from web
https://bugs.launchpad.net/ubuntu/+source/svk/+bug/317487

6.created svkdepot folder --mirror/local
7.at same level created svkwork folder --local checkout

6.using trac
http://trac.edgewall.org/wiki/TracUbuntuMultipleProjects

7.created svnrepo folder
8.at same level created trac-env folder
//apache.conf
========================================

DAV svn
SVNPath /home/ranjith/work/svnrepo
AuthType Basic
AuthName "svnrepo"
AuthUserFile /etc/subversion/passwd

Require valid-user




SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /home/ranjith/work/trac-env
PythonOption TracUriRoot /trac



AuthType Basic
AuthName "Trac"
AuthUserFile /etc/subversion/passwd
Require valid-user

============================================

8.TracEnv and TracEnvParentDir are used for single and MultipleProjects

9.Add gitplugin and doxygen plugin

10.Integrate wiki and scribd and google doc