Skip to main content

Posts

Showing posts from November, 2015

Fragmentation Problem Always Occurs In The Memory

1.Fragmentation problem always occurs in the memory Fragmentation      As processes are loaded and removed from memory, the free memory space is broken into little pieces. It happens after sometimes that processes can not be allocated to memory blocks considering their small size and memory blocks remains unused. This problem is known as Fragmentation.Memory fragmentation occurs when a system contains memory that is technically free but that the computer can’t utilize. The memory allocator, which assigns needed memory to various tasks, divides and allocates memory blocks as they are required by programs; when data is deleted, more memory blocks are freed up in the system and added back to the pool of available memory. When the allocator’s actions or the restoration of previously occupied memory segments leads to blocks or even bytes of memory that are too small or too isolated to be used by the memory pool, fragmentation has occurred. Fragmentation can take a significant bite

Example Of Deadlock In Operating System

Before we discuss about the example of DEADLOCK. We need to know what is DEADLOCK? DEADLOCK is a set of processes is in a deadlock state if every process in the set is waiting for an event (release)  that can only be caused by some other process in the same set. A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function. The earliest computer operating systems ran only one program at a time   The earliest computer operating systems ran only one program at a time. All of the resources of the system were available to this one program. Later, operating systems ran multiple programs at once, interleaving them.   Programs were required to specify in advance what resources they needed so that they could avoid conflicts with other programs running at the same time. Eventually some operating systems offered dynamic allocation of resources.

Definition of Deadlock In Operating System

Deadlock in operating system A set of process is in a deadlock state if each process in the set is waiting for an event that can be caused by only another process in the set. In other words, each member of the set of deadlock processes is waiting for a resource that can be released only by a deadlock process. None of the processes can run, none of them can release any resources, and none of them can be awakened. It is important to note that the number of processes and the number and kind of resources possessed and requested are unimportant. The resources may be either physical or logical. Examples of physical resources are Printers, Tape Drivers, Memory Space, and CPU Cycles. Examples of logical resources are Files, Semaphores, and Monitors. Example: The simplest example of deadlock is where process 1 has been allocated non-shareable resources A, say, a tap drive, and process 2 has be allocated non-shareable resource B, say, a printer. Now, if it turns out that proc