Answered Essay: consider Unix, Linux, MacOS, Android and Windows operating systems. Consider the primary application of each in the marketplace.

consider Unix, Linux, MacOS, Android and Windows operating systems. Consider the primary application of each in the marketplace. How does each OS implement threads? How does the usage of threads impact application (usage) ?

Expert Answer

 

Implementation of threads in different operating systems are shown below:

In Unix:

  • The implementation of threads in Unix depend on the kernel (supported by kernel or not).
  • If they are not supported by the kernel, then they are implemented in the user-space library.
  • And if they are supported by the kernel then the kernel will do some work.
  • The maintenance of correct thread depends on the implementation of the correct traditional UNIX semantics.

In Linux:

  • The threads in Linux are considering to be the tasks not as a thread.
  • The clone () system call is used to create the threads.
  • With the help of the system call, the address space is shared by the child to the parent.

The controlling behavior of flag is shown below:

Flag Meaning
CLONE_FS Sharing of the information of the file-system.
CLONE_VM This flag is for the sharing of the memory space.
CLONE_SIGHAND This flag is to share the signal handlers.
CLONE_FILES This means the sharing of the opened files.

The process data structure is pointed by the struct task_struct.

In MacOS:

The thread of MacOS is represented as shown below:

  • The fundamental support to the thread is done by Mach, which is a part of the Mac threads.
  • They are implemented to run the threads preemptively or symmetrically.
  • The Mach thread maintain the threads of itself to perform them preemptively.
  • In the case of the multiprocessing which is symmetric in nature, the kernel schedules the threads concurrently. One thread on a single processor.
  • The API for client is implemented in System Framework.

In Android:

  • In android whenever an application starts, and there is no other process running, then android system begins a new Linux process within the execution of the single thread.
  • By default, all the components under that process begin the execution within the same process and with the thread. This thread is known as “main” thread.
  • To perform the asynchronous process, android support the thread class.
  • Also, it uses the ThreadPools and the Executor class.
  • For the background, the java.util.concurrent package is used.

In Windows:

  • The windows implement the APIs.
  • Each thread consists of the thread id, set of the registers that represent the state of the processor.
  • To run the threads, separate kernels and the stack of the kernels are used to run them in user and the kernel mode.
  • Run-time libraries and the dynamic link libraries use the data storage area which is private.
  • The context of thread is set of the registers, stacks and the private storage area.

The data structure of the Windows Thread consists of the following:

ETHREAD: This refers to executive thread block, this includes the pointer which is used to process in which the threads belong and to the KTHREAD in the kernel space.

KTHREAD: This refers to the kernel thread block, that includes the information of the scheduling and synchronization, kernel mode stack, a pointer to the TEB in the kernel space.

TEB: This refers to thread environment block which consists of the thread id, user mode stack, thread local storage in the user space.

The impact of threads in application is described below:

  • Threads improve the performance of the CPUs by providing them the capabilities of multithreading, parallel processing etc.
  • The CPU becomes more powerful for processing by using the above capabilities.
  • The developers take the advantage of these capabilities for multiple CPUs.
Buy Essay
Calculate your paper price
Pages (550 words)
Approximate price: -

Help Me Write My Essay - Reasons:

Best Online Essay Writing Service

We strive to give our customers the best online essay writing experience. We Make sure essays are submitted on time and all the instructions are followed.

Our Writers are Experienced and Professional

Our essay writing service is founded on professional writers who are on stand by to help you any time.

Free Revision Fo all Essays

Sometimes you may require our writers to add on a point to make your essay as customised as possible, we will give you unlimited times to do this. And we will do it for free.

Timely Essay(s)

We understand the frustrations that comes with late essays and our writers are extra careful to not violate this term. Our support team is always engauging our writers to help you have your essay ahead of time.

Customised Essays &100% Confidential

Our Online writing Service has zero torelance for plagiarised papers. We have plagiarism checking tool that generate plagiarism reports just to make sure you are satisfied.

24/7 Customer Support

Our agents are ready to help you around the clock. Please feel free to reach out and enquire about anything.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

HOW OUR ONLINE ESSAY WRITING SERVICE WORKS

Let us write that nagging essay.

STEP 1

Submit Your Essay/Homework Instructions

By clicking on the "PLACE ORDER" button, tell us your requires. Be precise for an accurate customised essay. You may also upload any reading materials where applicable.

STEP 2

Pick A & Writer

Our ordering form will provide you with a list of writers and their feedbacks. At step 2, its time select a writer. Our online agents are on stand by to help you just in case.

STEP 3

Editing (OUR PART)

At this stage, our editor will go through your essay and make sure your writer did meet all the instructions.

STEP 4

Receive your Paper

After Editing, your paper will be sent to you via email.