{"action":"created","comment":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/44778572","id":44778572,"diff_hunk":"@@ -0,0 +1,21 @@\n+1. Time comparison\n+\n+(1) Uncorrelated (random)\n+Serial uncorrelated: 0.255743026733 seconds\n+Fine grained uncorrelated: 6.3752450943 seconds\n+Medium grained uncorrelated: 6.8746650219 seconds\n+\n+(2) Correlated (N=10)\n+Serial correlated: 0.330317974091 seconds\n+Fine grained correlated: 6.20790791512 seconds\n+Medium grained correlated: 5.56719088554 seconds\n+\n+When data exchange was correlated, we could learn that Medium grained locks were showing better performance compared to the Fine grained locks. This is because, since there are more threads sharing the locks, less overhead for waiting those locks would result such better performance.\n+\n+2. good N value :\n+I modified P2.py code, to have experiment with various N values and I plotted a graph for comparison.\n+\n+When we see the graph, it is hard to find good N value for uncorrelated case. Since uncorrelated case has exchanging data at random places, therefore, this case always requires to use two different locks for dest list and src list.\n+\n+However, when we see correlated case, we can infer that when N=20, the time required to do this task was minimum value. This is because when 20 adjacent items share the lock, the highest probability of distance between two exchanging itmes is 10 (which means distance will make normal distribution with mean at 10, and decrease probability as N value varies). Therefore, half of cases(which has distance 1~10) will share the lock and half of cases (which has distance 11~20 cases) will use separate locks.\n+I think sharing those two cases will balance the overhead caused by bottleneck of waiting a certain lock, or advantage caused by using less locks compared to fine-grained locks.","path":"HW2/P2/P2.txt","position":21,"original_position":21,"commit_id":"dc3b8a7435c42acbddcd94616988188fd9e9ce67","original_commit_id":"dc3b8a7435c42acbddcd94616988188fd9e9ce67","user":{"login":"thereisnoquarter","id":2105882,"avatar_url":"https://avatars.githubusercontent.com/u/2105882?v=3","gravatar_id":"","url":"https://api.github.com/users/thereisnoquarter","html_url":"https://github.com/thereisnoquarter","followers_url":"https://api.github.com/users/thereisnoquarter/followers","following_url":"https://api.github.com/users/thereisnoquarter/following{/other_user}","gists_url":"https://api.github.com/users/thereisnoquarter/gists{/gist_id}","starred_url":"https://api.github.com/users/thereisnoquarter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thereisnoquarter/subscriptions","organizations_url":"https://api.github.com/users/thereisnoquarter/orgs","repos_url":"https://api.github.com/users/thereisnoquarter/repos","events_url":"https://api.github.com/users/thereisnoquarter/events{/privacy}","received_events_url":"https://api.github.com/users/thereisnoquarter/received_events","type":"User","site_admin":false},"body":"I don't know what this last sentence means.","created_at":"2015-11-13T12:49:49Z","updated_at":"2015-11-13T12:49:49Z","html_url":"https://github.com/harvard-cs205/cs205-homework/pull/355#discussion_r44778572","pull_request_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355","_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/44778572"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/355#discussion_r44778572"},"pull_request":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355"}}},"pull_request":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355","id":49781631,"html_url":"https://github.com/harvard-cs205/cs205-homework/pull/355","diff_url":"https://github.com/harvard-cs205/cs205-homework/pull/355.diff","patch_url":"https://github.com/harvard-cs205/cs205-homework/pull/355.patch","issue_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/355","number":355,"state":"open","locked":false,"title":"Hw2","user":{"login":"jeewon-hwang","id":14130448,"avatar_url":"https://avatars.githubusercontent.com/u/14130448?v=3","gravatar_id":"","url":"https://api.github.com/users/jeewon-hwang","html_url":"https://github.com/jeewon-hwang","followers_url":"https://api.github.com/users/jeewon-hwang/followers","following_url":"https://api.github.com/users/jeewon-hwang/following{/other_user}","gists_url":"https://api.github.com/users/jeewon-hwang/gists{/gist_id}","starred_url":"https://api.github.com/users/jeewon-hwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeewon-hwang/subscriptions","organizations_url":"https://api.github.com/users/jeewon-hwang/orgs","repos_url":"https://api.github.com/users/jeewon-hwang/repos","events_url":"https://api.github.com/users/jeewon-hwang/events{/privacy}","received_events_url":"https://api.github.com/users/jeewon-hwang/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-05T04:35:00Z","updated_at":"2015-11-13T12:49:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10acf0e4ac6665132261cf10062396e4bbbd7bc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355/commits","review_comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355/comments","review_comment_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/355/comments","statuses_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/dc3b8a7435c42acbddcd94616988188fd9e9ce67","head":{"label":"jeewon-hwang:HW2","ref":"HW2","sha":"dc3b8a7435c42acbddcd94616988188fd9e9ce67","user":{"login":"jeewon-hwang","id":14130448,"avatar_url":"https://avatars.githubusercontent.com/u/14130448?v=3","gravatar_id":"","url":"https://api.github.com/users/jeewon-hwang","html_url":"https://github.com/jeewon-hwang","followers_url":"https://api.github.com/users/jeewon-hwang/followers","following_url":"https://api.github.com/users/jeewon-hwang/following{/other_user}","gists_url":"https://api.github.com/users/jeewon-hwang/gists{/gist_id}","starred_url":"https://api.github.com/users/jeewon-hwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeewon-hwang/subscriptions","organizations_url":"https://api.github.com/users/jeewon-hwang/orgs","repos_url":"https://api.github.com/users/jeewon-hwang/repos","events_url":"https://api.github.com/users/jeewon-hwang/events{/privacy}","received_events_url":"https://api.github.com/users/jeewon-hwang/received_events","type":"User","site_admin":false},"repo":{"id":42030960,"name":"cs205-homework","full_name":"jeewon-hwang/cs205-homework","owner":{"login":"jeewon-hwang","id":14130448,"avatar_url":"https://avatars.githubusercontent.com/u/14130448?v=3","gravatar_id":"","url":"https://api.github.com/users/jeewon-hwang","html_url":"https://github.com/jeewon-hwang","followers_url":"https://api.github.com/users/jeewon-hwang/followers","following_url":"https://api.github.com/users/jeewon-hwang/following{/other_user}","gists_url":"https://api.github.com/users/jeewon-hwang/gists{/gist_id}","starred_url":"https://api.github.com/users/jeewon-hwang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeewon-hwang/subscriptions","organizations_url":"https://api.github.com/users/jeewon-hwang/orgs","repos_url":"https://api.github.com/users/jeewon-hwang/repos","events_url":"https://api.github.com/users/jeewon-hwang/events{/privacy}","received_events_url":"https://api.github.com/users/jeewon-hwang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeewon-hwang/cs205-homework","description":"","fork":true,"url":"https://api.github.com/repos/jeewon-hwang/cs205-homework","forks_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/forks","keys_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/teams","hooks_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/hooks","issue_events_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/issues/events{/number}","events_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/events","assignees_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/assignees{/user}","branches_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/branches{/branch}","tags_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/tags","blobs_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/languages","stargazers_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/stargazers","contributors_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/contributors","subscribers_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/subscribers","subscription_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/subscription","commits_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/contents/{+path}","compare_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/merges","archive_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/downloads","issues_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/issues{/number}","pulls_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/labels{/name}","releases_url":"https://api.github.com/repos/jeewon-hwang/cs205-homework/releases{/id}","created_at":"2015-09-07T04:17:56Z","updated_at":"2015-09-07T04:17:58Z","pushed_at":"2015-11-05T04:32:26Z","git_url":"git://github.com/jeewon-hwang/cs205-homework.git","ssh_url":"git@github.com:jeewon-hwang/cs205-homework.git","clone_url":"https://github.com/jeewon-hwang/cs205-homework.git","svn_url":"https://github.com/jeewon-hwang/cs205-homework","homepage":null,"size":827,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"harvard-cs205:master","ref":"master","sha":"6706ee708d97c656caa08b284792b3eee63892cf","user":{"login":"harvard-cs205","id":13456002,"avatar_url":"https://avatars.githubusercontent.com/u/13456002?v=3","gravatar_id":"","url":"https://api.github.com/users/harvard-cs205","html_url":"https://github.com/harvard-cs205","followers_url":"https://api.github.com/users/harvard-cs205/followers","following_url":"https://api.github.com/users/harvard-cs205/following{/other_user}","gists_url":"https://api.github.com/users/harvard-cs205/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-cs205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-cs205/subscriptions","organizations_url":"https://api.github.com/users/harvard-cs205/orgs","repos_url":"https://api.github.com/users/harvard-cs205/repos","events_url":"https://api.github.com/users/harvard-cs205/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-cs205/received_events","type":"Organization","site_admin":false},"repo":{"id":40614104,"name":"cs205-homework","full_name":"harvard-cs205/cs205-homework","owner":{"login":"harvard-cs205","id":13456002,"avatar_url":"https://avatars.githubusercontent.com/u/13456002?v=3","gravatar_id":"","url":"https://api.github.com/users/harvard-cs205","html_url":"https://github.com/harvard-cs205","followers_url":"https://api.github.com/users/harvard-cs205/followers","following_url":"https://api.github.com/users/harvard-cs205/following{/other_user}","gists_url":"https://api.github.com/users/harvard-cs205/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-cs205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-cs205/subscriptions","organizations_url":"https://api.github.com/users/harvard-cs205/orgs","repos_url":"https://api.github.com/users/harvard-cs205/repos","events_url":"https://api.github.com/users/harvard-cs205/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-cs205/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/harvard-cs205/cs205-homework","description":"","fork":false,"url":"https://api.github.com/repos/harvard-cs205/cs205-homework","forks_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/forks","keys_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/teams","hooks_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/hooks","issue_events_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/events{/number}","events_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/events","assignees_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/assignees{/user}","branches_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/branches{/branch}","tags_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/tags","blobs_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/languages","stargazers_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/stargazers","contributors_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/contributors","subscribers_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/subscribers","subscription_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/subscription","commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/contents/{+path}","compare_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/merges","archive_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/downloads","issues_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues{/number}","pulls_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/labels{/name}","releases_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/releases{/id}","created_at":"2015-08-12T17:18:15Z","updated_at":"2015-10-21T19:21:28Z","pushed_at":"2015-11-12T15:02:55Z","git_url":"git://github.com/harvard-cs205/cs205-homework.git","ssh_url":"git@github.com:harvard-cs205/cs205-homework.git","clone_url":"https://github.com/harvard-cs205/cs205-homework.git","svn_url":"https://github.com/harvard-cs205/cs205-homework","homepage":null,"size":162893,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":348,"forks":99,"open_issues":348,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/355"},"issue":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/355"},"comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/355/comments"},"review_comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355/comments"},"review_comment":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/355/commits"},"statuses":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/dc3b8a7435c42acbddcd94616988188fd9e9ce67"}}}}