<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hirving</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hirving"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Hirving"/>
	<updated>2026-05-01T16:32:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5637</id>
		<title>COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5637"/>
		<updated>2010-11-27T19:14:19Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Accountable Virtual Machines ==&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect &#039;&#039;&#039;integrity violations&#039;&#039;&#039; can be separated into different categories of operations. The first would be &#039;&#039;&#039;Cheat Detection&#039;&#039;&#039;, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability&#039;&#039;&#039; is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an &#039;&#039;&#039;AVM&#039;&#039;&#039;. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is &#039;&#039;&#039;remote fault detection&#039;&#039;&#039; in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for &#039;&#039;&#039;deterministic replay&#039;&#039;&#039;. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1[[#References |[9]]], the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, retransmitted if needed.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a hash function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to a tamper-evident log&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, and the exact timing of input must be recorded so the inputs can be  injected at the same moment during the replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and additional registers. Not all inputs have to be recorded this way (software interrupts) because they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallels streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM) and it can update the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to have failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with, the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VMM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To perform a audit, the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then checks the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavailable to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of the machine&#039;s faults.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence against the machine.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
=References=&lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[9] VMWare Workstation 6.5.1 web site. http://www.vmware.com/products/workstation/&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5636</id>
		<title>COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5636"/>
		<updated>2010-11-27T19:12:58Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Accountable Virtual Machines ==&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect &#039;&#039;&#039;integrity violations&#039;&#039;&#039; can be separated into different categories of operations. The first would be &#039;&#039;&#039;Cheat Detection&#039;&#039;&#039;, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability&#039;&#039;&#039; is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an &#039;&#039;&#039;AVM&#039;&#039;&#039;. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is &#039;&#039;&#039;remote fault detection&#039;&#039;&#039; in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for &#039;&#039;&#039;deterministic replay&#039;&#039;&#039;. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1[[#References |[9]]], the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, retransmitted if needed.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a hash function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to a tamper-evident log&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, and the exact timing of input must be recorded so the inputs can be  injected at the same moment during the replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and additional registers. Not all inputs have to be recorded this way (software interrupts) because they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallels streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM) and it can update the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to have failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with, the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VMM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To perform a audit, the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then checks the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavailable to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of the machine&#039;s faults.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence against the machine.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
=References=&lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5529</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5529"/>
		<updated>2010-11-24T19:44:32Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1[[#References |[9]]], the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
Why is it better?&lt;br /&gt;
[To Do]&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[9] VMWare Workstation 6.5.1 web site. http://www.vmware.com/products/workstation/&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- Just added my contribution section, can someone proof read and sign it before I move it over to the essay. I didn&#039;t do the &amp;quot;why is it better&amp;quot; part because I found the implementation took a lot of writing. For anyone that wants to do the other part, I&#039;d suggest comparing AVMs to PunkBuster and/or VAC, and a cloud computing service (focusing on the auditing). Cheers --[[User:Hirving|Hirving]] 19:44, 24 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5528</id>
		<title>COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_4&amp;diff=5528"/>
		<updated>2010-11-24T19:37:18Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Accountable Virtual Machines ==&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect &#039;&#039;&#039;integrity violations&#039;&#039;&#039; can be separated into different categories of operations. The first would be &#039;&#039;&#039;Cheat Detection&#039;&#039;&#039;, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability&#039;&#039;&#039; is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an &#039;&#039;&#039;AVM&#039;&#039;&#039;. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is &#039;&#039;&#039;remote fault detection&#039;&#039;&#039; in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for &#039;&#039;&#039;deterministic replay&#039;&#039;&#039;. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
=Critique=&lt;br /&gt;
=References=&lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5527</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5527"/>
		<updated>2010-11-24T19:34:11Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1[[#References |[9]]], the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
Why is it better?&lt;br /&gt;
[To Do]&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[9] VMWare Workstation 6.5.1 web site. http://www.vmware.com/products/workstation/&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5526</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5526"/>
		<updated>2010-11-24T19:32:55Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1[[#References |[9]]], the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[9] VMWare Workstation 6.5.1 web site. http://www.vmware.com/products/workstation/&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5525</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5525"/>
		<updated>2010-11-24T19:31:49Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1, the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[9] VMWare Workstation 6.5.1 web site. http://www.vmware.com/products/workstation/&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5524</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5524"/>
		<updated>2010-11-24T19:28:43Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1, the temper-evident log was adapted from code in PeerReview[[#References |[7]]], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5523</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5523"/>
		<updated>2010-11-24T19:27:07Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Contribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine (AVM), that was proposed in this essay, most useful contribution was the implementation of the accountable virtual machine monitor (AVMM). It is what allows for the fault checking of virtual machines in a cloud computing environment. The AVMM can be broken down into different parts: the virtual machine monitor (VMM), the temper-evident log, and auditing mechanisms.  The VMM is based off the VMM found in VMWare Workstation 6.5.1, the temper-evident log was adapted from code in PeerReview[], and the audit tools were built up from scratch. &lt;br /&gt;
&lt;br /&gt;
The accountable virtual machine monitor relies on four assumptions:&lt;br /&gt;
&lt;br /&gt;
1. All transmitted messages are received, if retransmitted sufficiently often.&lt;br /&gt;
&lt;br /&gt;
2. Machines and Users have access to a has function that is pre-image resistant, second pre-image resistant, and collision resistant.&lt;br /&gt;
&lt;br /&gt;
3. All parties have a certified keypair, that can be used to sign messages.&lt;br /&gt;
&lt;br /&gt;
4. To audit a log, the user has a reference copy of the VM used.&lt;br /&gt;
The job of the AVMM is to record all incoming and outgoing messages to tamper-evident log.&lt;br /&gt;
and enough info of the execution to enable deterministic replay. &lt;br /&gt;
&lt;br /&gt;
The AVMM must record nondeterministic inputs (such as hardware interrupts), because the input is asynchronous, the exact timing of input must be recorded, so that the inputs can be  injected at the same points during replay. Wall-clock time is not accurate enough for this recording, so the AVMM must use a combination of instruction pointer, branch counter, and, possibly, additional registers. Not all inputs have to be recorded this way (software interrupts), because, they send requests to the AVM, which will be issued again during replay.     &lt;br /&gt;
&lt;br /&gt;
Two parallel streams appear in the tamper-evident log: message exchanges and nondeterministic inputs. &lt;br /&gt;
It is important for the AVMM to detect inconsistencies between the user&#039;s log and the machine&#039;s log (in case of foul play), so the AVMM simply cross-references messages and inputs during replay, thus, easily detecting any discrepancies.&lt;br /&gt;
&lt;br /&gt;
The AVMM periodically takes snapshots of the AVM&#039;s current state, this facilitates fine-grain audits for the user, but it also increases overhead. The overhead is lowered slightly by the snapshots being incremental (only save the state that has been changed since the last snapshot). The user can authenticate the snapshot using a hash tree of the state (generated by the AVMM), the  AVMM updates the hash tree after each snapshot.  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tamper-Evident Log&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The log is made up of hash code entries.&lt;br /&gt;
Each log entry in form e = (s,t,c,h)&lt;br /&gt;
s = monotonically increasing sequence number&lt;br /&gt;
t = type&lt;br /&gt;
c = data of the type&lt;br /&gt;
h = hash value&lt;br /&gt;
&lt;br /&gt;
The hash value is calculated by: h = H(hi-1 || s || t || H(c))&lt;br /&gt;
H() is a hash function.&lt;br /&gt;
|| stands for concatenation&lt;br /&gt;
&lt;br /&gt;
Each message sent gets signed with a private key, when the AVMM logs the messages with the signature attached but removes it before sending it to the AVM.   To ensure nonrepudiation, an authenticator is attached to each outgoing message.&lt;br /&gt;
&lt;br /&gt;
To detect when a message is dropped, each party sends an acknowledgement for each message they receive. If an acknowledgement is not received the message is resent a few times, if the user stops receiving messages, then the machine is presumed to of failed.&lt;br /&gt;
&lt;br /&gt;
To preform a log check, the user retrieves a pair of authenticators, then challenges the machine to produce the log segment between the two. The log is computationally infeasible to edit without breaking the hash chain, thus, if the log has been tampered with the hash chain will be different and the user will notified of the tampering.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Auditing Mechanism&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
From VVM&#039;s perspective all things are deterministic.&lt;br /&gt;
&lt;br /&gt;
To preform a audit the user:&lt;br /&gt;
&lt;br /&gt;
1. obtains a segment of the machine&#039;s log and the authenticators&lt;br /&gt;
&lt;br /&gt;
2. downloads a snapshot of the AVM at the beginning of the segment&lt;br /&gt;
&lt;br /&gt;
3. replays the entire segment, starting from the snapshot, to verify the events in the log are the correct execution of the software.&lt;br /&gt;
&lt;br /&gt;
The user can verify the execution of software through three different methods: Verifying the log, snapshot, and execution.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify a log segment, the user retrieves the authenticators from the machine with the sequence numbers in the range of the log segment. The user then downloads the log segment from the machine, and, starting with the most recent snapshot before the log segment and ending with the most recent snapshot before the end of the log segment. The user then check the authenticators for tampering. If this step proceeds, the user can assume the log segment executed properly. If the machine is faulty, the segment will be unavaible to download or may return a corrupted log segment. This can be used to convince a third party of the fault.&lt;br /&gt;
&lt;br /&gt;
When the user wants to verify the snapshot, the user obtains a snapshot of the AVM&#039;s state at the beginning of the log segment. The user then downloads a snapshot from the machine and the AVMM recomputes the hash tree. The new hash tree is compared to the hash tree contained in the orignal log segment. If any discrepancies are detected, the user can use this to convince a third party of machine&#039;s fault.&lt;br /&gt;
&lt;br /&gt;
In order for the user to verifying the execution of a log segment, the user needs three inputs: the log segment, the snapshot, and the public keys of the machine and any users of the machine. The auditing tool performs two checks on the log segment, a syntactic check (determines if log is well-formed), and a semantic check (determines if the information in the log shows the correct execution of the machine).&lt;br /&gt;
&lt;br /&gt;
The syntactic check checks whether all log entries are in the proper format, the signatures in each message and acknowledgement, if each message was acknowledged, and the sequence of sent and received messages is correct when compared to the sequence of messages that enter and exit the AVM.&lt;br /&gt;
&lt;br /&gt;
The semantic check creates a local VM that will execute the machine&#039;s log segment, the VM is initialized with a snapshot from the machine if possible. The local VM then runs the log segment and the data is recorded. The auditing tool then checks the log segments, inputs, outputs, and verification of snapshot hashes of the replayed execution against the original log. If any discrepancies are detected then the fault is reported and can be used as evidence as fault.&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// first part of my writing; this is just part1 [[User:Sschnei1|Sschnei1]] 00:35, 24 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
For the comprehension of the reader, it is important of a paper/article/essay to have a good overview/layout. The introduction clearly describes what the reader has to expect in the following pages, especially what problems are addressed and how they are solved. &lt;br /&gt;
&lt;br /&gt;
This paper gives multiple examples about advantages and disadvantages in an AVM. A good example is &amp;quot;Cheat Detection&amp;quot;. Cheaters use programs to go around the original game code to gain an major advantage over other players. Since an AVM is generic in cheat detection it has a wider support for detecting cheats than most of the other cheat detection algorithms. The logs give the game the function to replay the game. Thus, players using AVM can see the way other players play by replaying the game with the player&#039;s log.&lt;br /&gt;
&lt;br /&gt;
The negative side is that the player might have to suffer from the AVM. Everything is being logged and stored on the hard drive, which takes a lot amount of space. In the example in the paper it is 148mb per hour after compression. This reduces the fps. Additionally, the connection to the AVM increases the ping time to the server.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-if anyone has information that they are working on they can just post it up and at least others can look at it and maybe build up stuff on it, and I&#039;m sure everyone is aware of the extension that we got also, but let&#039;s try to finish this in the next few days --[[User:Mchou2|Mchou2]] 20:43, 23 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I agree with finishing it in the next few days. Then we have more time to focus on other courses like 3004. I will post something later that night. -- [[User:Sschnei1|Sschnei1]] 21:29, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5477</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=5477"/>
		<updated>2010-11-23T19:55:51Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Discussion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Jean-Benoit Aubin jbaubin@connect.carleton.ca &lt;br /&gt;
&lt;br /&gt;
Pradhan Nishant npradhan npradhan@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only Paul Cox didn&#039;t answer i sent this morning. &lt;br /&gt;
&lt;br /&gt;
Cox     Paul    pcox&lt;br /&gt;
&lt;br /&gt;
And I just sent an email to the teacher. &lt;br /&gt;
&lt;br /&gt;
--Jean-Benoit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
&lt;br /&gt;
 the paper&#039;s title, authors, and their affiliations. Include a link to the paper and any particularly helpful supplementary information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Title:&#039;&#039;&#039; Accountable Virtual Machines&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Authors:&#039;&#039;&#039; Andreas Haeberlen, Paarijaat Aditya, Rodrigo Rodrigues, Peter Druschel&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Affiliates:&#039;&#039;&#039;&lt;br /&gt;
University of Pennsylvania, Max Planck Institute for Software Systems (MPI-SWS)]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Link to Paper:&#039;&#039;&#039; [http://www.usenix.org/events/osdi10/tech/full_papers/Haeberlen.pdf Accountable Virtual Machines]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Supplementary Information:&#039;&#039;&#039; [http://research.microsoft.com/en-us/people/sriram/druschel.pptx Accountable distributed systems and the accountable cloud] - background of similar AVM implementation for distributed systems.&lt;br /&gt;
&lt;br /&gt;
==Background Concepts==&lt;br /&gt;
&lt;br /&gt;
 Explain briefly the background concepts and ideas that your fellow classmates will need to know first in order to understand your assigned paper.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountable Virtual Machine (AVM)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Deterministic Replay&#039;&#039;&#039;: A machine can record its executions into a file so that it can be replayed in order to see the executions and follow what was happening on the machine. Remus [[#References | [1]]] has contributed a highly efficient snap-shotting mechanism for these replays.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Accountability:&#039;&#039;&#039; Accountability in the context of this paper means that every action done on the virtual machine is recorded and will be used against the machine or user to verify the correctness of the application. The AVM is responsible of its action and will answers for its action against an auditor. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Remote Fault Detection:&#039;&#039;&#039; There are programs like GridCop[[#References | [2]]] that can be used to monitor the progress  and execution of a remotely executing program by requesting a beacon packet. When the remote computer is sending the packets, the receiving/logging computer must be a trusted computer (hardware,software, OS) so that the receiving of packets remains consistent. To detect a fault in a remote system, every packet must arrive safely, and any interrupts during the logging must be handled or the inconsistencies will result in an inaccurate outcome. The AVM does not require trusted hardware and can be used over wide-area networks.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cheat Detection:&#039;&#039;&#039; Cheating in games or any specific modification in a program can be either scanned[[#References | [3][4]]] for or prevented[[#References | [5][6]]] by certain programs. The issue with these scanning and preventative software is the knowledge/awareness of specific cheats or situations that the software can handle. An AVM is designed to counter any kind of general cheat.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integrity Violations:&#039;&#039;&#039; This refers how the consistency of normal/expected operations of an execution does not equal to that of the host/reference (Trusted) execution, hence a violation has occurred.&lt;br /&gt;
&lt;br /&gt;
- The word &amp;quot;node&amp;quot; is used to refer to a computer or server in order to represent the interactions between one computer and another, or a computer and a server.&lt;br /&gt;
&lt;br /&gt;
==Research problem== &lt;br /&gt;
&lt;br /&gt;
 What is the research problem being addressed by the paper? How does this problem relate to past related work?&lt;br /&gt;
**Possible alternative  for the first part : &lt;br /&gt;
&lt;br /&gt;
The research presented in this paper tries to tackle a problem that has haunted computer scientists for a long time. How can you be sure that the software running on a remote machine is working correctly or as intended. Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a trust relation between users and a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done would be independent of the node and only dependent on the intended software. Let&#039;s say, that node A interacts with node B with execution exe1 and node A interacts with node C also with ex1, but node C has been modified and respond with exe2. Thus, we can assume that the respond of B and C will be different. Being able to prove that the node C has been modified without any doubt is the purpose of this paper. &lt;br /&gt;
***Let me know what you think about it. I removed the redundant part, and I think made it clearer and more concise. [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
** looks good to me, we&#039;ll put this part into the final essay instead of mine below --[[User:Mchou2|Mchou2]] 20:03, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
/// omit&lt;br /&gt;
&lt;br /&gt;
Cloud computing, online multi-player games, and other online services such as auctions are only a few examples that rely on a system of trust between users and a host. These different examples must have a certain amount of trust between the interactions of one user and another, as well as the user interacting with a host. When a node (user or computer) expects some sort of result or feedback from another node, they would hope that that interaction being done with node A is the same it would be done with another node, node B. Let&#039;s say for example that node A interacts with node B with execution exe1, now when node A and B interact with node C, they would both expect to interact with execution exe1, but what happens if node C interacts differently and executes with exe2, then it would be beneficial to be notified of this difference. The previous explanation might not seem too relevant without some examples, such as; Node A is playing a game with node B, the game executed on node B is the same as on A, now when node A plays with node C, node C is executing the same operations as node A plus a cheating program; when node A buys some products from node B&#039;s server, the server processes the order and then deletes node A&#039;s sensitive information, denoted by execution 1, now when node A buys from node C&#039;s server, the order is processed as well as the sensitive information that node A has provided is also rerouted to another server so that it can be used without permission. These are only a few examples where the operations in an execution is necessary to be logged and verified. The problem that is trying to be handled here is to create a procedure that can be done so that a node can be known as accountable, and to log the operations in an execution to provide evidence of these faults done by a node. &lt;br /&gt;
&lt;br /&gt;
////&lt;br /&gt;
&lt;br /&gt;
Previous work that has been done in efforts to prevent or detect integrity violations can be separated into different categories of operations. The first would be Cheat Detection, where in many different games there are cheats that users use to usually create benefits for themselves that was not intended by the original game.[[#References |[4]]] These detectors are not dynamic, in the sense that they do not actually detect whether a cheat is being used, more so they are checking if there is a cheating operation that they have logged before, being operated on the user&#039;s system. For example, if there was a known cheating program named aimbot.exe that can be run in the background of a game such as CounterStrike, and the PunkBuster system that was implemented on the user&#039;s system had the aimbot.exe program already logged as a cheating program from the developers, the PunkBuster program might notify the current game servers of this or even prevent the user from playing any games until the aimbot.exe operation is no longer running. &lt;br /&gt;
&lt;br /&gt;
Accountability is another important problem that many have already worked on. The main goal of an accountable system is to be able to determine without a doubt that node is faulty and can prove it with solid evidence. It can also be used to defend a node when threatened with false accusation. Numerous systems already use accountability in their system, but they were mostly all linked to specific applications, where a point of reference must be used to compare. As example PeerReview[[#References |[7]]], which is a system closely related to what the research team have worked on,   must be implemented into the application which makes it less portable and cannot be implemented as easily as an AVM. PeerReview verifies the inbound and outbound packets and can see if the software is running as intended. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another problem that is related to the paper is remote fault detection in a distributed system. How can we determine if a remote node is running the code correctly or if the machine itself is working as intended. Network activity is a common solution to this problem, as they look at the inbound and outbound of the node. This can let them know how the software is operating, or in the case of AVM how the whole virtual machine is working. Gridcop[[#References |[8]]] is another example that inspects a small number of packets periodically.  Another way of determining the fault remotely is to use a trusted node,  where it can tell immediately if a fault occurs or a modification is made where it should not have been made. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-and anything else you would to add or modify, or leave a note in the discussion sections if you want me to relook or change something. --[[User:Mchou2|Mchou2]] 20:10, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The problem of logging and auditing the processes of an execution of a specific node (computer) is greatly dependent on the work done for deterministic replay. Deterministic replay programs can create a log file that can be used to replay the operations done for some execution that occurs on a node. Replaying the operations done on the node can show what the node was doing, and this would seem like it is sufficient in finding out whether a node was causing integrity violations or not. The concept of snap-shoting/recording the operations is not the issue with deterministic replay, it is the fact that the data being outputted into the replay may be tampered with by the node itself so that it generates optimal results in replay. By faking the results of the operations, the auditing computer will falsely believe that the tested computer is running all operations as normal. The logging operations done by these recording programs can be directly related to the work needed to detect integrity violations.&lt;br /&gt;
&lt;br /&gt;
==Contribution==&lt;br /&gt;
&lt;br /&gt;
 What are the research contribution(s) of this work? Specifically, what are the key research results, and what do they mean? (What was implemented? Why is it any better than what came before?)&lt;br /&gt;
&lt;br /&gt;
==Critique==&lt;br /&gt;
&lt;br /&gt;
 What is good and not-so-good about this paper? You may discuss both the style and content; be sure to ground your discussion with specific references. Simple assertions that something is good or bad is not enough - you must explain why.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
 You will almost certainly have to refer to other resources; please cite these resources in the style of citation of the papers assigned (inlined numbered references). Place your bibliographic entries in this section.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
[1] B. Cully, G. Lefebvre, D. Meyer, M. Feeley, N. Hutchinson, and&lt;br /&gt;
A. Warfield. Remus: High availability via asynchronous virtual&lt;br /&gt;
machine replication. In Proceedings of the USENIX Symposium&lt;br /&gt;
on Networked Systems Design and Implementation (NSDI), Apr.&lt;br /&gt;
2008.&lt;br /&gt;
&lt;br /&gt;
[2] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
[3] G. Hoglund. 4.5 million copies of EULA-compliant spyware.&lt;br /&gt;
http://www.rootkit.com/blog.php?newsid=358.&lt;br /&gt;
&lt;br /&gt;
[4] PunkBuster web site. http://www.evenbalance.com/.&lt;br /&gt;
&lt;br /&gt;
[5] N. E. Baughman, M. Liberatore, and B. N. Levine. Cheat-proof&lt;br /&gt;
playout for centralized and peer-to-peer gaming. IEEE/ACM&lt;br /&gt;
Transactions on Networking (ToN), 15(1):1–13, Feb. 2007.&lt;br /&gt;
&lt;br /&gt;
[6] C. M¨onch, G. Grimen, and R. Midtstraum. Protecting online&lt;br /&gt;
games against cheating. In Proceedings of the Workshop on Network&lt;br /&gt;
and Systems Support for Games (NetGames), Oct. 2006.&lt;br /&gt;
&lt;br /&gt;
[7] A. Haeberlen, P. Kuznetsov, and P. Druschel. PeerReview: Practical&lt;br /&gt;
accountability for distributed systems. In Proceedings of&lt;br /&gt;
the ACM Symposium on Operating Systems Principles (SOSP),Oct. 2007.&lt;br /&gt;
&lt;br /&gt;
[8] S. Yang, A. R. Butt, Y. C. Hu, and S. P. Midkiff. Trust but&lt;br /&gt;
verify: Monitoring remotely executing programs for progress&lt;br /&gt;
and correctness. In Proceedings of the ACM SIGPLAN Annual&lt;br /&gt;
Symposium on Principles and Practice of Parallel Programming&lt;br /&gt;
(PPoPP), June 2005.&lt;br /&gt;
&lt;br /&gt;
=Discussion=&lt;br /&gt;
 We can use this area to discuss or leave notes on general ideas or whatever you want to write here.&lt;br /&gt;
&lt;br /&gt;
-The current due date posted on the site for this essay is November 25th  --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-I think that since we are given the headings to this article, we can easily choose what parts each member would like to work on, obviously since there are more members than parts, multiple members will have to work on the same parts or can work on all parts, I guess it&#039;s really up to you. I know that most people have a lot of projects coming up so let&#039;s try to get this done asap, or at least bit by bit so it&#039;s not something we have to worry too much about. --[[User:Mchou2|Mchou2]] 05:18, 19 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I would like to do the Contribution or Critique. -- [[User:Sschnei1|Sschnei1]] 02:40, 20 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I can either work on Background Concepts, or Research problem. -[[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- I&#039;m not sure whether the background concepts should be in point form or a paragraph, and whether it needs to be very long or not, but I shall work on both background concepts and research problem with you Jbaubin. --[[User:Mchou2|Mchou2]] 18:11, 21 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
-Sounds good, and As i was going to post what I had for research problem, I just saw you posted a big chunk of it. I&#039;ll be out for a while, but tonight I&#039;ll take a serious look at what you write and add what I had written. - [[User:Jbaubin|Jbaubin]]&lt;br /&gt;
&lt;br /&gt;
- Sorry I didn&#039;t write anything yet to Critique. I&#039;m making my notes and will post something tonight or tomorrow. -- [[User:Sschnei1|Sschnei1]] 14:50, 22 November 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
- I have started work on the contribution section. I&#039;ll have something up today or tomorrow. --[[User:Hirving|Hirving]] 19:55, 23 November 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=4971</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_4&amp;diff=4971"/>
		<updated>2010-11-15T15:04:15Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Group Essay 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Group Essay 2 =&lt;br /&gt;
&lt;br /&gt;
Hello Group. Please post your information here. I assume everybody read the email at your connect account. Anyone specific wants to send him the email with the group members inside? If not, I just go ahead tomorrow at about 13:00 and send the email with the group members who wrote their contact information in here. - [[User:Sschnei1|Sschnei1]] 03:25, 15 November 2010 (UTC)&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sebastian Schneider sschnei1@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Matthew Chou mchou2@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Mark Walts mwalts@connect.carleton.ca&lt;br /&gt;
&lt;br /&gt;
Henry Irving hirving@connect.carleton.ca&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4035</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4035"/>
		<updated>2010-10-14T19:59:12Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Log ==&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039; Let us maintain our edits here instead of on littering the main page with our names. Also please do not edit without writing to the log so that we know who has done what and when.&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity. Everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
More moving for clarity. added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scheduling Priorities and rewrote some areas to provide a better paragraph structure. --[[User:Spanke|Shane]] 15:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scalable Threads Problems. Also did a little re-arrangement. --[[User:Gautam|Gautam]] 01:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Answered Essay Questions in Discussion. --[[User:Spanke|Shane]] 01:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I posted Main point 2. It is nearing completion, --[[User:Praubic|Praubic]] 17:43, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Minor edits in Scheduler part. --[[User:Gautam|Gautam]] 19:09, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a paragraph about locks to memory section. --[[User:Hirving|Hirving]] 19:36, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Proof read and edited article for clarity and grammar. (commas are nice) --[[User:Hirving|Hirving]] 19:57, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vG:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
We should talk about type of relationship models (1:1 N:M N:N and so on) also talk about the application vs hardware multi-threading within single processor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I discussed Main Point 2 and how UMS threading is stretched onto multiple cores. Design that involves multiple processors differs from single proc comps so hardware definitely plays significant role here.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Multi-threading is a term used to describe:&lt;br /&gt;
&lt;br /&gt;
* A facility provided by the operating system that enables an application to create threads of execution within a process&lt;br /&gt;
* Applications whose architecture takes advantage of the multi-threading provided by the operating system &lt;br /&gt;
[[vG]]&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
# What makes threads non-scalable? List the problems&lt;br /&gt;
# What utility do some scalable implementations lack? Why?&lt;br /&gt;
# Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# Memory Usage, Context Switching. Consider using a thread pool.&lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
# If using thread pools, the scalability is then limited to the number of threads in the pool&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --[[User:Praubic|Praubic]] 00:18, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
we can add this for intro paragraph:&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process?&lt;br /&gt;
&lt;br /&gt;
It is possible for systems to supports millions of threads or more within a single processor, it has the ability to switch execution resource between threads, thus making a concurrent execution. Concurrency is when multiple threads stays on the ques for switching but incapable of running at the same time but it has the ability to make it look like they are running at same time due to the speed they switch. [[vG]] You stated it is possible you did not state how, or rather did not make it clear. The below should be a better interpretation. --[[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
&lt;br /&gt;
Added more == vG&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and threads on the other hand thread is similar to a process but it but it does a single operation within the process. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at. [[vG]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;br /&gt;
#http://www.megaupload.com/?d=R4VMK3A1 (PDF Document on Multithreading) [[vG]]&lt;br /&gt;
# [http://www.linuxjournal.com/article/1363 what is multithreading?] [[vG]]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/Thread_%28computer_science%29 type of threadings and multithreading in general] [[vG]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4031</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4031"/>
		<updated>2010-10-14T19:57:36Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Log ==&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039; Let us maintain our edits here instead of on littering the main page with our names. Also please do not edit without writing to the log so that we know who has done what and when.&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity. Everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
More moving for clarity. added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scheduling Priorities and rewrote some areas to provide a better paragraph structure. --[[User:Spanke|Shane]] 15:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scalable Threads Problems. Also did a little re-arrangement. --[[User:Gautam|Gautam]] 01:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Answered Essay Questions in Discussion. --[[User:Spanke|Shane]] 01:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I posted Main point 2. It is nearing completion, --[[User:Praubic|Praubic]] 17:43, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Minor edits in Scheduler part. --[[User:Gautam|Gautam]] 19:09, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a paragraph about locks to memory section. --[[User:Hirving|Hirving]] 19:36, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Proof read and edited article for clarity. (commas are nice) --[[User:Hirving|Hirving]] 19:57, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vG:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
We should talk about type of relationship models (1:1 N:M N:N and so on) also talk about the application vs hardware multi-threading within single processor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I discussed Main Point 2 and how UMS threading is stretched onto multiple cores. Design that involves multiple processors differs from single proc comps so hardware definitely plays significant role here.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Multi-threading is a term used to describe:&lt;br /&gt;
&lt;br /&gt;
* A facility provided by the operating system that enables an application to create threads of execution within a process&lt;br /&gt;
* Applications whose architecture takes advantage of the multi-threading provided by the operating system &lt;br /&gt;
[[vG]]&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
# What makes threads non-scalable? List the problems&lt;br /&gt;
# What utility do some scalable implementations lack? Why?&lt;br /&gt;
# Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# Memory Usage, Context Switching. Consider using a thread pool.&lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
# If using thread pools, the scalability is then limited to the number of threads in the pool&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --[[User:Praubic|Praubic]] 00:18, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
we can add this for intro paragraph:&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process?&lt;br /&gt;
&lt;br /&gt;
It is possible for systems to supports millions of threads or more within a single processor, it has the ability to switch execution resource between threads, thus making a concurrent execution. Concurrency is when multiple threads stays on the ques for switching but incapable of running at the same time but it has the ability to make it look like they are running at same time due to the speed they switch. [[vG]] You stated it is possible you did not state how, or rather did not make it clear. The below should be a better interpretation. --[[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
&lt;br /&gt;
Added more == vG&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and threads on the other hand thread is similar to a process but it but it does a single operation within the process. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at. [[vG]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;br /&gt;
#http://www.megaupload.com/?d=R4VMK3A1 (PDF Document on Multithreading) [[vG]]&lt;br /&gt;
# [http://www.linuxjournal.com/article/1363 what is multithreading?] [[vG]]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/Thread_%28computer_science%29 type of threadings and multithreading in general] [[vG]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4030</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4030"/>
		<updated>2010-10-14T19:57:12Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Log ==&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039; Let us maintain our edits here instead of on littering the main page with our names. Also please do not edit without writing to the log so that we know who has done what and when.&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity. Everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
More moving for clarity. added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scheduling Priorities and rewrote some areas to provide a better paragraph structure. --[[User:Spanke|Shane]] 15:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scalable Threads Problems. Also did a little re-arrangement. --[[User:Gautam|Gautam]] 01:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Answered Essay Questions in Discussion. --[[User:Spanke|Shane]] 01:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I posted Main point 2. It is nearing completion, --[[User:Praubic|Praubic]] 17:43, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Minor edits in Scheduler part. --[[User:Gautam|Gautam]] 19:09, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a paragraph about locks to memory section. --[[User:Hirving|Hirving]] 19:36, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Proof read and edited for clarity. (commas are nice) --[[User:Hirving|Hirving]] 19:57, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vG:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
We should talk about type of relationship models (1:1 N:M N:N and so on) also talk about the application vs hardware multi-threading within single processor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I discussed Main Point 2 and how UMS threading is stretched onto multiple cores. Design that involves multiple processors differs from single proc comps so hardware definitely plays significant role here.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Multi-threading is a term used to describe:&lt;br /&gt;
&lt;br /&gt;
* A facility provided by the operating system that enables an application to create threads of execution within a process&lt;br /&gt;
* Applications whose architecture takes advantage of the multi-threading provided by the operating system &lt;br /&gt;
[[vG]]&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
# What makes threads non-scalable? List the problems&lt;br /&gt;
# What utility do some scalable implementations lack? Why?&lt;br /&gt;
# Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# Memory Usage, Context Switching. Consider using a thread pool.&lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
# If using thread pools, the scalability is then limited to the number of threads in the pool&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --[[User:Praubic|Praubic]] 00:18, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
we can add this for intro paragraph:&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process?&lt;br /&gt;
&lt;br /&gt;
It is possible for systems to supports millions of threads or more within a single processor, it has the ability to switch execution resource between threads, thus making a concurrent execution. Concurrency is when multiple threads stays on the ques for switching but incapable of running at the same time but it has the ability to make it look like they are running at same time due to the speed they switch. [[vG]] You stated it is possible you did not state how, or rather did not make it clear. The below should be a better interpretation. --[[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
&lt;br /&gt;
Added more == vG&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and threads on the other hand thread is similar to a process but it but it does a single operation within the process. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at. [[vG]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;br /&gt;
#http://www.megaupload.com/?d=R4VMK3A1 (PDF Document on Multithreading) [[vG]]&lt;br /&gt;
# [http://www.linuxjournal.com/article/1363 what is multithreading?] [[vG]]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/Thread_%28computer_science%29 type of threadings and multithreading in general] [[vG]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=4029</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=4029"/>
		<updated>2010-10-14T19:55:53Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Scalable Threads: The Problems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== The Background ==&lt;br /&gt;
&lt;br /&gt;
A &#039;process&#039; is defined to be &amp;quot;an address-space and a group of resources dedicated to running the program&amp;quot;. On the other hand a &#039;thread&#039; is an independent sequential unit of computation that executes within the context of a kernel supported entity like a &#039;process&#039;. Threads are often classified by their “weight” (or overhead), which corresponds to the amount of context that must be saved when a thread is removed from the processor, and restored when a thread is reinstated on a processor that is a context switch. The context for a process usually includes the hardware register, kernel stack, user-level stack, interrupt vectors, page tables, and more. Threads require less system resources then concurrent cooperating processes and start much easier, therefore, there may exist millions of them in a single process. Loosely based on this there are two major types of threads: kernel and user-mode. Kernel threads are usually considered heavier and designs that involve them are not very scalable. User threads, on the other hand, are mapped to kernel threads and lightwieght. The ratio of the user threads to kernel threads is an important factor when designing scalable systems.&lt;br /&gt;
&lt;br /&gt;
There are a few designs, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools, which are yet another mechanism that allows for high scalability. Systems can support millions of threads within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&amp;lt;br&amp;gt; [[vG]] &amp;amp;&amp;amp; [[Paul]] &amp;amp;&amp;amp; [[Shane]] &amp;amp;&amp;amp; [[Gautam]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Scalable Threads: The Problems ==&lt;br /&gt;
&lt;br /&gt;
One of the basic challenges is to create code which is stable and at the same time scalable. Furthermore, the challenge in making an existing code base scalable is the identification and elimination of bottlenecks once scaled. Ray Bryant and John Hawkes found the following bottlenecks when porting Linux to a 64-core NUMA system. Each of these bottle necks are an example of a type of bottleneck that can appear in any program.&lt;br /&gt;
&lt;br /&gt;
When expensive operations are &#039;&#039;&#039;needlessly called&#039;&#039;&#039; one type of bottleneck appears. In Linux, there can be some instances of misplaced information in the cache that can cause a &amp;quot;&#039;&#039;&#039;cache-coherency operation&#039;&#039;&#039;&amp;quot; to be called. This operation is expensive when compared to what would happen if the information was in the &#039;right place&#039;. Once the misplaced information that causes this problem all the time is identified it can be moved to limit the problem. Anywhere expensive operations are called a needless number of times, this bottleneck can appear (this problem is not inherent, but is a result of bad-design).&lt;br /&gt;
&lt;br /&gt;
Another type of bottleneck is from &#039;&#039;&#039;starvation.&#039;&#039;&#039; An example of one such bottleneck is the xtime_lock in Linux. Having locking read prevented writing to the timer value, causing the kernel to waste CPU time to keep trying. This problem was solved by using a lockless-read. This problem would appear anywhere that a thread must keep trying to execute, but cannot, leading to wasted CPU cycles.&lt;br /&gt;
&lt;br /&gt;
The next type of bottleneck is from &#039;&#039;&#039;course-grained&#039;&#039;&#039; operations. Granularity refers to the execution time of a code segment. Both examples eat alot of CPU time, where a finer-grained implementation would eat less. The closer a segment is to the speed of an atomic action the finer its granularity. One course-grained bottleneck was the dcache_lock. It ate up some time in normal use, but it was also called in the much more popular dnotify_parent() function. This was deemed an unacceptable state of affairs. So, the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux. Another big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottleneck. Both those examples are the result of course granularity. &lt;br /&gt;
&lt;br /&gt;
Bottlenecks can be from &#039;&#039;&#039;multiple problems.&#039;&#039;&#039; One example of that is the multiqueue scheduler from linux 2.4. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems: the spinlock ate up a fair majority of the CPU time, it was course-grained. While, the rest went into computing and recomputing information in the cache, a needless expensive operation. The Scheduler also had O(n) time complexity which essentially meant that the scheduler had scalability issues and would become inefficient after a particular number of processes. These problems were fixed by replacing the scheduler (That scheduler was then replaced by a more efficient scheduler with a O(1)time complexity which meant that any number of threads/processes could be scheduled without any overhead. &lt;br /&gt;
--[[Rannath]]  A few additions--[[Gautam]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MAIN POINT 2 Paragraph draft&#039;&#039;&#039; --[[User:Praubic|Praubic]] 00:21, 14 October 2010 (UTC) still in progress and debating &lt;br /&gt;
&lt;br /&gt;
Introduction of Windows NT and OS/2 brought about innovation that provides cheap threading while having expensive processing. UMS which reflects such design is a recommended mechanism for high performance requirements that handle many threads on multicore systems. A scheduler has to be implemented to manage the UMS threads and decide when they should be run or stopped. This implementation is not desirable for moderate performance systems because concurrent execution of this sort naturally allows for non-intuitive outcomes or behaviors such as race condition which requires careful programming and design choices. The framework used by UMS threading is divided into smaller abstractions depending on the final desired utility. For instance, UMS scheduling can be assigned to each logical processor and thereby creating affinity for related threads to function around one scheduler. This could turn out inefficient depending whether there are many related threads that could end up starving other processes. &lt;br /&gt;
&lt;br /&gt;
Fibers embrace essentially the same abstraction as coroutines. The distinction emerges from the fact that fibers are on the system level while coroutines execute on the language level. Unlike UMS, fibers do not utilize multiprocessor machines, however, they require less operating system support. Symbian Operating System presents an example of fibers usage in its Active Scheduler. An object of active scheduler contains a single fiber that is scheduled when an asynchronous call returns and blocks lower priority fibers until all above are finished. &lt;br /&gt;
&lt;br /&gt;
Thread Pools consist of queues of threads that stay open and await new tasks to become assigned to them. If there is no new tasks to be completed, they sleep or wait. This pattern eliminates the overhead of creation and destruction of threads which reflects in better system stability and improved performance. The long living threads can, for instance, handle multiple transaction requests from socket connection from other machines over a short time frame while at the same time avoiding the millions of cycles to drop/reestablish a thread. Often, thread pool operate on server farms and therefore thread-safety has to be carefully implemented.&lt;br /&gt;
&lt;br /&gt;
== Design Choices == &lt;br /&gt;
--[[User:Gautam|Gautam]] 00:29, 14 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039; &lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&lt;br /&gt;
Explaining the four types of synchronization:&lt;br /&gt;
&lt;br /&gt;
*Mutex locks uses only a thread thus giving access to only certain part of the code&lt;br /&gt;
*Using Read/Write synchronization one can gain exclusive write and read access to protected resource but to edit the content it must have the exclusive write lock. Exclusive write lock is only permitted when all the read locks are released&lt;br /&gt;
*Condition variable synchronization protects the thread until the condition becomes true&lt;br /&gt;
*Counting semaphores delivers access to multiple threads.  It has a count which keeps tracks of the number of threads can have concurrent access to the data. Once the limit is reached other threads are blocked until the limit changes.&lt;br /&gt;
[[vG]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
	&lt;br /&gt;
The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.&lt;br /&gt;
&lt;br /&gt;
Locks are an important part of the performance of threads and there are multiple way of controlling and creating locks in order to create a large amount of threads. Single lock (having the data structures all be in one lock) has the advantage that once the processor has acquired the lock it can modify any of the stored data. Using the single lock method means only one lock is needed per thread, decreasing the thread overhead but this also limits the throughput of the system. Multiple lock (having each data structure have it&#039;s own lock) has the advantage of that each action on the data structure is it&#039;s own locking/unlocking operations. Multiple has greater thread overhead (because there are more locks) but the thread throughput is much higher allowing for fast creation of threads. Another downside of multiple lock systems are deadlocks, a deadlock happens when two different threads are waiting for data that the other task holds. Single and multiple lock systems are the inverse of each other and using both depending on the situation can greatly increase the performance of a system.   &lt;br /&gt;
	&lt;br /&gt;
The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency.[http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx][http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/], Microsoft (23 September 2010) --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4006</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=4006"/>
		<updated>2010-10-14T19:44:58Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Log ==&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039; Let us maintain our edits here instead of on littering the main page with our names. Also please do not edit without writing to the log so that we know who has done what and when.&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity. Everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
More moving for clarity. added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scheduling Priorities and rewrote some areas to provide a better paragraph structure. --[[User:Spanke|Shane]] 15:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scalable Threads Problems. Also did a little re-arrangement. --[[User:Gautam|Gautam]] 01:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Answered Essay Questions in Discussion. --[[User:Spanke|Shane]] 01:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I posted Main point 2. It is nearing completion, --[[User:Praubic|Praubic]] 17:43, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Minor edits in Scheduler part. --[[User:Gautam|Gautam]] 19:09, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a paragraph about locks to memory section. --[[User:Hirving|Hirving]] 19:36, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited answer paragraphs for clarity. (commas are nice) --[[User:Hirving|Hirving]] 19:44, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vG:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
We should talk about type of relationship models (1:1 N:M N:N and so on) also talk about the application vs hardware multi-threading within single processor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I discussed Main Point 2 and how UMS threading is stretched onto multiple cores. Design that involves multiple processors differs from single proc comps so hardware definitely plays significant role here.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Multi-threading is a term used to describe:&lt;br /&gt;
&lt;br /&gt;
* A facility provided by the operating system that enables an application to create threads of execution within a process&lt;br /&gt;
* Applications whose architecture takes advantage of the multi-threading provided by the operating system &lt;br /&gt;
[[vG]]&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
# What makes threads non-scalable? List the problems&lt;br /&gt;
# What utility do some scalable implementations lack? Why?&lt;br /&gt;
# Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# Memory Usage, Context Switching. Consider using a thread pool.&lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
# If using thread pools, the scalability is then limited to the number of threads in the pool&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --[[User:Praubic|Praubic]] 00:18, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
we can add this for intro paragraph:&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process?&lt;br /&gt;
&lt;br /&gt;
It is possible for systems to supports millions of threads or more within a single processor, it has the ability to switch execution resource between threads, thus making a concurrent execution. Concurrency is when multiple threads stays on the ques for switching but incapable of running at the same time but it has the ability to make it look like they are running at same time due to the speed they switch. [[vG]] You stated it is possible you did not state how, or rather did not make it clear. The below should be a better interpretation. --[[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
&lt;br /&gt;
Added more == vG&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and threads on the other hand thread is similar to a process but it but it does a single operation within the process. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at. [[vG]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;br /&gt;
#http://www.megaupload.com/?d=R4VMK3A1 (PDF Document on Multithreading) [[vG]]&lt;br /&gt;
# [http://www.linuxjournal.com/article/1363 what is multithreading?] [[vG]]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/Thread_%28computer_science%29 type of threadings and multithreading in general] [[vG]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=4003</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=4003"/>
		<updated>2010-10-14T19:43:54Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Answer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
A &#039;process&#039; is defined to be &amp;quot;an address-space and a group of resources dedicated to running the program&amp;quot;. On the other hand a &#039;thread&#039; is an independent sequential unit of computation that executes within the context of a kernel supported entity like a &#039;process&#039;. Threads are often classified by their “weight” (or overhead), which corresponds to the amount of context that must be saved when a thread is removed from the processor, and restored when a thread is reinstated on a processor that is a context switch. The context for a process usually includes the hardware register, kernel stack, user-level stack, interrupt vectors, page tables, and more. Threads require less system resources then concurrent cooperating processes and start much easier, therefore, there may exist millions of them in a single process. Loosely based on this there are two major types of threads: kernel and user-mode. Kernel threads are usually considered heavier and designs that involve them are not very scalable. User threads, on the other hand, are mapped to kernel threads and lightwieght. The ratio of the user threads to kernel threads is an important factor when designing scalable systems.&lt;br /&gt;
&lt;br /&gt;
There are a few designs, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools, which are yet another mechanism that allows for high scalability. Systems can support millions of threads within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&amp;lt;br&amp;gt; [[vG]] &amp;amp;&amp;amp; [[Paul]] &amp;amp;&amp;amp; [[Shane]] &amp;amp;&amp;amp; [[Gautam]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Scalable Threads: The Problems ==&lt;br /&gt;
&lt;br /&gt;
One of the basic challenges is to create code which is stable and at the same time scalable. Furthermore, the challenge in making an existing code base scalable is the identification and elimination of bottlenecks once scaled. Ray Bryant and John Hawkes found the following bottlenecks when porting Linux to a 64-core NUMA system. Each of these bottle necks is an example of a type of bottleneck that can appear in any program.&lt;br /&gt;
&lt;br /&gt;
When expensive operations are &#039;&#039;&#039;needlessly called&#039;&#039;&#039; one type of bottleneck appears. In Linux there can be some instances of misplaced information in the cache that can cause a &amp;quot;&#039;&#039;&#039;cache-coherency operation&#039;&#039;&#039;&amp;quot; to be called. This operation is expensive compared to what would happen if the information was in the &#039;right place&#039;. Once misplaced information that causes this problem all the time is identified it can be moved to limit the problem. Anywhere expensive operations are called a needless number of times this bottleneck can appear (this problem is not inherent, but is a result of bad-design).&lt;br /&gt;
&lt;br /&gt;
Another type of bottleneck is from &#039;&#039;&#039;starvation.&#039;&#039;&#039; One such bottleneck is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, causing the kernel to waste CPU time to keep trying. This problem was solved by using a lockless-read. This problem would appear anywhere that a thread must keep trying to execute, but cannot, leading to wasted CPU cycles.&lt;br /&gt;
&lt;br /&gt;
The next type of bottleneck is from &#039;&#039;&#039;course-grained&#039;&#039;&#039; operations. Granularity refers to the execution time of a code segment. Both examples eat alot of CPU time, where a finer-grained implementation would eat less. The closer a segment is to the speed of an atomic action the finer its granularity. One course-grained bottleneck was the dcache_lock. It ate up some time in normal use, but it was also called in the much more popular dnotify_parent() function. That was an unacceptable state of affairs. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux. Another big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottleneck. Both those examples are the result of course granularity. &lt;br /&gt;
&lt;br /&gt;
Bottlenecks can be from &#039;&#039;&#039;multiple problems.&#039;&#039;&#039; One example of that is the multiqueue scheduler from linux 2.4. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time, it was course-grained. While, the rest went into computing and recomputing information in the cache, a needless expensive operation. The Scheduler also had O(n) time complexity which essentially meant that the scheduler had scalability issues and would become inefficient after a particular number of processes. These problems were fixed by replacing the scheduler (That scheduler was then replaced by a more efficient scheduler with a O(1)time complexity which meant that any number of threads/processes could be scheduled without any overhead. &lt;br /&gt;
--[[Rannath]]  A few additions--[[Gautam]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MAIN POINT 2 Paragraph draft&#039;&#039;&#039; --[[User:Praubic|Praubic]] 00:21, 14 October 2010 (UTC) still in progress and debating &lt;br /&gt;
&lt;br /&gt;
Introduction of Windows NT and OS/2 brought about innovation that provides cheap threading while having expensive processing. UMS which reflects such design is a recommended mechanism for high performance requirements which handle many threads on multicore systems. A scheduler has to be implemented to manage the UMS threads and decide when they should be run or stopped. This implementation is not desirable for moderate performance systems because concurrent execution of this sort naturally allows for non-intuitive outcomes or behaviors such as race condition which requires careful programming and design choices. The framework used by UMS threading is divided into smaller abstractions depending on the final desired utility. For instance, UMS scheduling can be assigned to each logical processor and thereby creating affinity for related threads to function around one scheduler. This could turn out inefficient depending whether there are many related threads that could end up starving other processes. &lt;br /&gt;
&lt;br /&gt;
Fibers embrace essentially the same abstraction as coroutines. The distinction emerges from the fact that fibers are on the system level while coroutines execute on the language level. Unlike UMS, fibers do not utilize multiprocessor machines however they require less operating system support. Symbian Operating System presents an example of fibers usage in its Active Scheduler. An object of active scheduler contains a single fiber that is scheduled when an asynchronous call returns and blocks lower priority fibers until all above are finished. &lt;br /&gt;
&lt;br /&gt;
Thread Pools consist of queues of threads that stay open and await new tasks to become assigned to them. If there is no new tasks to be completed they sleep or wait.This pattern eliminates the overhead of creation and destruction of threads which reflects in better system stability and improved performance. The long living threads can for instance handle multiple transaction requests from socket connection from other machines over a short time frame while at the same time avoiding the millions of cycles to drop/reestablish a thread. Often, thread pool operate on server farms and therefore thread-safety has to be carefully implemented.&lt;br /&gt;
&lt;br /&gt;
== Design Choices == &lt;br /&gt;
--[[User:Gautam|Gautam]] 00:29, 14 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039; &lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&lt;br /&gt;
Explaining the four types of synchronization:&lt;br /&gt;
&lt;br /&gt;
*Mutex locks uses only a thread thus giving access to only certain part of the code&lt;br /&gt;
*Using Read/Write synchronization one can gain exclusive write and read access to protected resource but to edit the content it must have the exclusive write lock. Exclusive write lock is only permitted when all the read locks are released&lt;br /&gt;
*Condition variable synchronization protects the thread until the condition becomes true&lt;br /&gt;
*Counting semaphores delivers access to multiple threads.  It has a count which keeps tracks of the number of threads can have concurrent access to the data. Once the limit is reached other threads are blocked until the limit changes.&lt;br /&gt;
[[vG]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
	&lt;br /&gt;
The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.&lt;br /&gt;
&lt;br /&gt;
Locks are an important part of the performance of threads and there are multiple way of controlling and creating locks in order to create a large amount of threads. Single lock (having the data structures all be in one lock) has the advantage that once the processor has acquired the lock it can modify any of the stored data. Using the single lock method means only one lock is needed per thread, decreasing the thread overhead but this also limits the throughput of the system. Multiple lock (having each data structure have it&#039;s own lock) has the advantage of that each action on the data structure is it&#039;s own locking/unlocking operations. Multiple has greater thread overhead (because there are more locks) but the thread throughput is much higher allowing for fast creation of threads. Another downside of multiple lock systems are deadlocks, a deadlock happens when two different threads are waiting for data that the other task holds. Single and multiple lock systems are the inverse of each other and using both depending on the situation can greatly increase the performance of a system.   &lt;br /&gt;
	&lt;br /&gt;
The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency.[http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx][http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/], Microsoft (23 September 2010) --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3998</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3998"/>
		<updated>2010-10-14T19:36:44Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Log ==&lt;br /&gt;
&#039;&#039;&#039;Suggestion:&#039;&#039;&#039; Let us maintain our edits here instead of on littering the main page with our names. Also please do not edit without writing to the log so that we know who has done what and when.&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity. Everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
More moving for clarity. added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scheduling Priorities and rewrote some areas to provide a better paragraph structure. --[[User:Spanke|Shane]] 15:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Edited Scalable Threads Problems. Also did a little re-arrangement. --[[User:Gautam|Gautam]] 01:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Answered Essay Questions in Discussion. --[[User:Spanke|Shane]] 01:25, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I posted Main point 2. It is nearing completion, --[[User:Praubic|Praubic]] 17:43, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Minor edits in Scheduler part. --[[User:Gautam|Gautam]] 19:09, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added a paragraph about locks to memory section. --[[User:Hirving|Hirving]] 19:36, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;vG:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
We should talk about type of relationship models (1:1 N:M N:N and so on) also talk about the application vs hardware multi-threading within single processor.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I discussed Main Point 2 and how UMS threading is stretched onto multiple cores. Design that involves multiple processors differs from single proc comps so hardware definitely plays significant role here.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Multi-threading is a term used to describe:&lt;br /&gt;
&lt;br /&gt;
* A facility provided by the operating system that enables an application to create threads of execution within a process&lt;br /&gt;
* Applications whose architecture takes advantage of the multi-threading provided by the operating system &lt;br /&gt;
[[vG]]&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
# What makes threads non-scalable? List the problems&lt;br /&gt;
# What utility do some scalable implementations lack? Why?&lt;br /&gt;
# Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# Memory Usage, Context Switching. Consider using a thread pool.&lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
# If using thread pools, the scalability is then limited to the number of threads in the pool&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --[[User:Praubic|Praubic]] 00:18, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
we can add this for intro paragraph:&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process?&lt;br /&gt;
&lt;br /&gt;
It is possible for systems to supports millions of threads or more within a single processor, it has the ability to switch execution resource between threads, thus making a concurrent execution. Concurrency is when multiple threads stays on the ques for switching but incapable of running at the same time but it has the ability to make it look like they are running at same time due to the speed they switch. [[vG]] You stated it is possible you did not state how, or rather did not make it clear. The below should be a better interpretation. --[[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
&lt;br /&gt;
Added more == vG&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and threads on the other hand thread is similar to a process but it but it does a single operation within the process. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at. [[vG]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;br /&gt;
#http://www.megaupload.com/?d=R4VMK3A1 (PDF Document on Multithreading) [[vG]]&lt;br /&gt;
# [http://www.linuxjournal.com/article/1363 what is multithreading?] [[vG]]&lt;br /&gt;
# [http://en.wikipedia.org/wiki/Thread_%28computer_science%29 type of threadings and multithreading in general] [[vG]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3995</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3995"/>
		<updated>2010-10-14T19:35:18Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
A &#039;process&#039; is defined to be &amp;quot;an address-space and a group of resources dedicated to running the program&amp;quot;. On the other hand a &#039;thread&#039; is an independent sequential unit of computation that executes within the context of a kernel supported entity like a &#039;process&#039;. Threads are often classified by their “weight” , which corresponds to the amount of context that must be saved when a thread is removed from the processor, and restored when a thread is reinstated on a processor that is a context switch. The context for a process usually includes the hardware register, kernel stack, user-level stack, interrupt vectors, page tables,and more. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. Loosely based on this there are two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable. User threads on the other hand are lightweight and are mapped to kernel threads. The ratio of the user threads to kernel threads is an important factor while designing scalable systems as will be seen below.&lt;br /&gt;
&lt;br /&gt;
There are a few designs, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools which are yet another mechanism that allows for high scalability. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&amp;lt;br&amp;gt; [[vG]] &amp;amp;&amp;amp; [[Paul]] &amp;amp;&amp;amp; [[Shane]] &amp;amp;&amp;amp; [[Gautam]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Scalable Threads: The Problems ==&lt;br /&gt;
&lt;br /&gt;
One of the basic challenges is to create code which is stable and at the same time scalable. Furthermore, the challenge in making an existing code base scalable is the identification and elimination of bottlenecks once scaled. Ray Bryant and John Hawkes found the following bottlenecks when porting Linux to a 64-core NUMA system. Each of these bottle necks is an example of a type of bottleneck that can appear in any program.&lt;br /&gt;
&lt;br /&gt;
When expensive operations are &#039;&#039;&#039;needlessly called&#039;&#039;&#039; one type of bottleneck appears. In Linux there can be some instances of misplaced information in the cache that can cause a &amp;quot;&#039;&#039;&#039;cache-coherency operation&#039;&#039;&#039;&amp;quot; to be called. This operation is expensive compared to what would happen if the information was in the &#039;right place&#039;. Once misplaced information that causes this problem all the time is identified it can be moved to limit the problem. Anywhere expensive operations are called a needless number of times this bottleneck can appear (this problem is not inherent, but is a result of bad-design).&lt;br /&gt;
&lt;br /&gt;
Another type of bottleneck is from &#039;&#039;&#039;starvation.&#039;&#039;&#039; One such bottleneck is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, causing the kernel to waste CPU time to keep trying. This problem was solved by using a lockless-read. This problem would appear anywhere that a thread must keep trying to execute, but cannot, leading to wasted CPU cycles.&lt;br /&gt;
&lt;br /&gt;
The next type of bottleneck is from &#039;&#039;&#039;course-grained&#039;&#039;&#039; operations. Granularity refers to the execution time of a code segment. Both examples eat alot of CPU time, where a finer-grained implementation would eat less. The closer a segment is to the speed of an atomic action the finer its granularity. One course-grained bottleneck was the dcache_lock. It ate up some time in normal use, but it was also called in the much more popular dnotify_parent() function. That was an unacceptable state of affairs. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux. Another big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottleneck. Both those examples are the result of course granularity. &lt;br /&gt;
&lt;br /&gt;
Bottlenecks can be from &#039;&#039;&#039;multiple problems.&#039;&#039;&#039; One example of that is the multiqueue scheduler from linux 2.4. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time, it was course-grained. While, the rest went into computing and recomputing information in the cache, a needless expensive operation. The Scheduler also had O(n) time complexity which essentially meant that the scheduler had scalability issues and would become inefficient after a particular number of processes. These problems were fixed by replacing the scheduler (That scheduler was then replaced by a more efficient scheduler with a O(1)time complexity which meant that any number of threads/processes could be scheduled without any overhead. &lt;br /&gt;
--[[Rannath]]  A few additions--[[Gautam]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MAIN POINT 2 Paragraph draft&#039;&#039;&#039; --[[User:Praubic|Praubic]] 00:21, 14 October 2010 (UTC) still in progress and debating &lt;br /&gt;
&lt;br /&gt;
Introduction of Windows NT and OS/2 brought about innovation that provides cheap threading while having expensive processing. UMS which reflects such design is a recommended mechanism for high performance requirements which handle many threads on multicore systems. A scheduler has to be implemented to manage the UMS threads and decide when they should be run or stopped. This implementation is not desirable for moderate performance systems because concurrent execution of this sort naturally allows for non-intuitive outcomes or behaviors such as race condition which requires careful programming and design choices. The framework used by UMS threading is divided into smaller abstractions depending on the final desired utility. For instance, UMS scheduling can be assigned to each logical processor and thereby creating affinity for related threads to function around one scheduler. This could turn out inefficient depending whether there are many related threads that could end up starving other processes. &lt;br /&gt;
&lt;br /&gt;
Fibers embrace essentially the same abstraction as coroutines. The distinction emerges from the fact that fibers are on the system level while coroutines execute on the language level. Unlike UMS, fibers do not utilize multiprocessor machines however they require less operating system support. Symbian Operating System presents an example of fibers usage in its Active Scheduler. An object of active scheduler contains a single fiber that is scheduled when an asynchronous call returns and blocks lower priority fibers until all above are finished. &lt;br /&gt;
&lt;br /&gt;
Thread Pools consist of queues of threads that stay open and await new tasks to become assigned to them. If there is no new tasks to be completed they sleep or wait.This pattern eliminates the overhead of creation and destruction of threads which reflects in better system stability and improved performance. The long living threads can for instance handle multiple transaction requests from socket connection from other machines over a short time frame while at the same time avoiding the millions of cycles to drop/reestablish a thread. Often, thread pool operate on server farms and therefore thread-safety has to be carefully implemented.&lt;br /&gt;
&lt;br /&gt;
== Design Choices == &lt;br /&gt;
--[[User:Gautam|Gautam]] 00:29, 14 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039; &lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&lt;br /&gt;
Explaining the four types of synchronization:&lt;br /&gt;
&lt;br /&gt;
*Mutex locks uses only a thread thus giving access to only certain part of the code&lt;br /&gt;
*Using Read/Write synchronization one can gain exclusive write and read access to protected resource but to edit the content it must have the exclusive write lock. Exclusive write lock is only permitted when all the read locks are released&lt;br /&gt;
*Condition variable synchronization protects the thread until the condition becomes true&lt;br /&gt;
*Counting semaphores delivers access to multiple threads.  It has a count which keeps tracks of the number of threads can have concurrent access to the data. Once the limit is reached other threads are blocked until the limit changes.&lt;br /&gt;
[[vG]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
	&lt;br /&gt;
The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.&lt;br /&gt;
&lt;br /&gt;
Locks are an important part of the performance of threads and there are multiple way of controlling and creating locks in order to create a large amount of threads. Single lock (having the data structures all be in one lock) has the advantage that once the processor has acquired the lock it can modify any of the stored data. Using the single lock method means only one lock is needed per thread, decreasing the thread overhead but this also limits the throughput of the system. Multiple lock (having each data structure have it&#039;s own lock) has the advantage of that each action on the data structure is it&#039;s own locking/unlocking operations. Multiple has greater thread overhead (because there are more locks) but the thread throughput is much higher allowing for fast creation of threads. Another downside of multiple lock systems are deadlocks, a deadlock happens when two different threads are waiting for data that the other task holds. Single and multiple lock systems are the inverse of each other and using both depending on the situation can greatly increase the performance of a system.   &lt;br /&gt;
	&lt;br /&gt;
The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency.[http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx][http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/], Microsoft (23 September 2010) --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3981</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3981"/>
		<updated>2010-10-14T19:17:31Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
Process is known as an instance of a program running in a computer which has its own resources such as address space, files, I/O devices and thread on the other hand is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously and it can either execute the same code or a different code within the same application because it has its own state, run-time stack and execution context. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable. User threads on the other hand, are mapped to kernel threads by the threads library such as libpthreads. There are a few designs that incorporate it, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools which are yet another mechanism that allows for high scalability. Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&amp;lt;br&amp;gt; [[vG]] &amp;amp;&amp;amp; [[Paul]] &amp;amp;&amp;amp; [[Shane]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Taken the liberty to add Praubic&#039;s tentative first para. &#039;&#039;&#039; and &#039;&#039;&#039;i have added my version to pauls and modified it [[vG]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Scalable Threads: The Problems ==&lt;br /&gt;
&lt;br /&gt;
One of the basic challenges is to create code which is stable and at the same time scalable. Furthermore, the challenge in making an existing code base scalable is the identification and elimination of bottlenecks once scaled. Ray Bryant and John Hawkes found the following bottlenecks when porting Linux to a 64-core NUMA system. Each of these bottle necks is an example of a type of bottleneck that can appear in any program.&lt;br /&gt;
&lt;br /&gt;
When expensive operations are &#039;&#039;&#039;needlessly called&#039;&#039;&#039; one type of bottleneck appears. In Linux there can be some instances of misplaced information in the cache that can cause a &amp;quot;&#039;&#039;&#039;cache-coherency operation&#039;&#039;&#039;&amp;quot; to be called. This operation is expensive compared to what would happen if the information was in the &#039;right place&#039;. Once misplaced information that causes this problem all the time is identified it can be moved to limit the problem. Anywhere expensive operations are called a needless number of times this bottleneck can appear (this problem is not inherent, but is a result of bad-design).&lt;br /&gt;
&lt;br /&gt;
Another type of bottleneck is from &#039;&#039;&#039;starvation.&#039;&#039;&#039; One such bottleneck is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, causing the kernel to waste CPU time to keep trying. This problem was solved by using a lockless-read. This problem would appear anywhere that a thread must keep trying to execute, but cannot, leading to wasted CPU cycles.&lt;br /&gt;
&lt;br /&gt;
The next type of bottleneck is from &#039;&#039;&#039;course-grained&#039;&#039;&#039; operations. Granularity refers to the execution time of a code segment. Both examples eat alot of CPU time, where a finer-grained implementation would eat less. The closer a segment is to the speed of an atomic action the finer its granularity. One course-grained bottleneck was the dcache_lock. It ate up some time in normal use, but it was also called in the much more popular dnotify_parent() function. That was an unacceptable state of affairs. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux. Another big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottleneck. Both those examples are the result of course granularity. &lt;br /&gt;
&lt;br /&gt;
Bottlenecks can be from &#039;&#039;&#039;multiple problems.&#039;&#039;&#039; One example of that is the multiqueue scheduler from linux 2.4. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time, it was course-grained. While, the rest went into computing and recomputing information in the cache, a needless expensive operation. The Scheduler also had O(n) time complexity which essentially meant that the scheduler had scalability issues and would become inefficient after a particular number of processes. These problems were fixed by replacing the scheduler (That scheduler was then replaced by a more efficient scheduler with a O(1)time complexity which meant that any number of threads/processes could be scheduled without any overhead. &lt;br /&gt;
--[[Rannath]]  A few additions--[[Gautam]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MAIN POINT 2 Paragraph draft&#039;&#039;&#039; --[[User:Praubic|Praubic]] 00:21, 14 October 2010 (UTC) still in progress and debating &lt;br /&gt;
&lt;br /&gt;
Introduction of Windows NT and OS/2 brought about innovation that provides cheap threading while having expensive processing. UMS which reflects such design is a recommended mechanism for high performance requirements which handle many threads on multicore systems. A scheduler has to be implemented to manage the UMS threads and decide when they should be run or stopped. This implementation is not desirable for moderate performance systems because concurrent execution of this sort naturally allows for non-intuitive outcomes or behaviors such as race condition which requires careful programming and design choices. The framework used by UMS threading is divided into smaller abstractions depending on the final desired utility. For instance, UMS scheduling can be assigned to each logical processor and thereby creating affinity for related threads to function around one scheduler. This could turn out inefficient depending whether there are many related threads that could end up starving other processes. &lt;br /&gt;
&lt;br /&gt;
Fibers embrace essentially the same abstraction as coroutines. The distinction emerges from the fact that fibers are on the system level while coroutines execute on the language level. Unlike UMS, fibers do not utilize multiprocessor machines however they require less operating system support. Symbian Operating System presents an example of fibers usage in its Active Scheduler. An object of active scheduler contains a single fiber that is scheduled when an asynchronous call returns and blocks lower priority fibers until all above are finished. &lt;br /&gt;
&lt;br /&gt;
Thread Pools consist of queues of threads that stay open and await new tasks to become assigned to them. If there is no new tasks to be completed they sleep or wait.This pattern eliminates the overhead of creation and destruction of threads which reflects in better system stability and improved performance. The long living threads can for instance handle multiple transaction requests from socket connection from other machines over a short time frame while at the same time avoiding the millions of cycles to drop/reestablish a thread. Often, thread pool operate on server farms and therefore thread-safety has to be carefully implemented.&lt;br /&gt;
&lt;br /&gt;
== Design Choices == &lt;br /&gt;
--[[User:Gautam|Gautam]] 00:29, 14 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039; &lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&lt;br /&gt;
Explaining the four types of synchronization:&lt;br /&gt;
&lt;br /&gt;
*Mutex locks uses only a thread thus giving access to only certain part of the code&lt;br /&gt;
*Using Read/Write synchronization one can gain exclusive write and read access to protected resource but to edit the content it must have the exclusive write lock. Exclusive write lock is only permitted when all the read locks are released&lt;br /&gt;
*Condition variable synchronization protects the thread until the condition becomes true&lt;br /&gt;
*Counting semaphores delivers access to multiple threads.  It has a count which keeps tracks of the number of threads can have concurrent access to the data. Once the limit is reached other threads are blocked until the limit changes.&lt;br /&gt;
[[vG]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
	&lt;br /&gt;
The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.   &lt;br /&gt;
	&lt;br /&gt;
The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency.[http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx][http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/], Microsoft (23 September 2010) --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3698</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3698"/>
		<updated>2010-10-14T12:31:51Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable. User threads on the other hand, are mapped to kernel threads by the threads library such as libpthreads. There are a few designs that incorporate it, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools which are yet another mechanism that allows for high scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Taken the liberty to add Praubic&#039;s tentative first para. No changes made as of yet.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I have the following... have your words or remove it if not needed:)&lt;br /&gt;
&lt;br /&gt;
Systems can support millions within a single process by switching execution resources between threads, creating a concurrent execution. Concurrency is the result of multiple threads staying on the queues but is incapable of running them at the same time. It provides the impression that they are executing at the same time due to the speed they switch at.&lt;br /&gt;
[[vG]] Edited by : [[User:Spanke|Shane]] &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Scalable Threads: The Problems ==&lt;br /&gt;
&lt;br /&gt;
One of the challenges in making an existing code base scalable is the identification and elimination of bottlenecks. When porting Linux to a 64-core NUMA system Ray Bryant and John Hawkes found the following bottlenecks (or just wrote a paper about them). Each of these bottle necks is an example of a type of bottleneck that can appear in any program.&lt;br /&gt;
&lt;br /&gt;
When expensive operations are &#039;&#039;&#039;needlessly called&#039;&#039;&#039; one type of bottleneck appears. In Linux there can be some instances of misplaced information in the cache that can cause a &amp;quot;cache-coherency operation&amp;quot; to be called. This operation is expensive compared to what would happen if the information was in the &#039;right place&#039;. Once misplaced information that causes this problem all the time is identified it can be moved to limit the problem. Anywhere where expensive operations are called a needless number of times this bottleneck can appear.&lt;br /&gt;
&lt;br /&gt;
Another type of bottleneck is from &#039;&#039;&#039;starvation.&#039;&#039;&#039; One such bottleneck is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, causing the kernel to waste CPU time to keep trying. This problem was solved by using a lockless-read. This problem would appear anywhere that a thread must keep trying to execute a thread that cannot execute.&lt;br /&gt;
&lt;br /&gt;
The next type of bottleneck is from &#039;&#039;&#039;course-grained&#039;&#039;&#039; operations. Both example locks eat alot of CPU time, where a finer-grained implementation would eat less. Granularity refers to the execution time of a code segment. The closer a segment is to the speed of an atomic action the finer its granularity. One course-grained bottleneck was the dcache_lock. It ate up some time in normal use, but it was also called in the much more popular dnotify_parent() function. That was an unacceptable state of affairs. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux. Another big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottleneck. Both those examples and others are the result of course granularity. &lt;br /&gt;
&lt;br /&gt;
Bottlenecks can be from &#039;&#039;&#039;multiple problems.&#039;&#039;&#039; One example of that is the multiqueue scheduler from linux 2.4. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time, is was course-grained. While, the rest went into computing and recomputing information in the cache, a needless expensive operation. These problems were fixed by replacing the scheduler. That scheduler was then replaced by a more efficient scheduler [O(1) scheduler].&lt;br /&gt;
&lt;br /&gt;
--[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MAIN POINT 2 Paragraph draft&#039;&#039;&#039; --[[User:Praubic|Praubic]] 00:21, 14 October 2010 (UTC) still in progress and debating &lt;br /&gt;
&lt;br /&gt;
Introduction of Windows NT and OS/2 brought about innovation that provides cheap threading while having expensive processing.  UMS which reflects such design is a recommended mechanism for high performance requirements which handle many threads on multicore systems. A scheduler has to be implemented to manage the UMS threads and decide when they should be run or stopped. This implementation is not desirable for moderate performance systems because concurrent execution of this sort naturally allows for non-intuitive outcomes or behaviors such as race condition which requires careful programming and design choices. The framework used by UMS threading is divided into smaller abstractions depending on the final desired utility. For instance, UMS scheduling can be assigned to each logical processor and thereby creating affinity for related threads to function around one scheduler. This could turn out inefficient depending whether there are many related threads that could end up starving other processes.&lt;br /&gt;
&lt;br /&gt;
Ok for point 2 -&amp;gt; I posted a draft on the essay page but Im not certain as to whether i should talk about fibers since they are also functioning on user space but theyre not UMS. --Praubic&lt;br /&gt;
&lt;br /&gt;
== Design Choices ==&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039; --[[User:Gautam|Gautam]] 00:29, 14 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&lt;br /&gt;
Explaining the four types of synchronization:&lt;br /&gt;
&lt;br /&gt;
*Mutex locks uses only a thread thus giving access to only certain part of the code&lt;br /&gt;
*Using Read/Write synchronization one can gain exclusive write and read access to protected resource but to edit the content it must have the exclusive write lock. Exclusive write lock is only permitted when all the read locks are released&lt;br /&gt;
*Condition variable synchronization protects the thread until the condition becomes true&lt;br /&gt;
*Counting semaphores delivers access to multiple threads.  It has a count which keeps tracks of the number of threads can have concurrent access to the data. Once the limit is reached other threads are blocked until the limit changes.&lt;br /&gt;
[[vG]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
	&lt;br /&gt;
The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads that are in contention), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.   &lt;br /&gt;
	&lt;br /&gt;
The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency. --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3360</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3360"/>
		<updated>2010-10-13T21:43:00Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Log ==&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity&lt;br /&gt;
&lt;br /&gt;
everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
&lt;br /&gt;
More moving for clarity&lt;br /&gt;
added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat&lt;br /&gt;
added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
#What makes threads non-scalable? List the problems&lt;br /&gt;
#What utility do some scalable implementations lack? Why?&lt;br /&gt;
#Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# &lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
#&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3359</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=3359"/>
		<updated>2010-10-13T21:42:48Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Log */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics.&lt;br /&gt;
&lt;br /&gt;
To be more clear: we can limit ourselves from the thread implementations to the thread scalability... ignore the stuff that required for all threads, unless its required for many threads. (I didn&#039;t find any implementations that required hardware)&lt;br /&gt;
&lt;br /&gt;
I would also argue that since OSs have to run on multiple hardwares one cannot guarantee that unique/rare hardware bits will be there. While we can talk about hardware we should limit it to a mention at most. OR we could mention prospective hardware that could help out, but is not yet standard. It depends on whether we want to do &amp;quot;as it is&amp;quot; or &amp;quot;as it might be&amp;quot;&lt;br /&gt;
&lt;br /&gt;
utility of such massively scalable thread implementations. I took this as: what functionality (of single strings) does one have to give up to make threads scalable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Shane:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
In response to the above&#039;s idea on the last part of the question, I would argue that it would enable fast execution because all threads that receive a cache miss would be picked up by the other threads so long as there was enough resources. Also the use of more threads would help synchronize the cache (through sharing) so that it would not miss. Of course this would be if they were assigned to the same task, you cannot sync threads running different applications it just wouldn&#039;t make sense. The only issue with this idea is the software must support this number.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shane Panke &amp;lt;shanepanke@msn.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Log ==&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity&lt;br /&gt;
&lt;br /&gt;
everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
&lt;br /&gt;
More moving for clarity&lt;br /&gt;
added an essay outline at bottom (feel free to change)&lt;br /&gt;
filled in the outline somewhat&lt;br /&gt;
added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
First Draft for essay. Please modify and add on. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Added to the memory management section. --[[User:Hirving|Hirving]] 21:42, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
These are all related ideas.&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I would scrap the first two below, at most mention them...&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
This is a &#039;&#039;&#039;need&#039;&#039;&#039; section 4 below is not &#039;&#039;&#039;needed&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
   4. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Here is an example of a design: (the topic asks for key design choices here is one)&lt;br /&gt;
&lt;br /&gt;
Capriccio is a specific design for scalable user level threads. They are distinct from most designs by being independent of event based mechanisms as well as kernel thread models. They are very good choice for internet servers and this implementations could easily support 100,000 threads. They are characterized by high scalability, efficient stack management and scheduling based on resource usage however the performance is not comparable to event-based systems.--[[User:Praubic|Praubic]] 13:32, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
#What makes threads non-scalable? List the problems&lt;br /&gt;
#What utility do some scalable implementations lack? Why?&lt;br /&gt;
#Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# &lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
#&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable - maybe&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3&amp;lt;br&amp;gt;&lt;br /&gt;
- Certain bottleneck appear in scaled implementations, removing these improves scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;False cache-line sharing&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- xtime lock to a lockless lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 3.5&amp;lt;br&amp;gt;&lt;br /&gt;
Fine-Grain over course-grain&amp;lt;br&amp;gt;&lt;br /&gt;
-- &amp;quot;Big Kernel Lock&amp;quot; &#039;&#039;14&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- dcache_lock &#039;&#039;14&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
Here is the first paragraph that I attempted. Please feel free to change or even delete it from here. &lt;br /&gt;
&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&lt;br /&gt;
--[[User:Praubic|Praubic]] 19:04, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
I suggest that we start filling out the main points of the essay. We can discuss the intricacies as we go along. --[[User:Gautam|Gautam]] 02:46, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/http://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;amp;action=edit&amp;amp;section=7hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;br /&gt;
# [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.1.7621&amp;amp;rep=rep1&amp;amp;type=pdf#page=83 Scalability in linux]&lt;br /&gt;
# [http://hillside.net/plop/2007/papers/PLoP2007_Ahluwalia.pdf This has something to do with our question...]&lt;br /&gt;
# [http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspx Scheduling Priorities (Windows)], Microsoft (23 September 2010) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.novell.com/coolsolutions/feature/14878.html Linux Scheduling Priorities Explained], Novell (11 October 2005) --[[User:Spanke|Shane]]&lt;br /&gt;
# [http://www.ibm.com/developerworks/linux/library/l-completely-fair-scheduler/ Inside the Linux 2.6 Completely Fair Scheduler], IBM (15 December 2009) --[[User:Spanke|Shane]]&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3357</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3357"/>
		<updated>2010-10-13T21:41:25Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable. User threads on the other hand, are mapped to kernel threads by the threads library such as libpthreads. There are a few designs that incorporate it, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools which are yet another mechanism that allows for high scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Taken the liberty to add Praubic&#039;s tentative first para. No changes made as of yet.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
One of the challenges in making an existing code base scalable is the identification and elimination of bottlenecks. When porting Linux to a 64-core NUMA system Ray Bryant and John Hawkes found the following bottlenecks (or just wrote a paper about them):&lt;br /&gt;
&lt;br /&gt;
There can be some instances of misplaced information in the cache that can cause a &amp;quot;cache-coherency operation&amp;quot; to be called. This operation is comparatively expensive. Once misplaced information that causes this problem is identified it can be moved to limit the problem.&lt;br /&gt;
&lt;br /&gt;
There can also be some user-called locks that contribute to bottlenecks. One such lock is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, leading to starvation. This problem was solved by using a lockless-read.&lt;br /&gt;
&lt;br /&gt;
The multiqueue scheduler is the third major bottle neck. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time. Whilem, the rest went into computing and recomputing information in the cache. These problems were fixed by replacing the scheduler,. The scheduler was then replaced by a more efficient scheduler [O(1) scheduler].&lt;br /&gt;
&lt;br /&gt;
The next few bottle necks are related. They&#039;re both examples of course-granularity locks eating CPU time. Granularity refers to the execution time of a code segment. The closer a segment is to the speed of an atomic action the finer its granularity.&lt;br /&gt;
&lt;br /&gt;
One big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottle necks.&lt;br /&gt;
&lt;br /&gt;
The last course-grained bottleneck was the dcache_lock. It ate up a adequate amount of time in normal use. But it was also called in the much more popular dnotify_parent() function, which made it unacceptable. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Choices ==&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
&lt;br /&gt;
	The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads that are in contention), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.   &lt;br /&gt;
&lt;br /&gt;
	The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack. [http://portal.acm.org/citation.cfm?id=75378] [[hirving]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency. --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC) --[[Spanke|Shane]] &#039;&#039;&#039;Revised it a bit, scheduling priority does not use number range in Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3356</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3356"/>
		<updated>2010-10-13T21:35:49Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable. User threads on the other hand, are mapped to kernel threads by the threads library such as libpthreads. There are a few designs that incorporate it, mainly Fibers and UMS (User Mode Scheduling) which allow for very high scalability.  UMS threads have their own context and resources. However, the ability to switch in the user mode makes them more efficient (depending on the application) than Thread Pools which are yet another mechanism that allows for high scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Taken the liberty to add Praubic&#039;s tentative first para. No changes made as of yet.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
One of the challenges in making an existing code base scalable is the identification and elimination of bottlenecks. When porting Linux to a 64-core NUMA system Ray Bryant and John Hawkes found the following bottlenecks (or just wrote a paper about them):&lt;br /&gt;
&lt;br /&gt;
There can be some instances of misplaced information in the cache that can cause a &amp;quot;cache-coherency operation&amp;quot; to be called. This operation is comparatively expensive. Once misplaced information that causes this problem is identified it can be moved to limit the problem.&lt;br /&gt;
&lt;br /&gt;
There can also be some user-called locks that contribute to bottlenecks. One such lock is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, leading to starvation. This problem was solved by using a lockless-read.&lt;br /&gt;
&lt;br /&gt;
The multiqueue scheduler is the third major bottle neck. Altogether, the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time. Whilem, the rest went into computing and recomputing information in the cache. These problems were fixed by replacing the scheduler,. The scheduler was then replaced by a more efficient scheduler [O(1) scheduler].&lt;br /&gt;
&lt;br /&gt;
The next few bottle necks are related. They&#039;re both examples of course-granularity locks eating CPU time. Granularity refers to the execution time of a code segment. The closer a segment is to the speed of an atomic action the finer its granularity.&lt;br /&gt;
&lt;br /&gt;
One big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The preferred method, on Linux NUMA systems, was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottle necks.&lt;br /&gt;
&lt;br /&gt;
The last course-grained bottleneck was the dcache_lock. It ate up a adequate amount of time in normal use. But it was also called in the much more popular dnotify_parent() function, which made it unacceptable. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Choices ==&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. Although, the M:N would implement a complicated library, it would offer advantages in areas of signal handling. A general consensus was that the M:N design was not compatible with the Linux kernel due to such a high cost for implementation. This gave birth to the 1:1 model.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling for use with the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked, no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. This only holds true if the 1-on-1 model is used.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application. Fortunately, new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Thread memory management is an important design choice when attempting to create a large amount of threads in a single process, from creation to maintenance and deallocation. A thread&#039;s data structure is made up of a program counter, a stack and a control block. A control block of a thread is needed for thread management as it contains the state data of a thread. The optimization of this data structure can greatly increase performance in large number of threads. &lt;br /&gt;
&lt;br /&gt;
	The creation of a thread can take place before the process actually requires it to run and wait until a idle processor becomes available to run the thread. Thread overhead (the required memory, CPU time, and read/write time to initialize the thread) is a problem that can arise with this creation process, since it frontloads the process. Another problem with this creation process is that the thread must allocate the memory required for it&#039;s stack at creation because it is expensive to dynamically allocate the stack memory. A way to optimize this creation process for large amounts of threads is to copy the arguments of the thread into it&#039;s control block, this allows for the thread&#039;s stack to be allocated at the thread&#039;s startup (when the thread starts being used) and not when the thread is created. When the thread enters startup it can copy it&#039;s arguments out of it&#039;s control block and allocate it&#039;s memory. Thread creation is ruled by latency (the cost of thread management on the system) and throughput (the rate that the system can create, start, and finish threads that are in contention), and, if thread memory management is done in a serial processing manner, these two factor combine to create a maximum rate of thread creation.   &lt;br /&gt;
&lt;br /&gt;
	The deallocation of a thread can also be optimized for use in increasing the scalability of threads. Storing deallocted stacks and control blocks in a free list allows the process of allocation and deallocation to be a list operation, if they are not stored in a free list then the thread overhead would include finding the correct size of free memory to store the stack.  [[hirving]]&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which is a number ranging from 0 to 31 for Windows and a Red-Black Tree used by the CFS (Completely Fair Scheduler) in Linux. All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  Threads are composed of thread context which internally breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process where the thread resides. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available and it is responsible for allowing high scalability if it is efficiently implemented. For example fibers which are executed entirely in userspace do not require a system call during a switch which highly increases efficiency. --[[User:Praubic|Praubic]] 18:24, 13 October 2010 (UTC) --[[Spanke|Shane]] &#039;&#039;&#039;Revised it a bit, scheduling priority does not use number range in Linux.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3303</id>
		<title>COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_7&amp;diff=3303"/>
		<updated>2010-10-13T18:11:14Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Design Choices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
A thread is an independent task that executes in the same address space as other threads within a single process while sharing data synchronously. Threads require less system resources then concurrent cooperating processes and start much easier therefore there may exist millions of them in a single process. The two major types of threads are kernel and user-mode. Kernel threads are usually considered more heavy and designs that involve them are not very scalable User threads on the other hand are mapped to kernel threads by the threads library such as libpthreads. and there are a few designs that incorporate it mainly Fibers and UMS (User Mode Scheudling) which allow for very high scalability.  UMS threads have their own context and resources however the ability to switch in the user mode makes them more efficient (depending on  application) than Thread Pools which are yet another mechanism that allows for high scalability.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Taken the liberty to add Praubic&#039;s tentative first para. No changes made as of yet.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
One of the challenges in making an existing code base scalable is the identification and elimination of bottlenecks. When porting Linux up to a 64-core NUMA system Ray Bryant and John Hawkes found the following bottlenecks (or just wrote a paper about them).&lt;br /&gt;
&lt;br /&gt;
There can be some instances of misplaced information in the cache that can cause a &amp;quot;cache-coherency operation&amp;quot; to be called. This operation is comparatively expensive. Once misplaced information that causes this problem frequently is identified it can be moved to limit the problem.&lt;br /&gt;
&lt;br /&gt;
There can also be some user-called locks that contribute to bottlenecks. One such lock is the xtime_lock in Linux. Having locking reading prevented writing to the timer value, leading to starvation. This problem was solved by using a lockless-read.&lt;br /&gt;
&lt;br /&gt;
The multiqueue scheduler is a third major bottle neck. Altogether the multiqueue scheduler ate up 25% of the CPU time. It had two problems. The spinlock ate up a fair majority of the CPU time. The rest went into computing and recomputing information in the cache. These problems were fixed by replacing the scheduler, that scheduler was then replaced by a more efficient scheduler [O(1) scheduler].&lt;br /&gt;
&lt;br /&gt;
The next big bottle necks are related. They&#039;re both examples of course-granularity locks eating CPU time. Granularity refers to the execution time of a code segment. The closer a segment is to the speed of an atomic action the finer its granularity.&lt;br /&gt;
&lt;br /&gt;
One big course-grained bottleneck in the system is the &amp;quot;Big Kernel Lock&amp;quot; (BKL) linux&#039;s kernel synchronization control. Waiting for the BKL took up as much as 70% of the CPU time on a system with only 28 cores. The prefered method on Linux NUMA systems was to limit the BKL&#039;s usage. The ext2 and ext3 file systems were replaced with a file system that uses finer-grained locking (XFS), reducing the impact of the bottle necks.&lt;br /&gt;
&lt;br /&gt;
The next course-grained bottleneck was the dcache_lock. It ate up a modest amount of time in normal use. But it was also called in the much more popular dnotify_parent() function, which made it non-acceptable. So the dcache_lock strategy was replaced with a finer-grained strategy from a later implementation of linux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Design Choices ==&lt;br /&gt;
&#039;&#039;&#039;(A) Kernel Threads and User Threads (1:1 vs M:N)&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
This is the most basic design choice. The 1:1 boasts of a slim clean library interface on top of the kernel functions. On the other hand the M:N would implement a complicated library though it would offer advantages in areas of signal handling. However a general consensus was that the M:N design was not compatible with the Linux kernel. Also the cost to implement the same would have been to high. Hence the 1:1 model was decided upon.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(B)Signal Handling&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The kernel implements the POSIX signal handling. The kernel has to handle the multitude of signal masks. Since the signal will only be sent to a thread if it is unblocked no unnecessary interruptions through signals occur. The kernel is also in a much better situation to judge which is the best thread to receive the signal. Obviously this helps only if the 1-on-1 model is used.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(C)Synchronization&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The implementation of the synchronization primitives such as mutexes, read-write locks, conditional variables, semaphores, and barriers requires some form of kernel support. Busy waiting is not an option since threads can have different priorities (beside wasting CPU cycles). The same argument rules out the exclusive use of sched yield. Signals were the only viable solution for the old implementation. Threads would block in the kernel until woken by a signal. This method has severe drawbacks in terms of speed and reliability caused by spurious wakeups and derogation of the quality of the signal handling in the application.Fortunately some new functionality was added to the kernel to implement all kinds of synchronization.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(D)Memory Management&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
One of the goals for the library is to have low startup costs for threads so that scalability is possible.The biggest problem time-wise outside the kernel is the memory needed for the thread data structures, thread-local storage, and the stack. This is to be done by optimizing the memory allocation for the threads.&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;Working on this section&amp;gt; [[hirving]]&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;br&amp;gt;(E)Scheduling Priorities&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
A thread is an entity that can be scheduled according to its scheduling priority which varies from 0 to 31 (lowest to highest). All threads are executed in a time splice assigned to them in round robin fashion and lower priority threads wait until the ones above finish performing their tasks.  All threads are composed of the thread context which basically breaks down into set of machine registers, the kernel and user stack all linked to the address space of the process that the thread reigns in. A context switch occurs as the time splice elapses and an equal (or higher) priority thread becomes available.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2975</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2975"/>
		<updated>2010-10-11T19:58:43Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Group 7 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;For Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
Please rephrase, you`re just restating the question.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics. I think we can safety limit ourselves to software-side only.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Our topic contains 3 parts to it from what i see &lt;br /&gt;
# How is it possible for systems to supports millions of threads or more within a single process? &lt;br /&gt;
# What are the key design choices that make such systems work - &lt;br /&gt;
# and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
We need to find a way to split it between 5 people so everyone focuses primarily on one aspect. &lt;br /&gt;
If you guys don&#039;t mind Id like to discuss the format of our essay. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek &amp;lt;support.tamiltreasure@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Log ==&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity&lt;br /&gt;
&lt;br /&gt;
everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
&lt;br /&gt;
More moving for clarity&lt;br /&gt;
&lt;br /&gt;
added an essay outline at bottom (feel free to change)&lt;br /&gt;
&lt;br /&gt;
filled in the outline somewhat&lt;br /&gt;
&lt;br /&gt;
added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
This is all one idea.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
   6. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
#What makes threads non-scalable? List the problems&lt;br /&gt;
#What utility do some scalable implementations lack? Why?&lt;br /&gt;
#Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# &lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
#&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a good idea to avoid trying to create one (or even N) threads per client request. This approach is classically non-scalable and will definitely cause problems with memory usage or context switching. Using a thread pool approach instead and looking at the incoming requests as tasks for any thread in the pool to handle is more prefarable. The scalability of this approach is then limited by the ideal number of threads in the pool - usually this is related to the number of CPU cores. We want to try to have each thread use exactly 100% of the CPU on a single core - so in the ideal case we would have 1 thread per core, this will reduce context switching to zero. Depending on the nature of the tasks, this might not be possible, maybe the threads have to wait for external data, or read from disk or whatever so you may find that the number of threads is increased by some scaling factor.&lt;br /&gt;
--[[User:Praubic|Praubic]] 18:03, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The question is how to support arbitrarily large numbers of threads, not if that&#039;s a good idea :P -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2974</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2974"/>
		<updated>2010-10-11T19:57:23Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* The Question */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Question ==&lt;br /&gt;
&#039;&#039;&#039;Original:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
How is it possible for systems to supports millions of threads or more within a single process? What are the key design choices that make such systems work - and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;For Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
Please rephrase, you`re just restating the question.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Rannath:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
The question seems to be about number and scalability of threads not the gross mechanics. I think we can safety limit ourselves to software-side only.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Paul:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Our topic contains 3 parts to it from what i see &lt;br /&gt;
# How is it possible for systems to supports millions of threads or more within a single process? &lt;br /&gt;
# What are the key design choices that make such systems work - &lt;br /&gt;
# and how do those choices affect the utility of such massively scalable thread implementations?&lt;br /&gt;
We need to find a way to split it between 5 people so everyone focuses primarily on one aspect. &lt;br /&gt;
If you guys don&#039;t mind Id like to discuss the format of our essay. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Gautam:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
I think the hardware is as relevant as the software. Not all things can be done in software and hardware support is an important factor in most of the solutions to many problems that OS face. My take.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Henry:&amp;lt;br&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
Since the question is about the system as a whole, I think the answer should include both software and hardware support for large amounts of threads. The questions revolves around how a system can handle millions of threads and what are the major factors that allow the system to do it. Also, the last part of the question seems to ask what this amount of threads allows a process to do.&lt;br /&gt;
&lt;br /&gt;
== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Paul Raubic &amp;lt;paul_raubic@hotmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
== Log ==&lt;br /&gt;
Please maintain a log of your activities in the Log Section. So that we can keep track of the evolution of the essay. --[[User:Gautam|Gautam]]&lt;br /&gt;
&lt;br /&gt;
Moved around some info for clarity&lt;br /&gt;
&lt;br /&gt;
everyone should post your interpretation of the question in simplest possible English so we`re on the same page (as someone, maybe me, seems to have the wrong idea about what we`re trying to talk about) &lt;br /&gt;
&lt;br /&gt;
More moving for clarity&lt;br /&gt;
&lt;br /&gt;
added an essay outline at bottom (feel free to change)&lt;br /&gt;
&lt;br /&gt;
filled in the outline somewhat&lt;br /&gt;
&lt;br /&gt;
added questions to the outline for everyone to think on.--[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Add your future activities here&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Facts We have ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far we have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - &#039;&#039;5&#039;&#039;&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - &#039;&#039;3&#039;&#039;&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space. --[[User:Rannath|Rannath]]&lt;br /&gt;
&lt;br /&gt;
Ok, since we are discussing design choices maybe we could also elaborate on the two major types of threads. Here, I already wrote a few lines, source can be found in citation section: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
This is all one idea.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fibers (user mode threads) provide very quick and efficient switching because there is no need for a system call and kernel is oblivious to a switch - allows for millions of user mode threads. ISSUES: Blocking system calls disables all other fibers.&lt;br /&gt;
On the other hand managing threads through the kernel requires context switch (between user and kernel mode) on creation and removal of a thread therefore programs with prodigious number of threads would suffer huge performance hits.--[[User:Praubic|Praubic]] 18:05, 10 October 2010 (UTC)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
User-mode scheduling (UMS) is a light-weight mechanism that applications can use to schedule their own threads. The ability to switch between threads in user mode makes UMS more efficient than thread pools for short-duration work items that require few system calls. [[Paul]]&lt;br /&gt;
&lt;br /&gt;
One implementation of UMS is: combination of N:N and N:M, where the N:N relationship reveals N false processors to the user-space so the user can deal with scheduling on their own. &#039;&#039;5&#039;&#039; -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
#time-division multiplexing&lt;br /&gt;
#threads vs processes&lt;br /&gt;
#I/O Scheduling -[[vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Splitting this off because I don&#039;t think it&#039;s technically part of the answer&amp;lt;br&amp;gt;&lt;br /&gt;
Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we &#039;&#039;&#039;need&#039;&#039;&#039; to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 1:N M:N)&lt;br /&gt;
   2. Signal handling - we might be able to leave this out as it seems some &amp;quot;light weight&amp;quot; threads use no signals&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
   5. Scheduling Priorities (context switching and how it affects the CPU threading process)[[Paul]]&lt;br /&gt;
   6. Examples of systems that require many threads such as mainframe servers or banking client processing.--[[User:Praubic|Praubic]] 17:34, 11 October 2010 (UTC)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things we might want also to cover in the essay (non-essentials here): --[[User:Rannath|Rannath]] 04:43, 10 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Brief History of threading&lt;br /&gt;
   2. examples of attempts at getting absurd numbers of threads (failures)&lt;br /&gt;
   3. other types of threading, including heavy weight and processes&lt;br /&gt;
&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Essay Outline ==&lt;br /&gt;
&lt;br /&gt;
#Thesis is an answer to the question so... that&#039;s the first step, or the last step, we can always present our info and make our thesis match the info.&lt;br /&gt;
#List all questions and points we have about the topic&lt;br /&gt;
&lt;br /&gt;
Questions:&lt;br /&gt;
#What makes threads non-scalable? List the problems&lt;br /&gt;
#What utility do some scalable implementations lack? Why?&lt;br /&gt;
#Just how scalable does a full utility implementation get?&lt;br /&gt;
&lt;br /&gt;
Answers:&lt;br /&gt;
# &lt;br /&gt;
# Signals, portability(maybe) both add overhead which would slow down threads&lt;br /&gt;
#&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Intro (fill in info)&lt;br /&gt;
# Thesis&lt;br /&gt;
# main topics &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Body (made of many main points)&lt;br /&gt;
&lt;br /&gt;
Main Point 1 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- efficient thread creation/destruction is more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- NPTL&#039;s improvements over LinuxThreads- primarily due to lower overhead of creation/destruction &#039;&#039;1&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Main Point 2 -[[Rannath]]&amp;lt;br&amp;gt;&lt;br /&gt;
- UMS &amp;amp; user-space threads are more scalable&amp;lt;br&amp;gt;&lt;br /&gt;
-- context switches are costly &#039;&#039;From class&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
-- blocking locks have lower latency when twinned with a user space scheduler &#039;&#039;8&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is a good idea to avoid trying to create one (or even N) threads per client request. This approach is classically non-scalable and will definitely cause problems with memory usage or context switching. Using a thread pool approach instead and looking at the incoming requests as tasks for any thread in the pool to handle is more prefarable. The scalability of this approach is then limited by the ideal number of threads in the pool - usually this is related to the number of CPU cores. We want to try to have each thread use exactly 100% of the CPU on a single core - so in the ideal case we would have 1 thread per core, this will reduce context switching to zero. Depending on the nature of the tasks, this might not be possible, maybe the threads have to wait for external data, or read from disk or whatever so you may find that the number of threads is increased by some scaling factor.&lt;br /&gt;
--[[User:Praubic|Praubic]] 18:03, 11 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The question is how to support arbitrarily large numbers of threads, not if that&#039;s a good idea :P -[[Rannath]]&lt;br /&gt;
&lt;br /&gt;
Link the Main points to the thesis&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Conclusion&lt;br /&gt;
# restate info&lt;br /&gt;
# affirmation of thesis&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
# Short history of threads in Linux and new implementation of them. [http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ] [[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
# This paper discusses the design choices [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.93.6590&amp;amp;rep=rep1&amp;amp;type=pdf Native POSIX Threads] [[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
# lightweight threads vs kernel threads [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf PicoThreads: Lightweight Threads in Java] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# [http://eigenclass.org/hiki/lightweight-threads-with-lwt Eigenclass Comparing lightweight threads] --[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
# A lightwight thread implementation for Unix [http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf Implementing light weight threads] --[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC) [[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC)&lt;br /&gt;
#Not in this group, but I thought that this paper was excellent: [http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf Qthreads: An API for Programming with Millions of Lightweight Threads]&lt;br /&gt;
# Difference between single and multi threading [http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process] [[vG]]&lt;br /&gt;
# [http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler] --[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
# Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;br /&gt;
# This site provides in-depth info about threads, threads-pooling, scheduling: http://msdn.microsoft.com/en-us/library/ms684841(VS.85).aspx [[Paul]]&lt;br /&gt;
# Here is another site that outlines THREAD designs and techniques: http://people.csail.mit.edu/rinard/osnotes/h2.html [[Paul]]&lt;br /&gt;
# [http://www.cosc.brocku.ca/Offerings/4P13/slides/threads.ppt Interesting presentation: really worth checking out]  [[Paul]]&lt;br /&gt;
# KERNEL vs USERMODE http://www.wordiq.com/definition/Thread_(computer_science)--[[User:Praubic|Praubic]] 18:06, 10 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2526</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2526"/>
		<updated>2010-10-07T21:24:45Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
#Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
Short history of threads in Linux and new implementation of them.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading] --[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2525</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2525"/>
		<updated>2010-10-07T21:24:02Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
#Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
Short history of threads in Linux and new implementation of them.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading]--[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2524</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2524"/>
		<updated>2010-10-07T21:21:53Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
#Multithreading generally occurs by time-division multiplexing. It makes it possible for the processor to switch between different threads but it happens so fast that the user sees it as it is running at the same time. [[User:vG]]&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
A Webpage. However found it really interesting.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading]--[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2521</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2521"/>
		<updated>2010-10-07T20:05:09Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Essay Rough */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel &lt;br /&gt;
   1. Program Thread manipulation through system calls --[[User:Hirving|Hirving]] 20:05, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
A Webpage. However found it really interesting.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading]--[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2519</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2519"/>
		<updated>2010-10-07T19:58:54Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Sources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel (?)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
A Webpage. However found it really interesting.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Research Group working on Simultaneous Multithreading [http://www.cs.washington.edu/research/smt/ Simultaneous Multithreading]--[[User:Hirving|Hirving]] 19:58, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2517</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2517"/>
		<updated>2010-10-07T19:55:56Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Essay Rough */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel (?)&lt;br /&gt;
&lt;br /&gt;
(C)Hardware --[[User:Hirving|Hirving]] 19:55, 7 October 2010 (UTC)&lt;br /&gt;
   1. Simultaneous Multithreading&lt;br /&gt;
   2. Multi-core processors&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
A Webpage. However found it really interesting.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2516</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 7</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_7&amp;diff=2516"/>
		<updated>2010-10-07T19:46:48Z</updated>

		<summary type="html">&lt;p&gt;Hirving: /* Group 7 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Group 7 ==&lt;br /&gt;
&lt;br /&gt;
Let us start out by listing down our names and email id (preffered). &lt;br /&gt;
&lt;br /&gt;
Gautam Akiwate         &amp;lt;gautam.akiwate@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Patrick Young(rannath) &amp;lt;rannath@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
vG Vivek - support.tamiltreasure@gmail.com&lt;br /&gt;
&lt;br /&gt;
Henry Irving &amp;lt;sens.henry@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
Raw info should have some indication of where you got it for citation.&lt;br /&gt;
&lt;br /&gt;
Claim your info so we don&#039;t need to dig for who got what when we need clarification.&lt;br /&gt;
&lt;br /&gt;
Feel free to provide info for or edit someone else&#039;s info, just keep their signature so we can discuss changes&lt;br /&gt;
&lt;br /&gt;
sign changes (once) preferably without time stamps Ex: -Rannath&lt;br /&gt;
&lt;br /&gt;
== Essay Rough ==&lt;br /&gt;
Start by placing the info here so we can sort through it. I&#039;m going to go into full research/essay writing mode on Sunday if there isn&#039;t enough here.&lt;br /&gt;
&lt;br /&gt;
So far I have:&lt;br /&gt;
Three design choices I&#039;ve seen:&lt;br /&gt;
# Smallest possible footprint per-thread (being extremely light weight) - from everywhere --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# least number (none if at all possible) of context switches per-thread - some linux implementation --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
# use of a &amp;quot;thread pool&amp;quot; - java picothreads article --[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
The idea is to reduce processor time and storage needed per-thread so you can have more in the same amount of space.--[[User:Rannath|Rannath]] 00:28, 7 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Things that we need to cover in the essay:--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&amp;lt;br&amp;gt;&lt;br /&gt;
(A)Design Decisions &lt;br /&gt;
   1. Type of threading (1:1 M:N)&lt;br /&gt;
   2. Signal handling&lt;br /&gt;
   3. Synchronisation&lt;br /&gt;
   4. Memory Handling&lt;br /&gt;
(B)Kernel (?)&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
&lt;br /&gt;
A Webpage. However found it really interesting.&lt;br /&gt;
[http://www.drdobbs.com/open-source/184406204;jsessionid=3MRSO5YMO1QVRQE1GHRSKHWATMY32JVN NPTL: The New Implementation of Threads for Linux ]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:18, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
This paper discusses the design choices [http://people.redhat.com/drepper/nptl-design.pdf. Native POSIX Threads]&lt;br /&gt;
[[User:Gautam|Gautam]] 22:11, 5 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
A paper with low-footprint(lightweight) threads vs kernel threads (for Java :( )&lt;br /&gt;
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.32.9043&amp;amp;rep=rep1&amp;amp;type=pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a comparison of lightweight threads&lt;br /&gt;
http://eigenclass.org/hiki/lightweight-threads-with-lwt&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:23, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
a lightwight thread implementation for Unix&lt;br /&gt;
http://www.usenix.org/publications/library/proceedings/sa92/stein.pdf&lt;br /&gt;
--[[User:Rannath|Rannath]] 00:49, 6 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[User:Gbint|Gbint]] 19:50, 5 October 2010 (UTC) Not in this group, but I thought that this paper was excellent: http://www.sandia.gov/~rcmurph/doc/qt_paper.pdf&lt;br /&gt;
&lt;br /&gt;
Difference between single and multi threading&lt;br /&gt;
http://wiki.answers.com/Q/Single_threaded_Process_and_Multi-threaded_Process&lt;br /&gt;
[[vG]&lt;br /&gt;
&lt;br /&gt;
[http://hdl.handle.net/1853/6804 Implementation of Scalable Blocking Locks using an Adaptative Thread Scheduler]&lt;br /&gt;
--[[User:Gautam|Gautam]] 19:35, 7 October 2010 (UTC)&lt;/div&gt;</summary>
		<author><name>Hirving</name></author>
	</entry>
</feed>