{"action":"created","issue":{"url":"https://api.github.com/repos/byshen/cse221notes/issues/2","repository_url":"https://api.github.com/repos/byshen/cse221notes","labels_url":"https://api.github.com/repos/byshen/cse221notes/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/byshen/cse221notes/issues/2/comments","events_url":"https://api.github.com/repos/byshen/cse221notes/issues/2/events","html_url":"https://github.com/byshen/cse221notes/issues/2","id":380313113,"node_id":"MDU6SXNzdWUzODAzMTMxMTM=","number":2,"title":"scheduler activations","user":{"login":"byshen","id":10740793,"node_id":"MDQ6VXNlcjEwNzQwNzkz","avatar_url":"https://avatars0.githubusercontent.com/u/10740793?v=4","gravatar_id":"","url":"https://api.github.com/users/byshen","html_url":"https://github.com/byshen","followers_url":"https://api.github.com/users/byshen/followers","following_url":"https://api.github.com/users/byshen/following{/other_user}","gists_url":"https://api.github.com/users/byshen/gists{/gist_id}","starred_url":"https://api.github.com/users/byshen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byshen/subscriptions","organizations_url":"https://api.github.com/users/byshen/orgs","repos_url":"https://api.github.com/users/byshen/repos","events_url":"https://api.github.com/users/byshen/events{/privacy}","received_events_url":"https://api.github.com/users/byshen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-13T16:30:12Z","updated_at":"2018-11-13T16:49:14Z","closed_at":null,"author_association":"OWNER","body":"![](https://ws3.sinaimg.cn/large/006tNbRwly1fx6wbidhl8j31kw0wz4hx.jpg)\r\n\r\n- ”classic\" - e.g ls, short small process\r\n- \"one user kernel\" - e.g. JVM. many user thread stacks , each corresponding to one kernel thread stack, but all these kernel stacks are in the same kernel address space (this is not efficient because OS DOES not know which of next optimal kernel thread to run on, it is actually determined by the corresponding user thread)\r\n- User level threads (libraries) - e.g. pthreads\r\n- \"M - N\" Many user kernels,  M user level threads, N kernel stacks (on N cores), just put M into the ready queue, when kernel threads are available to run on. (This still has the drawback of blocking the kernel thread by an invisible user thread)\r\n-----\r\nUser:\r\n- Lightweight => fast => just procedure calls\r\n- invisible to OS, only know the kernel thread it is in => bad scheduling (e.g. reading from disk, a thread block entire theads)\r\n\r\nKernel\r\n- system calls => more expensive to cross domains\r\n- obvious\r\n- physical parallelism => each processor has one kernel thread to run on\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/byshen/cse221notes/issues/comments/438345030","html_url":"https://github.com/byshen/cse221notes/issues/2#issuecomment-438345030","issue_url":"https://api.github.com/repos/byshen/cse221notes/issues/2","id":438345030,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODM0NTAzMA==","user":{"login":"byshen","id":10740793,"node_id":"MDQ6VXNlcjEwNzQwNzkz","avatar_url":"https://avatars0.githubusercontent.com/u/10740793?v=4","gravatar_id":"","url":"https://api.github.com/users/byshen","html_url":"https://github.com/byshen","followers_url":"https://api.github.com/users/byshen/followers","following_url":"https://api.github.com/users/byshen/following{/other_user}","gists_url":"https://api.github.com/users/byshen/gists{/gist_id}","starred_url":"https://api.github.com/users/byshen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byshen/subscriptions","organizations_url":"https://api.github.com/users/byshen/orgs","repos_url":"https://api.github.com/users/byshen/repos","events_url":"https://api.github.com/users/byshen/events{/privacy}","received_events_url":"https://api.github.com/users/byshen/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T16:49:14Z","updated_at":"2018-11-13T16:49:14Z","author_association":"OWNER","body":"Scheduler activations (SCHED ACT)\r\n- vessel \r\n- hold state of the blocked thread.\r\n\r\n\"upcall\" - call into the user address space to let the user level scheduler know that there are cores available. It suspend one schedact A to let user scheduler to know that one schedact B (A,B belongs the same process) is available. Then the scheduler decides next schedact to run.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"byshen"}}