CRITICAL SECTION AND ITS SOLUTIONS

What is Critical section?

A Critical Section can be defined as a code segment which accesses shared variables, that needs to be excuted as an atomic action.

In simple words, at a given point of time, in a group of cooperating processes, in its critical section not more than one process can be executed. If, at the same time any other process want to access its critical section, then it must wait for the first process to finish its critical section.

Solution for Critical Section

To avoid critical section problem it should satisfy the following conditions-

1. Mutual Exclusion

It means that if one process is accessing the shared variables or is executing inside its critical section then no other process can enter the critical section.

2. Progress

In the critical section if there are no processes, and if any one or more processes wants to enter their critical section, then any of the processes can be allowed to enter into its critical section.

3. Bounded Waiting

There is a specified limit for how many program can execute their critical section, so, when a process ask to enter its critical section and if the limit is reached then the system must grant permission for entering into its critical section.

No comments to show.

Introduce Yourself (Example Post)

This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.

You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.

Why do this?

  • Because it gives new readers context. What are you about? Why should they read your blog?
  • Because it will help you focus you own ideas about your blog and what you’d like to do with it.

The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.

To help you get started, here are a few questions:

  • Why are you blogging publicly, rather than keeping a personal journal?
  • What topics do you think you’ll write about?
  • Who would you love to connect with via your blog?
  • If you blog successfully throughout the next year, what would you hope to have accomplished?

You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.

Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.

When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.

Design a site like this with WordPress.com
Get started