Tuesday, August 12, 2008

Operating System

Hi Friends
Today i am very Happy. We have opened up our account in Olympics with a gold medal. Many many congrats to the Youth Icon Abhinav Bindra from Edgeineers Club. You can share your best wishes messages with me at einstein.padhaku@gmail.com Like Abhinav we also have to Get an Edge and win in life, though our fields can be different.

Now lets start our todays session.

Q. What do you mean by deadlock?

Ans. In simple terms a deadlock is a situation wherein two or more competing actions from processes are waiting for the other to finish, and thus neither ever does. Each process holding a resource that is needed from the other process. eg: process p1 holding resource r1 waiting for resource r2 to complete and process p2 holding a recourse r2 waiting for resource r1 to complete.

Q. What is a Real-Time Operating System?

Ans. A real time process is a process that must respond to the events within a certain time period. A real time operating system is an operating system that can run real time processes successfully.
Depending on this the real time operating system is of two types:
1)Hard Real-Time(in this system has to respond within the specified time limits in case if it fails to respond within that time then the process is considered to be fail.e.g Robot Systems )

2)Soft Real-Time(in this if system fails to respond within the specified time limits then the process is not considered to be failed rather it gets some more time from the system to get comlpete.)

Q. What is the relation between process system time, process waiting time , and process CPU time?

Ans. Process system time (turn around time) = process cpu time + process waiting time.

Q. What resources are used when a thread created? How do they differ from those when a process is created?

Ans. When a thread is created the threads does not require any new resources to execute the thread shares the resources like memory of the process to which they belong to. The benefit of code sharing is that it allows an application to have several different threads of activity all within the same address space. Where as a new process creation is very heavyweight because it always requires new address space to be created and even if they share the memory then the interprocess communication is expensive when compared to the communication between the threads.

Q. What is Memory-Management Unit (MMU)?

Ans. Hardware device that maps virtual to physical address.

In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.
->The user program deals with logical addresses; it never sees the real physical addresses.

Q. What is fragmentation? Different types of fragmentation?

Ans. Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.

External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous

Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used Reduce external fragmentation by compaction
->Shuffle memory contents to place all free memory together in one large block.
->Compaction is possible only if relocation is dynamic, and is done at execution time.

Q. What is starvation and aging?

Ans. Starvation: Starvation is a resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.

Aging: Aging is a technique to avoid starvation in a scheduling system. It works by adding an aging factor to the priority of each request. The aging factor must increase the request’s priority as time passes and must ensure that a request will eventually be the highest priority request (after it has waited long enough).

One of our Edgeineers Club member Ajay has mailed me and asked about certain tips on .Net, we will surely be discussing about that in our coming interactions.

Keep reading...

Cheers

Padhaku Einstein

Contact me at einstein.padhaku@gmail.com

No comments: