Talk:COMP 3000 Essay 1 2010 Question 8

From Soma-notes
Jump to navigation Jump to search

Group 8

GROUP NAMES:


Niravkumar Patel (Npatel1)

Trevor Malone (Tmalone)

Mark Walts (Rift)

John Vanden Heuvel (jvheuvel)

Jeff Francom (Afranco2)


Question clarification

To answer this question properly you need to discuss where pthreads came from. The UNIX process model came out in the early 1970's, pthreads was only really proposed in the late 1980's. That's 10-15 years of history, what was happening? What about the general development of threads in CS? Alternative pthread implementations (who had the first one? what was the first kernel-based one?). I know that the history of pthreads on linux is kind of complicated - see the NPTL. You don't need to talk about all of this - but you do need to go beyond just what happened with the pthread standard. --Anil


Thank you prof. Anil, we'll look into those questions in depth and edit our essay. --Npatel1


- UNIX was born in 1969

- Began on a PDP-11/20 machine with a text formatting program called roff and a text editor

- Was rewritten in C in 1972 -> brought forth more portable software

- Became available to Universities and commercial firms as well as the US Government

- Many editions of UNIX came out, by 1975 Versions 4, 5, and 6 were released

- The new versions added the concept of pipes -> led to more modular code-base and faster development cycle

- Pipeline is a chain of processes together by streams, so that the output of one process is the input of the next

- Became more and more portable

- In 1979, UNIX Version 7 was released

- Several more Versions 8, 9, and 10 released the in 80's


- Early UNIX had a 'process', which was essentially a thread of control, with a virtual address space

- Interacted through pipes because they could not share

- After a while, UNIX wanted processes that shared memory, bringing the invention of the thread

- Also called lightweight in contrast to the heavyweight processes before it

- This is dated around the late 1970's and the early 80's, and example is the microkernel


- Alternative Pthread implementation in the 4.0 Digital UNIX, known as DEC OSF/1 - It was a part of the Mach OS

- Pthread library schedules threads at a one-to-one relationship, all threads fight other threads, not threads of the same process.

- Good for priority, if priority is increased, so is the function of the specific process

- Doesn't limit a program to a single executing thread, many threads in a program can run on different CPU's


- NPTL (Native POSIX Thread Library) is software that enables the Linux kernel to run programs using POSIX threads efficiently

- Has become a part of the Linux kernel since Version 2.6 (Version 1 began around 1996)

- Was a massive improvement from LinuxThreads, which had no real support for threads

- NPTL was first released in Red Hat Linux 9

- Threads are still created with clone() system call and futex primitive is used to implement locking


http://en.wikipedia.org/wiki/Pipeline_%28Unix%29

http://en.wikipedia.org/wiki/Unix#1970s

http://books.google.ca/books?id=EZfElJsWCqgC&pg=PA198&lpg=PA198&dq=kernel+based+pthreads&source=bl&ots=3HFKw_0nqq&sig=P0L9feIb88xJRzQfLd7maKtVnTU&hl=en&ei=Oky3TM-_OaO0nAf1-YiwCA&sa=X&oi=book_result&ct=result&resnum=6&ved=0CCsQ6AEwBQ#v=onepage&q=kernel%20based%20pthreads&f=false

http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library

http://www.faqs.org/faqs/os-research/part1/section-10.html

- Tmalone


That's great! Nice work Trevor, I'll get started on the paragraph that answers Prof's questions with the help of your notes. Hopefully have it done before 12! So you guys can check the essay again. (also if anyone wishes to give me a hand in with this portion of the essay, please do so under "Unsorted").


Hey, Rift...upon finishing the prof's requirement, can you please add footnotes? I'm unaware of how it's done. Thanks.

--Npatel1


yea i can add the footnote/reference stuff to the paragraphs you post. Rift 21:55, 14 October 2010 (UTC)


thanks Mark, I'll hopefully have the requirements done by 12ish. --Npatel1


Posted the Final-Final version! lol that prof. was interested in...Rift please take care of footnote/reference editing! thanks alot --Npatel1

Fixed a few things i noticed while reading/looking it over. i got the footnotes in and numbered right.. But theres 9/10 link that isnt working.. i tried to find the information by going through all the other links but couldnt find anything that referenced it... I dont really want to leave it with no reference at all for the information.. so its just the link for those. Rift 04:40, 15 October 2010 (UTC)

Thanks Rift -Npatel

Unsorted

(unsorted essay)


-Npatel1 ; here is the first paragraph. you can edit/add more to the paragraph if needed!


-Afranco2; I put in the history section/strung in tmalone's stuff as well. Again, feel free to edit/add content


-Tmalone; Edited and corrected the information thus far. I will post a conclusion sometime tomorrow.


-Npatel1 ; Trevor, last lines should get us started on the conclusion. Afranco2; i went to class today and prof. was talking about plagiarism, can you please check your paragraph and see if there is any signs of plagiarism. since i don't know where you gathered your information from. upon you completion please post on wiki; need to make some modification to the body paragraph.

-http://delivery.acm.org/10.1145/220000/210315/p11-walli.pdf?key1=210315&key2=6626986821&coll=GUIDE&dl=GUIDE&CFID=108396689&CFTOKEN=35895091 That is one of the sources which I used for my information. I don't believe that I am plagiarizing, but I know that it is easy to do accidentally. If somebody wants to check it over for me to make sure, that would be great. My information comes from the first and second page. I also used POSIX Threads and the Linux Kernel and a little bit from IEEE POSIX Testing Policy General Information


-Npatel1 ; oh i just wanted to make sure since the prof. emphasized on it a lot last class! thanks Afranco2.



POSIX (Portable Operating System Interface) threads, are high performance threads mainly distributed in UNIX but also to some Microsoft Windows OSes. Threads are used in parallel programming; when a system call executes, the thread runs on an independent stream to finish its task with minimal interruptions or slowdowns. Pthreads (from POSIX threads) are ideal for massive modifications to programs because the threads share one single memory space to alter a data structure, allowing constant high performance and efficiency. Pthreads have become a commonly used way of adding concurrency to an application. They are widely used in UNIX; a powerful operating system written in the C language, which is continuously enhanced. Developers came across various obstacles with POSIX threads; during the beginnings of Pthreads, many technical issues had surfaced which were resolved throughout the history of POSIX threads.

The history of POSIX Threads is that many hardware sellers executed their own versions of threads. These developments differed from one another, creating difficulties for programmers to implement portable thread applications. UNIX traditionally had a system running only a single thread under a process. These processes could not share memory and interacted using 'pipes'. Once developers started wanting to be able to run multiple threads under one process, IEEE began to form together the POSIX standards. In 1988 POSIX.1 (created to support application portability) was ratified and was accepted as the international standard in 1990. From there the POSIX standards grew to more than 20 individual standards, encapsulating a large area of different groups.

POSIX.1 lays out the interfaces for OS services; their syntax, and how they should act. It however does not define how the interface should be implemented on the OS. This is made to allow many different operating systems to conform to standards in their own specific design and application. POSIX.2 was created for much the same reason as POSIX.1 (portable shell programming, portable program development) but describes a programmable shell and its common utilities.




POSIX threading has always been an issue on Linux. UNIX was so late to implement support for multithreaded process because it does not map that well onto Linux; this is due to the significant differences in relationship between POSIX and UNIX.

^^^ this statement sounds a bit off. why does UNIX care what Linux can handle? - John v.


I'll look into that tomorrow; working on 3005 Assignment. John, if you have a suggestion or an add-on that you wish to provide, please do so under collaboration.

-Npatel1


Hey guys, before end of tomorrow if there is anything missing or if anyone wishes to contribute more towards the essay please do so asap.

-Npatel1


UNIX cares about what Linux can handle because POSIX threads are mainly used in Linux systems. It is a very big deal if a certain type of thread is generating countless errors on the main system type the thread is created for. And regardless of just the fact that its widely used on Linux, UNIX would care because compatibility is one of the most important things to have. For a POSIX thread to not be compatible with Linux just because UNIX didn't care, then the progress of multi-threading and POSIX threads would not be able to be used in Linux. Then Linux would not be as widely used as it would not be enhanced like other systems. It is important for systems to have that compatibility, so that they don't end up left in the dust of technology.

-Tmalone


One of the major reasons why UNIX was so late to implement support for the POSIX threads is the way the two define "multi-threaded" process. Traditionally UNIX defined a process to be an instance of a running program.With POSIX this came to be defined more precisely. The 'process' was defined to be "an address-space and a group of resources dedicated to running the program".
POSIX defines a 'thread' as the resources neccessary for a single thread of execution ie. a single execution path. Thus according to POSIX the basic unit of execution is a thread. On the other hand UNIX traditionally defined a 'task' as the basic unit of execution which is essentially same as the POSIX definition of a 'process'.
Now the conflict between the POSIX Threads and UNIX implementation of tasks came when a task used a clone() system call to create another task in order to implement multi-threading. The program then becomes a co-operating set of tasks which share 'some' resources. It is due to this halfway implementation of sharing of resources that lies the major conflict.
In a nutshell the fundamental difference between the two is that in POSIX a process can be addressed as a single entity, while in Linux it is a collection of independent tasks. In the POSIX thread implementation all actions affect the entire process. In Linux, however, each of these actions will only affect one task.

Not from your group. But I think your essay should incorporate this too. --Gautam 19:35, 14 October 2010 (UTC)

Appreciate your contribution towards the essay even though your not in our group; if its possible, can you please give us the link to which you got the information from. --Npatel1

I already have mentioned the paper before hand. It is about the "Native Posix Threads". See your Discussion tab.

Collaboration

Hey guys, i'm just gunna get this started by posting a few links for everyone to get going. This will help explain a general idea of what they are and the history of them. Please add some more links or anything else you think would be helpful!

http://en.wikipedia.org/wiki/POSIX_Threads https://computing.llnl.gov/tutorials/pthreads/ http://sourceware.org/pthreads-win32/

-tmalone

I found this, might not help, but it might:--Rannath 02:09, 6 October 2010 (UTC)

I'm not sure about the rest of you, but most of what I am able to find has to do with information on things that fall under POSIX, not actually about POSIX-afranco2

POSIX Threads, or pthreads, is a thread that is commonly used in UNIX systems but it also seen in some Microsoft Windows systems. A thread is a unit of process that executes segments of code within applications. When a process gets called from the system, the thread will execute the code for the process. POSIX stands for Portable Operating System Interface (for UNIX) and has been used by many independent sellers of hardware. There has always been issues such that developers could not create a reliable protable pthread application. For the use of multi-threading, its implementation arrived fairly late because the systems could not support it. Data mapping onto Linux gave birth to several problems due to the fact that POSIX and UNIX were implemented so differently.

-tmalone

http://www.faqs.org/faqs/os-research/part1/section-10.html

Might be of some use as well --Lmundt 14:48, 7 October 2010 (UTC) https://computing.llnl.gov/tutorials/pthreads/


Edited version from what -tmalone has written.

POSIX Threads is also called pthreads. Portable Operating System interface; mainly for Unix but it’s also distributed to some Microsoft Windows OS. A Thread is a unit of process that resides inside a process and executes when a system call has been executed. Threads have same global and all the threads share memory, threads also contain their personal private data. Pthread has become commonly used a way of adding concurrency to an application. The history of POSIX Threads is that many hardware sellers executed their own versions of threads. These developments differed from one another, creating difficulties for programmers to implement portable thread applications. POSIX threading has always been an issue on Linux. UNIX was so late to implement support for multithreaded process because it does not map that well onto linux; this is due to the significant differences in relationship between POSIX and UNIX.

-Npatel1

A bit different of a explanation of the history of threads in Unix:

Originally in UNIX things similar to threads existed, they were however, called processes. The “processes” shared memory and used semaphores and thus “threads” have been around from the start. However, they disappeared when UNIX took the multics definition of process to mean they should not share memory, and all of sudden the ability to have threads disappeared. As people clamored to have the good old processes back, they created a new thing called “threads” that was actually what they had previously. So while it seemed they were late to support multithreaded processes, in reality they merely had a brief period where they didn’t have multi-threadedness.

-Rift 23:42, 10 October 2010 (UTC)

Here is a possible simple conclusion I've typed up. I used the first chunk of Rifts paragraph then just threw in some extra info. Go easy on me lol

Originally in UNIX things similar to threads existed, they were however, called processes. The “processes” shared memory and used semaphores and thus “threads” have been around from the start. However, they disappeared when UNIX took the multics definition of process to mean they should not share memory, and all of sudden the ability to have threads disappeared. What are now considered POSIX threads have just been aliased for many years. The late implementation of these threads was because of the fact that so many developers had the basic principle of a POSIX thread in use, it was simply under a different name with minor structural differences. It is quite evident how POSIX threads came to be over the years especially within the UNIX system. From the basic performance and function of a standard thread to the multi-threading abilities of the POSIX thread, the development became more and more concrete. Though problems arose, such as creating portable thread applications between developers, solutions were found. POSIX.1 and POSIX.2 were created to display interfaces with specific syntax and to describe programming shells for many operating systems. Given the last 20 years when the leap was taken between a standard thread and a POSIX thread, and the speed in which the POSIX thread has been implemented, it can be said that given another 20 years the POSIX thread will have turned into something even more worth the wait.

Okay guys this is a conclusion I've typed up. I have absolutely no idea if this is good enough, I find it pretty tough to write conclusions. Nonetheless, feel free to make changes and add/delete whatever you want. I'm not sure how formal he wants it to be, but I hope this is at least decent. If you want me to make some changes let me know what to change and I'll do it asap.

(I constantly make changes myself :p)

- Tmalone


Discussion


POSIX Threads and the Linux Kernel --Gautam 23:52, 5 October 2010 (UTC)

Not from your group. However I found a webpage which you might find useful. The New Implementation of Threads for Linux --Gautam 22:56, 5 October 2010 (UTC)


Not extremely helpful but: A short history of unix Rift 18:30, 7 October 2010 (UTC)


http://standards.ieee.org/regauth/posix/POSIX-A.FM5.pdf IEEE POSIX Testing Policy General Information The POSIX family of standards, Stephen R. Walli -afranco2

I'm not sure how we are planning on structuring this essay, but I will just write a bit on the history of Posix part for now. Does somebody want to handle writing an intro? - afranco2


Hey guys, sorry for the late reply... i just wanted everyone to finish their assignment portion. we would have our own set of explanation for question 8.

AFRANCO2; Here is a suggestion.

1st paragraph; should consist defining UNIX and POSIX/Threads

2nd paragrah; consisting the history behind POSIX and why UNIX was so late to implement the support of multithreaded processes.

3rd paragraph; should conclude it all.

I agree, but I don't think that we should limit it to specifically 'paragraphs' but rather sections. -afranco2

Here is a site that would take care of paragraph 1: https://computing.llnl.gov/tutorials/pthreads/

GAUTHAM provided us with very useful pdf. that talks about the history of POSIX.

-Npatel1


This may be a stupid question, buy does anybody know what we have to do for citation? Are we using footnotes like a regular wiki? Or is there another conformation we need to follow? -afranco2

                --footnotes are probably easiest, John v.

I'll take care of the first paragraph if you guys are comfortable with the structure of the essay (post it by the end of today). since we already have AFRANCO2 who did the history portion of the essay.

I made a new tab for "ESSAY" final copy*

-Npatel1


I'm not sure about the citations; just keep the links you used to gather the information, we'll ask him on Tuesday. (i was just wondering, is this is the kind of structure you were looking for? or should we change the structure?)

-Npatel1


So what all do we need left? Sorry I am out of town trying to keep up as much as possible. Ive posted my research content on the primary page. And I've noticed we are getting pretty organized with our essay format. Just as an update process what has been completed and what is left to do? Because i don't wanna type up a bunch of information we may not need anymore. So Whatever else we need I can type up with all our info and then we can out the together the essay in the next couple days.

- Tmalone

And I think the structure is a good idea. We have enough information to turn it all into a good essay. If you have another suggestion on the structure though by all means tell us what you think.

- Tmalone

sounds good! I'm sorry i was unable to post the Intro today... I'll make sure to have it by tomorrow!


Tmalone, i think we have good portion for History; i will get us started with a good intro then link in the history as our second paragraph which afranco2 has provided. then we'll talk about why UNIX was soo late; finally conclude it all with a last paragraph.

-Npatel1


Alright, I'll get started on a possible conclusion format. Then we can post it all and edit and add/delete whatever we want. So then hopefully by Tuesdays class we will have a good make-up of the essay we want.

- Tmalone

I read the current essay format posted. It was really well done good job guys. I read over it and corrected some minor grammar errors. So by sometime tomorrow I'll have a possible conclusion paragraph posted. If anyone else wants to type anything up for a conclusion they can feel free to as well! The more the better.

- Tmalone


It's looking good. Sorry if i'm a bit late to the party. I threw a paragraph down in the answer part. I know it doesn't really fit well.. but it really nees to get worked in.. -Rift


little late here too, got sidetracked with 3004 and 3008. I do have a concern in that 3 paragraphs really isn't an essay, he seemed to want more than that JOhn v.


anyone remember what was cited where in the essay? we're still missing references -- John


yeah, Tmalone decided that he was going to do the citation suitable to the essay. Feel free to help; upon finishing, we'll post it on the "page". Nothing fancy, Prof. Anil mentioned that he just wanted the basic format. John, the information that was cited is in discussion and also in collaboration. -


I cited a few things and added a small paragraph. It's really hard to find things/events relating to it.. Rift 15:12, 14 October 2010 (UTC)


Hey guys I created the citations for all of our resources, Its all posted in the references tab on the main page. If i missed something feel gfree to add it using the same format as I did, im pretty sure i covered it all though

- Tmalone

Sources

Everyone please post any extra links here; we'll organize it after everyone posts their links.

posted the ones that are provided on our discussion.

-Npatel1

http://www.unix.org/whitepapers/shdiffs.html

http://en.wikipedia.org/wiki/POSIX_Threads


http://sourceware.org/pthreads-win32/


https://computing.llnl.gov/tutorials/pthreads/


http://www.kernel.org/doc/ols/2002/ols2002-pages-330-337.pdf


http://www.drdobbs.com/open-source/184406204;jsessionid=GKSVKT3EOMUBDQE1GHRSKHWATMY32JVN


http://standards.ieee.org/regauth/posix/POSIX-A.FM5.pdf


http://delivery.acm.org/10.1145/220000/210315/p11-walli.pdf?key1=210315&key2=6626986821&coll=GUIDE&dl=GUIDE&CFID=108396689&CFTOKEN=35895091

Journal article "Achieving Efficiency and Portability in Systems Software: A Case Study on POSIX-Compliant Multithreaded Programs" http://dx.doi.org.proxy.library.carleton.ca/10.1109/TSE.2005.98