kernel space and user space

Kernel  space. Linux  (which  is a  kernel)  manages the  machine's
hardware  in a  simple and  efficient manner,  offering the  user a
simple  and uniform  programming interface.  In the  same  way, the
kernel,  and in  particular its  device drivers,  form a  bridge or
interface  between the  end-user/programmer and  the  hardware. Any
subroutines or  functions forming part  of the kernel  (modules and
device  drivers,  for  example)   are  considered  to  be  part  of
kernelspace.

User space.  End-user programs,  like the UNIX  shell or  other GUI
based applications  (kpresenter for example), are part  of the user
space.  Obviously, these  applications  need to  interact with  the
system's hardware . However, they  don't so directly, but
through the kernel supported functions.

source :http://www.freesoftwaremagazine.com/articles/drivers_linux

irb interactive ruby and ruby files

commandline session

$ 4.2.20 9 508---> irb
irb(main):001:0> 10+10
=> 20
irb(main):002:0> 34*5
=> 170
irb(main):003:0> 9-8
=> 1
irb(main):004:0> ()
=> nil
irb(main):005:0>
$ 4.2.20 12 511---> ruby sum.rb
3
$ 4.2.20 13 512---> cat sum.rb
a = 1 + 2
puts a
$ 4.2.20 14 513--->


$ 4.2.20 15 514---> irb
irb(main):001:0> Dir.entries('/home/jeffrin/shelter/symmel/')
=> ["Docs", "books", "..", "https:", "debian-howtos", "language", ".git", "linux", "ovlfose", "bugs-general", "Algorithms", "firewall", "config-files", "README", "beautifulwork", ".", "bookmark"]
irb(main):002:0>

kernel sources and RE with cut and head

commandline session

$ 4.2.20 26 526---> time grep -r '^Linus' * | head -n20 | cut -c 1-31
arch/x86/math-emu/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus
debian/pkg/headers/README:Linus

real	0m1.110s
user	0m0.444s
sys	0m0.608s
$ 4.2.20 27 527--->

using regular expressions in kernel source

commandline session

$ 4.2.20 67 568---> 
grep -r '^kernel' * | head -n20
arch/alpha/kernel/entry.S:kernel_thread: arch/alpha/kernel/entry.S:kernel_execve: arch/avr32/kernel/head.S:kernel_entry: arch/avr32/kernel/head.S:kernel_start_addr: arch/sh/boot/compressed/head_32.S:kernel_start_addr: arch/mn10300/kernel/kernel_execve.S:kernel_execve: arch/mn10300/kernel/kthread.S:kernel_thread_helper: arch/um/.gitignore:kernel/config.c arch/um/.gitignore:kernel/config.tmp arch/um/.gitignore:kernel/vmlinux.lds arch/cris/arch-v32/kernel/process.c:kernel_thread_helper(void* dummy, int (*fn)(void *), void * arg) arch/cris/arch-v32/kernel/process.c:kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) arch/cris/arch-v32/kernel/entry.S:kernel_execve: arch/cris/include/arch-v32/arch/bitops.h:kernel_ffs(unsigned long w) arch/cris/arch-v10/kernel/entry.S:kernel_execve: arch/cris/arch-v10/README.mm:kernel segments like the i386, need to setup swapper_pg_dir directly in head.S arch/cris/arch-v10/README.mm:kernel's internal paged memory system, vmalloc/vfree. arch/frv/kernel/kernel_thread.S:kernel_thread_emsg: arch/frv/kernel/kernel_thread.S:kernel_thread: arch/frv/kernel/kernel_thread.S:kernel_thread_error: $ 4.2.20 68 569---> $ 4.2.20 68 569--->
grep -r 'kernel$' * | head -n20
arch/hexagon/mm/copy_from_user.S: * User memory copy functions for kernel arch/hexagon/mm/strnlen_user.S: * User string length functions for kernel arch/hexagon/kernel/vmlinux.lds.S: * Linker script for Hexagon kernel arch/hexagon/kernel/head.S: call start_kernel arch/hexagon/include/asm/pgalloc.h: * that new address spaces always contain the kernel arch/hexagon/include/asm/pgalloc.h: * Hexagon VM spec has a "monolithic" L1 table for user and kernel arch/alpha/boot/bootp.c: * This file is used for creating a bootp file for the Linux/AXP kernel arch/alpha/boot/main.c: * This file is the bootloader for the Linux/AXP kernel arch/alpha/boot/bootpz.c: * Linux/AXP kernel arch/alpha/boot/bootpz.c: copy area, because there needs to be a buffer area after the kernel arch/alpha/boot/bootpz.c: occur when using the normal START_ADDR of the kernel arch/alpha/boot/head.S: jsr $26,start_kernel arch/alpha/Kconfig: singleprocessor machines. On a singleprocessor machine, the kernel arch/alpha/mm/fault.c: /* Send a sigbus, regardless of whether we were in kernel arch/alpha/kernel/vmlinux.lds.S: } :kernel arch/alpha/kernel/vmlinux.lds.S: } :kernel arch/alpha/kernel/err_marvel.c: * 1) a uniprocessor kernel arch/alpha/kernel/head.S: jsr $26,start_kernel arch/alpha/kernel/entry.S: beq $0, ret_to_kernel arch/alpha/kernel/entry.S: br ret_to_kernel $ 4.2.20 69 570--->

send patches using git using yahoo mail server

ABOUT git

Git (/ɡɪt/[7]) is a distributed version control system for tracking changes in source code during software development.[8] It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed,[9] data integrity,[10] and support for distributed, non-linear workflows.

MAY BE CORRECT SETTINGS for “PLUS”
[bash]
git config –global sendemail.smtpserver plus.smtp.mail.yahoo.com
git config –global sendemail.smtpserverport 465
git config –global sendemail.smtpencryption ssl
[/bash]

I THINK FOLLOWING SETTING ARE NOT FULLY CORRECT
[bash]
$ git config –global sendemail.smtpserver smtp.mail.yahoo.com
$ git config –global sendemail.smtpserverport 4100
$ git config –global sendemail.smtpencryption ssl
$ git config –global sendemail.smtpuser your_yahoo_mail_address
[/bash]
Now it’s ready: the command git send-email patch-name will ask you for some info about the email sender (you can change the From: field) and recipient, your Gmail password and then it will send the email.

Optionally, it is possible to skip the password prompt by adding it to the configuration with:
$ git config –global sendemail.smtppass your_password

SOURCE : NOT TYPICALLY MINE

LINK
https://en.wikipedia.org/wiki/Git

&~ operation in C

commandline session

 switch (_NSIG_WORDS) {
        default:
                for (i = _NSIG_WORDS, ready = 0; --i >= 0 ; )
                        ready |= signal->sig[i] &~ blocked->sig[i];
                break;

        case 4: ready  = signal->sig[3] &~ blocked->sig[3];
                ready |= signal->sig[2] &~ blocked->sig[2];
                ready |= signal->sig[1] &~ blocked->sig[1];
                ready |= signal->sig[0] &~ blocked->sig[0];
                break;

        case 2: ready  = signal->sig[1] &~ blocked->sig[1];
                ready |= signal->sig[0] &~ blocked->sig[0];
                break;

        case 1: ready  = signal->sig[0] &~ blocked->sig[0];
        }

Related Note : Bitwise Logical Operators and Complex Conjugation Operators.
code source: Linux Kernel Related.
http://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html

(java) bubble sort testing… 0.00003 Ver — 27 No.’s Related

$ 4.2.20 5 505---> time java BubbleSort

real	0m0.247s
user	0m0.172s
sys	0m0.052s
$ 4.2.20 6 506---> time java BubbleSort

real	0m0.204s
user	0m0.148s
sys	0m0.036s
$ 4.2.20 7 507---> time java BubbleSort

real	0m0.207s
user	0m0.152s
sys	0m0.032s
$ 4.2.20 8 508---> time java BubbleSort

real	0m0.222s
user	0m0.168s
sys	0m0.032s
$ 4.2.20 9 509---> time java BubbleSort

real	0m0.230s
user	0m0.172s
sys	0m0.036s
$ 4.2.20 10 510---> time java BubbleSort

real	0m0.241s
user	0m0.180s
sys	0m0.036s
$ 4.2.20 11 511---> time java BubbleSort

real	0m0.255s
user	0m0.188s
sys	0m0.040s
$ 4.2.20 12 512--->

bogomips . Linux kernel

commandline session

root@debian:~# cat /proc/cpuinfo
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 127
model name	: AMD Sempron(tm) Processor LE-1150
stepping	: 1
microcode	: 0x83
cpu MHz		: 1000.000
cache size	: 256 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow up rep_good nopl extd_apicid pni cx16 lahf_lm extapic cr8_legacy 3dnowprefetch
bogomips : 2009.14
TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc 100mhzsteps root@debian:~#

one sentence

"the number of million times per second a processor can do absolutely nothing."