We want that education by which character is formed,strength of mind is increased, the intellect is expanded and by which, one can stand in one's own feet. Education is the manifestation of the perfection already in man.

SWAMI VIVEKANANDA

my website:http://www.shyamconnect.com


Monday, April 6, 2009

The OS way


Operating System is one of the most interesting part of computer Technology.
Without an operating System there is no question for software development or any of the user interface.

The Big Boss lying under all this operating functions is the KERNEL.

Kernal is nothing but a set of programs lying in the disc the execution of these programs make the operating systems work.
Program Execution
Execution of a program from memory involves the creation of a process(assigning memory to program code and executing it).
Interrupts
The hardware or the application gives the indication about which part of the code has to be executed in the kernel.
Suppose, when we press the "A" key in keyboard then the operating system that is the kernel will receive an interrupt that would allow that to execute the code responsible for displaying "A".
This can be taken as an example for a hardware interrupt.

Memory Management:
It is process managing and allocating memory for various programs that is being executed by the kernel.
Virtual memory: Some application may want the program to always execute at a particular space in the memory.This work is being taken care of virtual memory.
What if the program is not loaded into the memory where it has to be loaded.It is nothing but a Page Fault.
Swapping can be used to overcome this page fault.

Scheduler is a small software program that can control the amount of time a program is executed in a particular memory.
The Scheduler swaps the control between the Kernel and the Program to make sure all the Programs are executed for a considerable amount of time and along with its own priority.
This action is called Context Switching.

Some scheduling techniques

1.FCFS(First come first first serve)
2.Shortest job first done
-Preemptive(Gives way for another)
-Non-preemptive(No way)
3.Priority Scheduling(based on Priority)
Starvation of low priority process
4.Round Robin Scheduling
w.r.t Timer
5.Multilevel Queue Scheduling
Round Robin with Multilevel Queues
6.Mutilevel Feedback Queue Schduling.
Mutilevel queue with Priority for each queue.

So let's learn "What is Caching"?
Cache contains all the frequently accessed data . Such data's are retrieved from the main memory and stored in the cache. The processer checks for the needed data in the cache. If the needed data is not present then the processer gets it from the main memory and stores it in the cache for future use.

Dining Philosopher's problem:


Consider the case where some philosophers had to dine together.
But the problem they have one fork on left and one fork on right.
But the food cannot be eaten with a single fork.So if all the phil's
are going to take the left fork at the same time then no one can eat.


The lack of available forks is an analogy to the lacking of shared resources in real computer programming, a situation known as Concurrency.

That is the shared resources are getting locked with no use for anyone.This results in a deadlock.

Semaphore is a variable count used in the method that controls and restricts access to shared resources for ex:as in the case of dining philosophers problem.

So this dining philosophers problem introduces to three technical Jargons.
CDS
Concurrency
Deadlock
Semaphores
This article will be updated.

No comments: