Tuesday, June 18, 2019

CPU scheduling Essay Example | Topics and Well Written Essays - 2500 words

CPU scheduling - Essay ExampleSometimes peck speak of pseudopar entirelyelism in this context, to contrast it with the true hardw be parallelism of multi central dealor systems (which have two or more CPUs sharing the same physical memory). Keeping plow of multiple, parallel activities is hard for people to do. Therefore, operating system designers over the years have evolved a conceptual model (sequential processes) that makes parallelism easier to deal with. (Tanenbaum, 2006).The difference amongst a process and a program is subtle, but crucial. An analogy may help make this point clearer. Consider a culinary-minded computer scientist who is baking a birthday cake for his daughter. He has a birthday cake recipe and a kitchen well stocked with the necessary input flour, eggs, sugar, extract of vanilla, and so on. In this analogy, the recipe is the program (i.e., an algorithm expressed in some suitable notation), the computer scientist is the processor (CPU), and the cake ingred ients are the input data. The process is the body process consisting of our bread maker reading the recipe, fetching the ingredients, and baking the cake. The key idea here is that a process is an activity of some kind. It has a program, input, output, and a state. A single processor may be shared among several processes, with some scheduling algorithm being used to determine when to stop work on i process and service a different one.Operating systems n Creation of a processOperating systems need some way to make sure all the necessary processes exist. In very simple systems, or in systems knowing for running only a single application (e.g., controlling a thingummy in real time), it may be possible to have all the processes that will ever be needed be present when the system comes up. In general-purpose systems, however, some way is needed to create and terminate processes as needed during operation. There are four events that cause process to be created1. arranging initializat ion2. Execution of a process creation system call by an existing process.3. A user request to create a reinvigorated process.4. Initiation of a batch job.When an operating system is booted, often several processes are created. Some of these are foreground processes, that is, processes that interact with (human) users and per path work for them. Others are background processes, which are not associated with social occasionicular users, but instead have some specific function. For example, a background process may be designed to accept incoming requests for web pages hosted on that machine, waking up when a request arrives to service the request. Processes that stay in the background to handle some activity such as web pages, printing, and so on are called daemons. Large systems commonly have dozens of them.During the running of multiple processes, the processes compete among themselves. When more than one process is in the ready state and there is only one CPU available, the operat ing system must decide which process to run first. The part of the operating system that makes the choice is called the scheduler the algorithm it uses is called the scheduling algorithm.Introduction to schedulingBack in the old days of batch systems with input in the form of card images on a magnetic tape, the scheduling algorithm was simple just run the next job on the tape. With timesharing systems, the scheduling algorithm became more complex, because there were generally multiple users waiting for service. There

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.