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

Central Processing Unit- the Performance of Multiple Tasks by the Computer - Assignment Example

Cite this document
Summary
The paper "Central Processing Unit- the Performance of Multiple Tasks by the Computer" concerns an effective work of the program. In the modern world, the CPUs perform context switches by means of programming/software. …
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER95.4% of users find it useful
Central Processing Unit- the Performance of Multiple Tasks by the Computer
Read Text Preview

Extract of sample "Central Processing Unit- the Performance of Multiple Tasks by the Computer"

OPERATING SYSTEM ASSIGNMENT Affiliation OPERATING SYSTEM ASSIGNMENT Short-term Scheduler and Long-term Scheduler A short term-scheduler is also known as a dispatcher. It is the one responsible for executing most often and it makes the finest-grained decisions of the process that is to be executed next. This type of a scheduler is invoked whenever an event occurs. It may lead to the interruption of one process by preemption. A long-term scheduler on the other hand determines the kind of programs admitted to the system for processing. It controls the degree of multi-programming. A job becomes a process once this type of scheduler has been admitted. The Concept of a Context Switch A context switch is a procedure that a computer’s Central Processing Unit (CPU) follows to change from one task/process to another while ensuring that the tasks do not conflict. For a computer to provide user-friendly multi-tasking, it needs an effective context switching. In a computer’s CPU, the term context is used to refer to the particular program counter and registers at a specific moment in time. A CPU’s current instruction is held by a register. The program counter Is also referred to as an instruction address register. It is a small amount of quick memory that is used to hold the address of the instruction to be executed immediately after the current one. It is possible to perform a context switch entirely in physical media, which is by use of hardware. This is especially so in older CPUs, for example the x86 series. In the modern world, the CPUs perform context switches by means of programming/software. The modern CPUs are very fast and they are able to perform numerous context switches within seconds. This gives the user an impression of the performance of multiple tasks by the computer. Difference between Deadlock Prevention and Deadlock Avoidance Deadlock prevention is the process of averting deadlocks by restraining how demands for resources can be made in the system and how they are handled, that is system design. Its main objective is to ascertain that at any moment one of the significant conditions for deadlock can certainly not hold. Deadlock avoidance, on the other hand, is where the system vigorously contemplates every request and decides whether it is safe to grant it at that point. The system requires additional apriori information regarding the overall potential use of each resource for each process. Deadlock avoidance allows more concurrence than deadlock prevention. Benefits and Challenges for Multithreaded Programming Presented by Multicore Systems The benefit of a multithreaded programming that is presented by multicore systems is that programmers are able to complete more total operations than with one core alone. This is the concept of multitasking. Instructions in a series are also able to run faster. Its challenges are that programmers have to work harder to achieve continued performance improvements especially by reconsidering how they develop applications. The developers are required to develop application to divide the work among cores by the development of a parallel application. A lot of work is also required to manage the states of the threads and ensuring proper communication and synchronization between the threads. It is important to manage the four states (terminated, blocked, ready to run and running) effectively so that the correct results of an application are achieved. Programmers are required to use only the resources that are not needed simultaneously by other caller in the application since the threads have access to the same memory. Common programming inefficiencies such as deadlock, race conditions and memory contentions are likely to arise when multiple threads become hard to follow. Coarse Grained Multithreading and Fine Grained Multithreading Fine grained multithreading switches between threads on a fixed grained schedule usually processing instructions from a different thread on every cycle causing the execution of multiple threads to be interleaved. This cycle by cycle interleaving is often done in a round-robin fashion, skipping any threads that are stalled due to branch mispredict or cache miss or any other reason. Fine grained multithreading sacrifices the performance of the individual threads. It also needs a lot of threads to hide the stalls which also means a lot of register files. Coarse grained multithreading does not switch out the executing thread until it reaches a situation that triggers a switch. This occurs when the instruction execution reaches either a long latency operation or an explicit additional switch operation. Unlike the fine grained multithreading, the coarse grained multithreading does not severely limit all single thread performance. Coarse grained multithreading needs a short in-order pipeline for good performance unlike the fine grained multithreading. Coarse grained multithreading cannot tolerate short stalls while fine multithreading can. This limits its ability to improve the throughput. It suffers from performance deterioration occasioned by short latency instructions. Process Starvation Process starvation is a resource management problem where a process does not get the resources it requires for a long period of time because the resources are being allocated to other computer processes. It mostly occurs in a priority based scheduling where high priority requests get processed fast. This implies that a request with the least priority may end up not being processed. Aging can be used to prevent starvation since it is a technique that helps in the avoidance of starvation in a scheduling system. This condition is usually employed to reduce starvation of low priority tasks. Aging solves the problem of starvation by adding an aging factor to the priority of each request. The aging factor ensures must ensure that it has increased the request priority as time passes and that a request will eventually be the highest priority request. This ensures that jobs in the lower level queues in the scheduling system will eventually complete their execution. How the Dispatcher Determines the Order of Thread Execution in Windows A thread is a unit of work that can be done simultaneously with other units of work that are in the system. The dispatcher employs a 32-level priority scheme so as to be able to determine the execution order. The priorities are divided into two classes, that is, the variable class and a real time class. The variable class has got threads having priorities starting from 1 to 15 whereas the real time class has got threads that have priorities as from 16 to 31. The dispatcher therefore employs a queue for each of the scheduling priorities and it traverses the set of queues from the highest to the lowest until the point at which it finds a thread that is ready to run. If the dispatcher does not find a thread that is ready, it executes an idle thread. Critical Section A critical section is a region of code under which a process uses a variable that is shared with other processes. It requires a mutual exclusion of access. Critical sections may use the preemptive kernel approach or the non-preemptive kernel approach. A preemptive kernel enables a process to be preempted while it is running in the kernel mode. A non-preemptive kernel on the other hand does not allow a process that is running in kernel mode to be preempted. A kernel mode process runs up to when it exits kernel mode or voluntarily yields the control of the CPU. A non-preemptive kernel is essentially free from the race conditions on kernel data structures as the information of this register will be saved and even restored by the interrupt handler. Dining Philosophers Problem and Operating Systems The dining philosophers’ problem encompasses five philosophers at a curved table with a bowl of food and five chopsticks. Each of the five chopsticks seats between two adjacent philosophers. The philosophers are then allowed to think and then eat. Since each philosopher requires two chopsticks to eat and only five chopsticks exist at the table means that two philosophers may not be in a position to eat at the same time. This problem that involves the dining philosophers is similar to the problem of scheduling processes that do require a limited number of resources for execution. A Reader-Writer Lock and a Semaphore A tool like a semaphore only accepts one process to access shared data at a particular time. A reader-writer lock is useful when it is easy to differentiate if a process is in only reading or it is in reading/writing shared data. If it is only in reading shared data, it can be in a position to access shared data simultaneously with other readers. In the situation when several readers exist, the efficiency of a reader/writer will be at its highest. A reader-writer lock deciphers one or more of the reader-writer’s difficulties. It is a more refined lock than the lock implementations shown in the text locks in java. The Two-Phase Locking Protocol A two-phase locking protocol warrants serializability by demanding that each transaction issue to lock and unlock demands in two stages. The phases include a growing phase and a shrinking phase. Under the growing phase, a transaction can obtain locks but not be in a position to release a lock. On the other hand, the shrinking phase enables the release of locks but cannot obtain new locks. Initially a transaction is usually in a growing phase. Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Operating system assignment Example | Topics and Well Written Essays - 1500 words - 1”, n.d.)
Operating system assignment Example | Topics and Well Written Essays - 1500 words - 1. Retrieved from https://studentshare.org/information-technology/1697833-operating-system-assignment
(Operating System Assignment Example | Topics and Well Written Essays - 1500 Words - 1)
Operating System Assignment Example | Topics and Well Written Essays - 1500 Words - 1. https://studentshare.org/information-technology/1697833-operating-system-assignment.
“Operating System Assignment Example | Topics and Well Written Essays - 1500 Words - 1”, n.d. https://studentshare.org/information-technology/1697833-operating-system-assignment.
  • Cited: 0 times

CHECK THESE SAMPLES OF Central Processing Unit- the Performance of Multiple Tasks by the Computer

Characteristics of the Term Multitasking and Its Types

One of the fundamental functions of the kernel includes administering the computer's resources and permitting other programs to run and use these resources.... It enabled the programmers / users to run multiple tasks at the This facility helped in improving efficiency1.... Multitasking refers to the running of multiple independent computer programs on the same computer; giving the appearance that it is performing the tasks at the same time.... Characteristically, the resources comprises of: the CPU (central processing unit), the memory of the system, as well as the I/O (Input / Output) devices....
5 Pages (1250 words) Essay

The Use of the Chipset in a Computer System

This communications controller is placed between the other functions of the computer, Chipsets perform the task of ensuring that the system's performance is as per the required standards of working mechanical products.... The most recent development in the computer era is the use of microchips.... The use of these microchips or chipsets has helped the computer system to perform its functions better.... An example that can arise in the computer system of a chipset is the graphic and audio microchips....
5 Pages (1250 words) Essay

Introduction to Operating Systems

Single tasking involves the… In the single task management, the performance of the system improves by the amplified flexibility, maximum execution speeds of Introduction to operating systems The difference between multitasking and single tasking in computing is that while single tasking implies running one process on the computers operating system.... n the single task management, the performance of the system improves by the amplified flexibility, maximum execution speeds of processes and the minimum usage of both the software and hardware usage....
1 Pages (250 words) Assignment

Symmetrical and Master-Slave Multiprocessing Architecture

Utilizing more than one processing units allows the programs to be executed and processed by taking less time and less burdening the central processing system.... All tasks are assigned by the master processor to the other processors in the master slave processing architecture (Lyonnard, Yoo, Baghdadi & Jerraya, 2001).... The system maintains the priority of certain tasks makes the RAM dedicated to the most valued and important tasks....
2 Pages (500 words) Assignment

IT Infrastructure of a Company

Even though, it is possible to use the client/server infrastructure in programs resident on an individual computer, the concepts turn more useful in the network arena.... Often, this type of infrastructure will have one or additional client computers establishing connections to a central server via an internet connection....
4 Pages (1000 words) Coursework

Purpose of an Interrupt Vector, Virtualization and Simulation

hardware part that is called the device controller along with any device makes up the computer system.... The paper "Purpose of an Interrupt Vector, Virtualization and Simulation" highlights that a processor in a computer running Windows has two different modes: user mode and kernel mode.... The device controllers basically act as an interface between the device and the OS of that computer.... he memory location of the interrupt handler that signifies interrupts and also will save them in a queue if multiple interrupts are in processing, is called interrupt vector....
6 Pages (1500 words) Assignment

Programmable Logic Controllers

However, this is not the major disadvantage as it also offers better features and functions required to perform multiple tasks.... "Programmable Logic Controllers" paper different aspects of PLCs in an illustrative manner leading to better understanding.... Before programmable logic controllers were created, many industries across the world used other methods to control and manage their processes....
8 Pages (2000 words) Assignment

Logical File System and Physical File System

Linux is relatively cheaper than UNIX and has easier bug fix protocolsA computer structure has a primary memory and a write-back cache memory, which has I/O devices that enable it to stream data.... USB was designed for simplicity whereas FireWire was built for performance.... n performance, Serial ATA will provide a 150MB/s of throughput to each drive within the array....
6 Pages (1500 words) Assignment
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