Friday, February 17, 2012
Friday, February 10, 2012
64 bit processor what is the size of ptr and size of int
size of ptr is 64 bits. As Address bus is of 64 bit 2power64 size of memory can be accessed directly..
while in 32 bit 2 power 32 i.e 4 GB memory can be addressed RAM physical memory ant go beyond more than 4 GB
Size of int depends on the implementation generally its 32 bit as in
OS ------------------Data Model-----shor-t------int-------long----longlong-----ptr
Window--------------LLP64----------16---------32------32-------64----------64
Linux-----------------LP4-------------16---------32------64-------64----------64
SPARC--------------ILP64-----------16---------64------64-------64----------64
--------------------------------------------------------------------------------------------
What should be taken care while porting from 32 to 64 Arch?
If client is in 32 and server is in 64 bit what care should be taken?
--padding , ediannesss,pointers ?
while in 32 bit 2 power 32 i.e 4 GB memory can be addressed RAM physical memory ant go beyond more than 4 GB
Size of int depends on the implementation generally its 32 bit as in
OS ------------------Data Model-----shor-t------int-------long----longlong-----ptr
Window--------------LLP64----------16---------32------32-------64----------64
Linux-----------------LP4-------------16---------32------64-------64----------64
SPARC--------------ILP64-----------16---------64------64-------64----------64
--------------------------------------------------------------------------------------------
What should be taken care while porting from 32 to 64 Arch?
If client is in 32 and server is in 64 bit what care should be taken?
--padding , ediannesss,pointers ?
What is Time_wait when does Socket goes in that its uses ?
Active Close / Passive Close ??
Linger option for sockets??
Linger option for sockets??
Wednesday, September 14, 2011
Packet flow in Network
DATA FLOW
A typical data flow which we deal with on daily bases in our homes and offices is like this:
Host A -> Switch -> Router R -> Switch -> Host B
packet creation layer from url type to page opening ? how pkt flows ? if there are 2 router in subnet ?
when is dns query fired ???
A typical data flow which we deal with on daily bases in our homes and offices is like this:
Host A -> Switch -> Router R -> Switch -> Host B
- The 1.x host A wants to send to 2.x host B.
- Host A realises B is on a different network judging from the subnet mask and ip addresses and knows it need help from a router.
- Host A does an ARP operation to find out the MAC address of its default gateway, which is a router R.
- Host A sends to router R with source MAC = A‘s MAC and destination MAC = R‘s MAC. The switches in between them pass the frames intact.
- Router R sends to host B through the switch in between, rewriting the source MAC to R‘s MAC and the destination MAC to B‘s MAC (before this it should have an ARP entry of host B; otherwise it would do an ARP operation to find out B‘s MAC).
packet creation layer from url type to page opening ? how pkt flows ? if there are 2 router in subnet ?
when is dns query fired ???
Wednesday, June 16, 2010
Some question
CA
Remote login Through C code ?
Return of printf? printf("%d",m) whede m = 987
-------------juniper
Endianess happens because of what ? why cant OS take care of it ?
how to write code which can be easily ported across OS?
Static Function?
Hashing how to decide hash funciton?
AVL tree , bst--Binary tree ? Complexity ot binary tree? how nlogn comes?
---------------------------------
LG.
Q If i do malloc for 64 MB will it go if yes how . Does process memory increases .
Q Is Stack frame Size constant . what is stack corruption.
Q Use of extern in C++
Q Can we have static Ctor od Dtor if not why??
Remote login Through C code ?
Return of printf? printf("%d",m) whede m = 987
-------------juniper
Endianess happens because of what ? why cant OS take care of it ?
how to write code which can be easily ported across OS?
Static Function?
Hashing how to decide hash funciton?
AVL tree , bst--Binary tree ? Complexity ot binary tree? how nlogn comes?
---------------------------------
LG.
Q If i do malloc for 64 MB will it go if yes how . Does process memory increases .
Q Is Stack frame Size constant . what is stack corruption.
Q Use of extern in C++
Q Can we have static Ctor od Dtor if not why??
Press ENTER to look up in Wiktionary or CTRL+ENTER to look up in Wikipedia
Friday, June 11, 2010
Linux Find If Processor / CPU is 64 bit / 32 bit ( long mode ~ lm )
for OS
uname -a CPUgrep flags /proc/cpuinfo CPU Modes:
lm means Long mode - 64 bit CPU
Real mode 16 bit CPU
Protected Mode is 32-bit CPU
Subscribe to:
Posts (Atom)