A story of linux kernel

Linux. A kernel normally used by many of the computer persons.You will rarely see a person who is unaware of the term Linux. From perspective of a computer simpleton the one who uses linux mostly shall be having a good knowledge regarding the working of shell,kernel etc.

Linux was created by Linus Torvalds. One of a gem of computer scientist who is popular for his OS.

Linus was one of the student in Finland and had read a book Operating Systems: Design and Implementation by Andrew S. Tanenbaum, (a professor at some university in USA. I hadn’t put much stress on this as facts are facts. You can google it.)

In this book the professor explained about th working of Kernel. To my strange is that he had given the whole source code of his kernel named MINIX in that book. Its really weird but acts as a lucky draw for LInus who took interest in this and with the help of MINIX he created a new OS named Linux. He had told about Andrew in his acknowledgement.

Even Andrew congrats Linus on his success but later on it transformed in a flame war as a question arised that whether the monolithic approach (Linux) is better or the microkernel one (MINIX).

Monolitic approach LInux was dependent upon x86 architecture and furthur both gave their best opinions regarding their OS in the debate.

The debate was even published in  an O’Reilly Media book Open Sources: Voices from the Open Source Revolution in 1999, deeming this to be a perfect example of “the way the world was thinking about OS design at the time”.

It promise to be an interesting read. I will give a shot to this book one day for sure.

You may have a look at  Wiki Article also.

Unfathomable: Immeasurable

Influential: Powerful

Prowess: Skill

Grasp: A firm hold or grip

Intended: Purposeful

Benevolent: Serving a charitable rather than a profit-making purpose

Blatantly: Completely

Auspicious: Hopeful

innocuous: Non Offensive

Seemingly: As far as one knows

Sour: Unpleasant

Efficacy: The ability to produce a desired or intended result

fallacy: Mistaken belief

Rendering: Replying to an action

enraged: Angry

epitome: A perfect example

 

 

Daily News!

Today I got to know about Schedule in WordPress. I want to publish  a blog for a certain date i.e let say 20-07-2016

For this we can edit the date under publish option in wp-admin dashboard.

One more thing is that I was getting errors related to below whenever I use sudo apt-get update:

Some Index files related to ppa failed to update.

There are many ways to solve above problem. One of the way is under:

Software Updates -> Other Software, untick the ppa related softwares.

I also got to know much about Image processing today in Brick Counting presentation.

Apart from above, I gave command rfkill list and it shows:

0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
4: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no

Now to unblock it I gave command: sudo rfkill unblock bluetooth

I also got to know about GRASS (Geographic Resources
Analysis Support System), is a free and open source Geographic
Information System (GIS) software suite used for geospatial data
management and analysis, image processing, graphics and maps production, spatial modeling, and visualization

For Installing latest grass version follow below steps:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable

sudo apt-get update

sudo apt-get install grass

I was getting an error whenver I type grass on terminal:

System Locale setting unsupported  (Something related to this)

For solving this error:

I went to /etc/default/locale

Under that file I had added a line:

LC_ALL="en_US.UTF-8"

Problem solved

In last I just installed Mario game using:

sudo apt-get install smc

To run the game type smc on terminal

I had did all this stuff but was not in a mood today.

Still thanks for tolerating me :p

Semaphores

I had made my below link using this content

One of the most important benefit of having a machine doing our job is its speed and the trust we are having about the completion of the work.

For most of us productivity of a computer is not dependent upon its ability but its related to our imagination. Talking about myself no matter how hard we try but for a computer that work is even not a feet. Computers are basically meant to do hard and smart work. Our job is to give challanges to the machine. One category of these challanges is Multitasking.

A computer (Mainly with single processor and memory) can not do multiple tasks at same time. But don’t take it too seriously, we humans neither take it also :p

Infact multitasking in computers and real life is just an illusion. It’s nothing but just the speed and flexibility to smoothly switch between multiple tasks. And one thing that we all need is Synchronisation.

Synchronization we all know is just an agreement between coexisting things to work concurrently. Same is in case of computers which does multiple jobs of a same process (Threads). These share computer resources like Processor, Memory etc.

As such this sharing sometimes turns into competition leading for certain tasks to freeze (Deadlock). In other words it hinders the completion of certain tasks.

So now the million dollar question is how to make these threads coordinate with each other so that sharing is done synchronously. Semaphores is one of the answer for above question.

A common example of a semaphore is the traffic head light. It has only three colors which build a communicating link between roads and the vehicles.

In computing semaphore is a variable associated with a resource. This variable decides whether the resource shall be assigned to the process or not.

The value of a semaphore is integer in nature. This value is never used directly by the programmer or the program. We can only increment it or decrement it.

Below are the basic steps which a Thread can do with respect to semaphores:

  • Ask for access to a resource. This is generally called as wait.
  • Keeping an access to a resource. This is generally called a Signal.

The Wait is basically grant of the access to the resource or remain in the waiting state till the completion of current Thread. The wait function decreases the value of the semaphore by one. And if after decrementing the value, the semaphore is still a positive quantity, the access is granted to that thread

An example about semaphores working is that if initially its value is 10. Then that means 10 threads can call the wait function of that semaphore and those threads will be assigned the resource if there are 10 copies of that particular resource.

In other words value of semaphore indicates about the no. of copies of a resource.

On the other side if value of semaphore is negative after decrementation it means that the particular thread has to wait in a queue as that resource is being assigned to some other thread. In other words that negative number indicates about the no. of threads waiting for that particular resource.

Now talking about the Signal, it basically increases the value by one. (In case of semaphores normally the incrementation or decrementation is by one only.)

It increases by one when the thread is leaving a resource and other threads are waiting for the same resource. Then it is assigned to the next thread and again decremented. This process goes on till all the threads have the access over the resource one by one.

Using only these 2 operation semaphores are used in a variety of Embedded systems and softwares requiring working of parallel processes in them.

If you all found it interesting and want to go in depth. You can have a look at The Little Book of Semaphores

Significant: Important

grim: Serious

Illusion: A false idea or belief

Seamless: Smooth

Hinder: Difficult

Relinquish: To let go

A flight with SOCKETS!!

Welcome to my class English Vinglish :p

So I got this idea from one of my friend to first introduce about the objective for this category and telling about the blogs which I will be posting under this in coming days.

There are mainly two points for which I had started this category:

  • To improve my English by translating one of my senior Govind Sharma blog in simple language.
  • For enhancing my knowledge

I had made below summary using this blog content

So here we gonna start discussing about the topic.

I don’t know exactly What Sockets are? All I know is that it is needed if you are interested in computer networking stuff. A computer network is simply a web in which different servers are their having some information. These servers communicate with each other through packets.

These packets contains data (along with headers and footers). A socket is what we use to encapsulate these packages in computer program.

I believe after being familiar with Linux that everything in it is in form of files. Also the network communication between different servers is through dynamically created files.

A socket is nothing but a unique id for that file using which we can build a connection with other servers. The conclusion is that, sockets are essential if we want to communicate with other machine using some programming language.

But obviously the whole networking era is too vast to be just covered up by Sockets. You can learn much more about sockets using this guide

Reiterate: repeating again and again

Breaking News!!

Today I made to solve my internet strength related problem again.  I don’t know for how long it retains but below are the steps which I had followed:

I opened Software Settings -> Network .

In this I went to a particular connection and open its settings.

I changed IPv4 and IPv6 settings:

q

w

Done 🙂

Apart from this I had ignored some files of github using gitignore. I had told about it earlier. But today I gave it a fresh start.

I had made a new repo from github and then cloned it in my laptop.

Then I pushed my 6 week report in my account and created a gitignore file and used git pull to copy it in my system.

Then I opened in my gitignore file in Vim and added below line:

*~

Then I went to input directory and run below command:

rm *~

It removes all ~ files. Then I perform below steps:

gt

fg

Its saved in gitignore that ~ files are ignored. Then even if we made new ~ files now it won’t be pushed to github account.

preamble: Introduction

unwavering: Steady

 

Finally Made

So I was trying to make my 6 weeks report in LaTeX. It’s done now. Here I am discussing about the log Errors which I solved later on.

  • My First error was due to writing \documentclass in every file which is being called in my report.tex file. There is no need of writing this in every file as they are to be called in a single file which has a class written in it.
  • Then after solving it I got some more errors related to my different tex files. One of them is :

! LaTeX Error: Can be used only in preamble.

This error mainly came because I had written \usepackage in \begin{document}. But it can be used only in preamble i.e after \documentclass and before \begin{document}

  • Now that’s not all. Errors are in love with me. They like troubling me and I like solving them :p

My next error was:

Underfull \hbox (badness 10000) in paragraph at lines

For solving this error I need to delete \ \ sign wherever it is there before a blank line.

  • One thing more I noticed that if I insert more than 1 space between two letters. A different kind of sign was inserted every time in pdf file. So I leave just one space between words in a paragraph.
  • Still error family is not ready to leave me :p

One more goes here:

! Undefined Control Sequence

This error mainly came due to \grid written in the end of my tex files. It came automatically at the time of running the file sometimes.

Grid is something related to TikZ package.

There were some more silly mistakes done by me. But all solved now.

You can see the code and the pdf file of the report here

Invulnerable: Impossible to harm or damage

Some New Topics

Today I got to know little bit more about Android mailing apps like K-9, BlueMail and TypeMail. I also worked upon LaTeX.

Today  I learnt about calling different files in one latex file instead of writing the whole content in a single tex file. But getting some errors in it. I will solve it soon and write about the errors and How I solved them in my coming blog.

Apart from this its not that interesting but I published a Question online first time in Ubuntu Forums type sites. :p

Stubby: short and thick