Single Threading and Multithreading Term Paper

Download this Term Paper in word format (.doc)

Note: Sample below may appear distorted but all corresponding word document files contain proper formatting

Excerpt from Term Paper:

Multithreading

Single and Multithreading

The focus of this report will be to attempt to delve into that void called the operating system and to expose the unique concepts of threading and multithreading. The demand for faster and more powerful computers continues to grow as does the demand for better and faster operating systems. The concept of hyperthreading is the next generation of the idea and will also be touched upon.

Both business and personal computing have become an everyday part of the life for millions of individuals the world over. The majority of individuals who use computers, however, do not actually know what is going on in the background. Operating systems, for example, have always worked on the old notion that one only has to know how to drive the car but not necessarily how the car works. In other words, operating systems do get the work done but the average computer user has no idea what the operating system did to get the work done.

The operating system of a computer is the software that tells the hardware what to do. When a computer user clicks on the mouse button he is really communicating with the operating system as opposed to the mouse. The operating system of a computer is really what makes things happen by determining which tasks or parcels of work will be accomplished and in what order. A very large part of an operating system' tasks are accomplished through the concepts of threading and multithreading. Although the names may sound similar, the ideas of threading and multithreading are wholly quite different but it is better to know how and why they both work.

If someone wants to grasp the concepts of threading and multithreading, it is to the person's advantage to have an understanding of how a computer works and more precisely, how the Central Processing Unit (CPU) works. With that being said, the ideas of threading and multithreading will be clear soon.

Introduction

In today's computer literate society, Microsoft's Windows program comes to mind in the majority of novices when discussing a computer's operating system. But when discussing the concepts of threading and multithreading, fewer ideas pop into the heads of those novice computer users. Back in July of 1997, when Macintosh was releasing it's latest version of its Apple operating system, OS 8, some hyped Apple users read this in the Washington Times. "More important for users, OS 8 has at its core a multithreaded Finder, which allows you to multitask more easily. You can copy a file - or a disk full of files - in the background while working on other tasks. That is what multithreading allows you to do, and that's what you'll find in OS 8." (Kellner)

To begin the journey into threading, one must have a grasp of what an operating system is and what its functions are. An operating system is technically software that controls the operations of a computer and literally directs the processing of programs by assigning storage space in the memory of the central processing unit and also controlling the input and output functions. The key term here is 'assigning storage space.' Threading and multithreading are concepts that are an important part of how an operating system assigns storage space.

Many people are tricked into thinking that because of the naming convention, the concept of multithreading is a derivative of threading or simply 'threading doubled.' The two concepts are somewhat different and this report will attempt to explain those concepts and differences in easy to follow terms. A brief history of threading, multithreading and the respective backgrounds shall be covered followed with more detail of where and when to use each idea. Next, a general overview of how each of the concepts works will be discussed and then will provide specific details of the ideas with some comparison notes between the two. The report will close out with some detailed performance metrics related to multithreading and insight into the future of the concepts, specifically superthreading and hyperthreading.

History

Early on in computing, programming was all geared around the single threading concept. Programs were entered or introduced to the CPU through punch cards, tape, or keyboard and the single task operations of the mainframe or early PC's occurred. The concept of time sharing came along as more businesses saw the potential of computing and the idea of sharing the CPU efficiently and fairly became more important. The concept of multiple threads of execution therefore was derived from time sharing systems. Today, as mainframes and desktops become more and more powerful, operating systems were developed to increase the CPU' efficiency by having the operating system literally 'slicing' time up so that programs can run smoothly. Time slicing or, pre-emptive multitasking was created to assist the operating system to be fair for the multiple users on any one system.

Thread

Providing insight into how a CPU or microprocessor works is an excellent place to begin when attempting to discuss the concept of a thread. The microprocessor or CPU simply executes a series of machine instructions by telling the processor which instruction came first and storing the other instructions until it is their turn to execute. So, whether a computer is playing music, a game or spell checking a document, simple digital logic techniques allow a computer to do its work. No matter how sophisticated the request is, the microprocessor can only do three basic activities which are:

The CPU can perform mathematical operations: addition, subtraction, multiplication and division.

CPU can move data from one location to another.

CPU can make decisions and jump to a new set of instructions based on those decisions.

With that being said the idea of number two and three above give insight into the concept of threading. A thread is a placeholder for a stored instruction in the microprocessor. I recall reading once that a thread is a programming tool that models concurrency. From a computer program's point-of-view, a thread is the information needed to serve one individual user or a particular service request. If multiple users are using a single program or a request from a different program comes in simultaneously, a thread would therefore be created by the operating system and maintained for each request that came in. The operating system can then easily remember which task came in first and which task needs to go next and so on. So a thread is simply a way for the operating system to keep track of the requests or tasks coming in. The operating system can put in or hold back a thread according to the timing and any demands from other tasks.

The terms task and thread need clarification because they are similar, however, they are not completely synonymous. Most computers can only operate one task at a time but because of the overall speed of the computer, to the user it would seem that multiple tasks are occurring all at once. When a program is started, for example Excel, the operating system gives it a turn. Running Excel is actually many tasks that run in a certain order that makes the spreadsheet for you and I. The operating system runs or executes these tasks in the proper sequence or Microsoft would not be the wealthy conglomerate that it has become. If the user then started MSWord while Excel was running, the series of tasks associated with Word would be properly sequenced and executed, but the operating system would have to take into consideration that two programs with tasks are now running. If the user printed a worksheet, the operating system would have to make the proper input/output (I/O) device available, in this case a printer. The key to remember is that the operating system is limited to one thing at a time. While waiting for the printer to say I am ready, the Operating system assigns the chore of getting the printer a thread. This thread points to all of the relevant data such as which program requested the I/O, what the I/O is and in what order the request came compared to the other tasks and threads in the operating system's memory. When the I/O, or printer for this example, is ready, the operating system can interpret the thread and know to what task the request came and wha 'la, we have a printed spreadsheet. Of course this was overly simplified for the purpose of explanation, but in a nut shell, a thread is how an operating system can tell how to sequence its tasks and other threads.

Multithreading

In a nutshell, multithreading is a technique used by either an operating system or another program that enables the operator to do multiple actions within the same application simultaneously. New operating system technology has been created that would allow programs such as MSWord, which has been written and compiled to run in a certain sequence, to be run out of sequence yet the results still comes out correctly…[continue]

Cite This Term Paper:

"Single Threading And Multithreading" (2003, December 13) Retrieved December 4, 2016, from http://www.paperdue.com/essay/single-threading-and-multithreading-162705

"Single Threading And Multithreading" 13 December 2003. Web.4 December. 2016. <http://www.paperdue.com/essay/single-threading-and-multithreading-162705>

"Single Threading And Multithreading", 13 December 2003, Accessed.4 December. 2016, http://www.paperdue.com/essay/single-threading-and-multithreading-162705

Other Documents Pertaining To This Topic

  • Thread Models

    Mx1, 1x1 and MxN, each having its own advantages and disadvantages. Although Mx1 is commonly acknowledge as an inferior model, there's plenty of debate about the merits of 1x1 versus MxN. Lately, the trend has been for several operating systems such as Solaris and Linux to move from a MxN model to the 1x1 model. This paper compares the pros and cons of each thread model and explores reasons

  • Resource Ownership Namely a Process That Includes

    resource ownership, namely a process that includes a virtual address space to hold the process image. The process is the key to the system. Each process is constantly in one of three stages: Ready, Running, or Blocked. The operating system keeps track of its state and manages its movement amongst the various states. It is in charge of operating, managing, and terminating the various processes as well as seeing

  • Windows XP to Windows 7

    This will not only create a higher level of trust in the actual implementation, it will also set the foundation for more effective ongoing support for these users if they have any problems with the systems once they are installed. An effective change management strategy is as important, if not more important, than the technology upgrade and implementation plan itself (Gil, Tether, 2011). In implementing any it Project the concept

  • UNIX vs Windows Operating System

    The Windows operating system architecture also allows for single sign-on and also relies on user name and password verification. The authentication process for a Windows operating system at the server level can also be configured to validate the identity of the person logging in at the Windows domain and Microsoft Active Directory Service levels as well. Certificates can be assigned to specific applications, databases and processes within a Windows sever-based

  • Computer Technology Assessing the Evolution

    The real-time integration to memory management that would lead to rapid advanced in superscalar memory management made possible with RISC-based microprocessors and memory however continued to be driven by IBM and their partners working in conjunction with each other on new developments (Biswas, Carley, Simpson, Middha, Barua, 2006). Implications of RISC Development on Memory Management Advances Over the first twenty five years of RISC processor and memory development the key lessons

  • Information Technology Refuting the Claims

    Linux Kernel Analysis Much has been written in praise of the Linux (Crandall, Wu, Chong, 359), (Parnas, 112), (Baliga, Iftode, Chen, 323), and its use of preemptive multitasking memory architectures to manage process control, file management, device management, information maintenance and communications subsystems securely and effectively. The Linux modular design, lack of reliance on Remote Procedure Calls (RPC), and use of UNIX-based system administration all are often cited as factors in how

  • System Security Every Organization Which

    Attacks on the system security include password theft, back doors and bugs, social engineering, protocol failures, authentication failures, Denial of Service attacks, active attacks, botnets, exponential attacks including worms and viruses, and information leakage. (Fortify Software Inc., 2008); (Fortify Software, n. d.) Servers are targets of security attacks due to the fact that servers contain valuable data and services. For instance, if a server contains personal information about employees, it


Read Full Term Paper
Copyright 2016 . All Rights Reserved