StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Operating Systems, Process Concept, and State - Research Paper Example

Cite this document
Summary
The paper "Operating Systems, Process Concept, and State" summarizes the programs loaded into memory are termed as processes, the latter passes through various queues during the course of its lifetime. The operating system provides schedulers for managing the selection of processes and queues…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER92.7% of users find it useful
Operating Systems, Process Concept, and State
Read Text Preview

Extract of sample "Operating Systems, Process Concept, and State"

Process Concept and Table of Contents Process – An Introduction 3 2.Process 4 3.Process Control Block 4 4.Process Scheduling 5 A.Scheduling Queues 6 B.Schedulers 7 C.Context Switching 9 5.References 10 1. Process – An Introduction In a time shared computer system the CPU activities are termed are programs. Process is the basis of all computations and is defined as a program in execution. In order for a program to execute, it is loaded into main memory (RAM). Programs when they reside in the main memory are completely different from their counterparts i.e. when they reside on hard disc, tape, etc. The programs in former state are considered as dynamic because they are running while the latter are considered as static. Therefore the programs that have been loaded into memory and are in running state or already executing are termed as processes. Programs are set of instruction stored on a disc. Programs are passive entities while process is active (Dhamdhare, 2006, p. 84). A process is not merely code which is also called text section. Every process comprises of four parts that define its active nature. Program counter: depicts the current activity of a process Processor registers: indicates processors state w.r.t. a process Stack: keeps temporary data (e.g. return addresses, parameters of a function, local variables) Data Section: contains global variables Heap: depicts the memory that may be attained by the process dynamically during its execution A single program may have different executions. Each execution is termed as a separate process (Tanenbaum, 2009, p. 84). E.g. MS Word is a program. When we open several files in Word, each file would form a separate process. In this case, the text section would be common, but each process would have its own program counter, data, stack and heap. 2. Process State When a process executes, it changes its state. A state depicts the current activity of the process (Halder & Aravind, 2010, p. 96; Silberschatz et. al, 2005). There are five states a process can be in: New: Process is being created Running: Process is executing its instructions Waiting: Process is waiting for an operation to complete (e.g. input from I/O device) Ready: Process is waiting for assignment to processor Terminated: Process has completed its execution Figure 1 Process States Diagram 3. Process Control Block The operating system maintains a Process Control Block (PCB) for every process. It contains the following information related to a process: Process State: Indicates whether process is ready, running, waiting, etc. Program Counter: Depicts address of next instruction to be executed. CPU registers: Includes accumulators, index registers, stack pointers, condition codes, state registers (for interrupts, etc.), etc. CPU Scheduling Information: depicts priority, position in queue, etc. Memory Management Information: contains vales of base and limit registers, page/segment tables, etc. Accounting Information: depicts CPU usage time, process number, time limits, etc. I/O Information: depicts linked I/O devices or opened files, etc. Figure 2 Process Control Block 4. Process Scheduling In a multiprogramming environment, in order to maximize CPU utilization, the CPU is never allowed to stay idle (Sharma et al., 2010, p. 123). It is made to run some process or the other at all times. Time sharing means that the switching of processes from CPU at such a speed that the user can interact with any of them at any time without having to wait. Operating system has a process scheduler that selects a process to run by CPU from the available processes. In a single processor system, only process will be running at a time. In case of several processes, they will have to wait till the CPU is free from running the current and only can it be rescheduled. A. Scheduling Queues Operating system maintains a set of queues for the scheduling of processes (see Figure 3). The three most basic queues are: Job Queue: comprises of all of the system’s processes Ready Queue: Comprises of all those processes that have been loaded into memory and are waiting to be executed. Device Queue: Comprises of all those processes that are waiting for the availability of an I/O device The ready queue is implemented as a linked list. The header of the queue has the address of the first PCB and the last ones. Every PCB has a pointer pointing to the next PCB in queue. Once a process is created, it is placed inside the ready queue waiting to be assigned to the CPU (dispatching). Once it is allocated to the CPU and it is executing, it either is interrupted, and is sent back to the ready queue by CPU generates an I/O interrupt and is sent to the I/O queue creates new process and is in wait for it to terminate In the last two cases, the status of processes is eventually changed from waiting to ready and so are brought back to the ready queue. These events keeping happening till the process ends. In that case, the process is removed from all of the queues. It’s PCB and the allocated resources are also de-allocated. Figure 3 Process Scheduling Diagram B. Schedulers A process passes through various queues during the course of its lifetime (Dhotre, 2008, p. 2-8; Silberschatz et. al, 2005). The operating system provides schedulers for managing the selection of processes and appropriate queues. The two basic schedulers are: Long-term Scheduler (Job scheduler): selects and loads processes stored in secondary disc to memory in ready queue (see Figure 4). This scheduler is invoked infrequently (e.g. in seconds or minutes) as it could be a while before a new process needs to be created and therefore is slow. The long-term scheduler determines the degree of multiprogramming i.e. the number of processes in ready queue. For a stable degree of multiprogramming, the average process creation rate must be equal to the average rate of processes leaving the system. Short-term Scheduler (CPU scheduler): selects a process to be executed next from the ready queue and allocates it to CPU for execution (see Figure 4). This scheduler is invoked frequently (milliseconds) due to short execution times of the processes and therefore is fast. The processes are generally of two kinds: 1. I/O bound processes are those that spend more time in IO than in computations) 2. CPU bound processes are those that spend more time in computations and do not require IO. It is imperative that the long term scheduler makes a balanced selection between the IO and CPU bound processes. In case all processes are CPU bound, then the IO queue would remain empty and the devices will be of little use. In case all processes are IO bound then the ready queue would be empty and the short-term scheduler would remain idle. A balanced selection would ensure better system performance. Medium-term Scheduler: maybe present in some operating systems that offer time sharing. The scheduler offers an intermediate level of scheduling wherein the processes are sent back from the ready queue to secondary storage as shown in Figure 4. This is essentially required for managing the degree of multiprogramming of the system. It controls the number of processes competing for being allocated to CPU. In cases where the processes in ready queue are not balanced or memory space is required, the scheduler needs to swap out these processes. The processes that are swapped out are later on swapped into memory (in ready queue) and resume their execution. Figure 4 Long-, Medium- and Short-term Schedulers C. Context Switching Whenever a CPU switches its control from one process to another process, it requires saving the state of the current process before switching and restoring the state of the process that it is being allocated to. Thus the context of execution is saved wherefrom the suspended execution is resumed. PCB values provide the context for a process and the values of CPU registers, the process state and memory information is stored for every process. When the CPU switches back to some former process, the context is restored by restoring the values stored in PCB. Figure 5 Context Switching Context switching is an overhead on the system as no useful computation is done during this time. The delay is dependent on the hardware used in the system (Garrido, 2012, p. 79). 5. References Silberschatz, A., Galvin, P.B. & Gagne, G. (2005). Chapter 3: Processes. Operating System Concepts, 6th Edition. John Wiley and Sons Inc. Tanenbaum, A.S. (2009). Modern Operating Systems, 3rd Edition. Pearson Prentice Hall. Dhamdhere, D.M. (2006). Operating Systems: A concept-based Approach. 2nd Edition. McGraw Hill. Haldar, S. & Aravind, A.A. (2010). Operating Systems. Dorling Kindersley Pvt. Ltd. Sharma, V., Varshney, M. & Sharma, S. (2010). Design and Implementation of Operating System, 1st Edition. Laxmi Publications, Ltd. Garrido, J., Schlesinger, R. & Hoganson, K.E. (2012). Principles of Modern Operating Systems, 2nd Edition. Jones and Barlette Company Dhotre, I.A. (2008). Operating Systems, 1st Edition. Technical Publications Pune.   Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Operating Systems Research Paper Example | Topics and Well Written Essays - 1500 words”, n.d.)
Operating Systems Research Paper Example | Topics and Well Written Essays - 1500 words. Retrieved from https://studentshare.org/information-technology/1589090-operating-systems
(Operating Systems Research Paper Example | Topics and Well Written Essays - 1500 Words)
Operating Systems Research Paper Example | Topics and Well Written Essays - 1500 Words. https://studentshare.org/information-technology/1589090-operating-systems.
“Operating Systems Research Paper Example | Topics and Well Written Essays - 1500 Words”, n.d. https://studentshare.org/information-technology/1589090-operating-systems.
  • Cited: 0 times

CHECK THESE SAMPLES OF Operating Systems, Process Concept, and State

Environmental Planning and Landscape Urbanism

THE KEY CONCEPTS IN ENVIRONMENTAL PLANNING AND LANDSCAPE URBANISM: IMPLICATIONS FOR THE SPATIAL PLANNING OF CITIES AND THEIR REGIONS by Author's Name Name of Class Name of Professor Name of School City, state 10 October 2013 Introduction In the discipline of contemporary urbanism, landscape urbanism presents a paradigm shift that is currently underway and that seeks to place landscape at the centre of modern urbanism, contrary to what has been the case over the years, with architecture being the basis on which contemporary urbanism is aligned....
5 Pages (1250 words) Essay

Process Control Block

PCBs classified under process control information are : scheduling and state information (i.... terminals, devices), process owner (user ID), Parent (pointers to parent or child processes), save registry (process registers, stack information and pointers), process IDs (I/O, IPCs), process state (ready, running or standby mode), memory pointers (MMU registers) (Silberschatz, Galvin and Gagne, 2002).... the current state of the process, time slot, time to run, the priority of process) , data structuring (i....
4 Pages (1000 words) Essay

State and Internationalization of Society

Section A focuses on the concept of a global government in lieu of national governments as described by Amitai Etzioni.... The new safety architecture is a concept that is steeped in the fact that nations are better off by co-operating and sharing some resources to achieve ends that are common to them.... Etzioni identifies that the co-operation of nations under numerous banners has caused nations to live according to harmonised structures and systems....
7 Pages (1750 words) Literature review

Systems Thinking as a Holistic Approach

According to the systems thinking approach, a particular behaviour results from Reinforcing is the process by which the different components of a system are put into action.... Balancing process makes sure that every component of a system is in equilibrium with each other.... systems' thinking is a holistic approach whereby a system is analyzed or studied by breaking it down into separate elements.... Sytems thinking can be… to conduct research in different subject matters such as educational systems, political matters, environmental aspects, economic conditions, medical research and human resource amongst many others....
10 Pages (2500 words) Literature review

Operation management

The concept of operations management is effective handling of the metrics which comprise of quality, stock availability, quality, flexibility and time.... It involves the management of the entire process of supply chain from procurement of raw materials to the delivery of the finished products.... The restaurant was founded in the year 1987 and has now expanded its business to twenty four countries and operating through 1000 outlets....
12 Pages (3000 words) Essay

Monitoring the Performance of the Computer

This is because during an I/O operation, such as disk read information, the operating system kernel checks for data in the page cache to facilitate fast reading of the data. The advancements operating systems The two sections that important for this discussion are the Linux I/O and Windows I/O.... In a synchronous I/O operation, programs are placed on a wait state while in an asynchronous I/O operation; program or process execution request can be interrupted to enable the execution of another program (Russinovich, Mark, David & Alex Ch....
1 Pages (250 words) Essay

Operating System Concepts

The present assignment entitled "Operating System Concepts" dwells on the concept of a user-level thread library.... Methods and Object Synchronization (mutual exclusion): One process should be able to use only one resource at a time.... The request by another process should be delayed until the resource has been released.... When more than one process is waiting for a resource and the resource becomes available, allocate the resource to the waiting process with the highest priority....
4 Pages (1000 words) Assignment

XP Windows Operating Systems

… The paper "XP Windows operating systems" is an engrossing example of coursework on logic and programming.... The paper "XP Windows operating systems" is an engrossing example of coursework on logic and programming.... Therefore, these measures are basically attempting to ensure that Windows XP remains one of the best-operating systems as time might permit.... Some of these features are basically exclusive to Windows alone and have been developed out of the growing need to boost security measures and in light of the security weaknesses of the previous versions of the Windows operating systems....
18 Pages (4500 words) Coursework
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us