Added content in post and about

* Add xv6 debug
* Fix paper links in about me page
This commit is contained in:
2021-10-12 19:07:27 -04:00
parent 1cc025b864
commit b8ee3904d2
25 changed files with 370 additions and 270 deletions
@@ -1 +1 @@
I""{"source"=>"/Users/pengzhan/Github/codersherlock.github.io", "destination"=>"/Users/pengzhan/Github/codersherlock.github.io/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/archivers/:title"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"/archivers/:title", "paginate_path"=>"page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge"}, "title"=>"Stop Talking, Start Doing - 停止空想,开始行动", "author"=>"Pengzhan Hao", "avatar"=>"/static/avatar.jpg", "email"=>"haopengzhan@gmail.com", "description"=>"My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.\n", "url"=>"https://codersherlock.github.com/", "github_username"=>"codersherlock", "disqus_shortname"=>"codersherlockblog", "gems"=>["jekyll-paginate", "jekyll-gist", "jemoji"], "paginate"=>5, "serving"=>false}:ET I"{"source"=>"/home/pengzhan/Github/CoderSherlock.github.io", "destination"=>"/home/pengzhan/Github/CoderSherlock.github.io/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/archivers/:title"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>[], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"/archivers/:title", "paginate_path"=>"page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge"}, "title"=>"Stop Talking, Start Doing", "author"=>"Pengzhan Hao", "avatar"=>"/static/avatar.jpg", "email"=>"haopengzhan@gmail.com", "description"=>"My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.\n", "url"=>"https://codersherlock.github.com/", "github_username"=>"codersherlock", "disqus_shortname"=>"codersherlockblog", "gems"=>["jekyll-paginate", "jekyll-gist", "jemoji"], "paginate"=>5, "serving"=>false}:ET
@@ -1,100 +0,0 @@
I"Õ<h1 id="pengzhan-hao">Pengzhan Hao</h1>
<p><strong>Position:</strong>         Research Assistant in MOSLab<br />
<strong>Education:</strong>      Doctoral Student of SUNY at Binghamton<br />
<strong>Email:</strong>             phao3 at binghamton dot edu<br />
<strong>Address:</strong><br />
                        MOSLab, H-6 Engineering Building<br />
                        Binghamton University<br />
                        4400 Vestal Parkway East<br />
                        Binghamton, NY 13902</p>
<h2 id="education">Education</h2>
<ul>
<li>2017.08 -                 Ph.D. in Computer Science, Binghamton University, NY, USA</li>
<li>2015.08 - 2017.05   M.E in Computer Science, Binghamton University, NY, USA</li>
<li>2011.08 - 2015.06   B.E in Software Engineering, Beihang University, Beijing, China</li>
</ul>
<h2 id="experience">Experience</h2>
<ul>
<li>2013.10 - 2014.09   <strong><em>Research Intern</em></strong> @ Advanced computer application technology engineering Research Center, Ministry of Education, China
<ul>
<li>Analyzed real-time routing problem and reliable algorithm design</li>
<li>Led and developed a routing system mostly backend server program</li>
<li>Participated in vehicle internet research</li>
<li>Supervised by <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=105c1bfe787-4d33-48eb-a05f-e2a6f3934216&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Juhua Pu</a>, <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=3063cc45-7b8b-441a-86b2-3a4f59c26bd40&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Zhang Xiong</a>, Related project: <a href="https://www.microsoft.com/en-us/research/project/urban-computing/">Urban Computing</a></li>
</ul>
</li>
<li>2013.10 - 2014.01   <strong><em>Research Intern</em></strong> @ Institute of Software, Chinese Academy of Sciences, China
<ul>
<li>Analyzed mobile OS kernel and Localized portion with C language</li>
<li>Supervised by <a href="http://soft.buaa.edu.cn/info/1060/1307.htm">Cangzhou Yuan</a></li>
</ul>
</li>
</ul>
<h2 id="research">Research</h2>
<ul>
<li>Graduate
<ul>
<li>Edge Computing
<ul>
<li>Network Performance</li>
</ul>
</li>
<li>Vitrualization</li>
</ul>
</li>
<li>Undergraduate
<ul>
<li>Urban Comuputing
<ul>
<li>Routing algorithm and system</li>
<li>Real-time data processing</li>
</ul>
</li>
<li>Mobile Operating System
<ul>
<li>Kernel Analysis</li>
<li>Locolization</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2 id="publications">Publications</h2>
<ul>
<li>
<p><strong><a href="">A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services </a></strong> <br />
Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang <br />
The 37th IEEE International Conference on Computer Communications (<strong>IEEE INFOCOM</strong>)<br />
Honolulu, HI, USA, 2018.</p>
</li>
<li>
<p><strong><a href="/static/2018-02/a7-hao.pdf">EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services</a></strong> <strong>[<a href="">slide</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 2nd ACM/IEEE Symposium on Edge Computing (<strong>ACM/IEEE SEC</strong>)<br />
San Jose, CA, USA, 2017.</p>
</li>
<li>
<p><strong><a href="/static/2017-07/p169-zhang.pdf">Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach</a></strong><br />
Xin Zhang, Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br />
Niagara Falls, NY, USA, 2017.</p>
</li>
<li>
<p><strong><a href="/static/2017-07/p163-hao.pdf">Poster: EPS - Edge-hosted Personal Services for Mobile Users</a> [<a href="/static/2017-07/eps_poster.pdf">poster</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br />
Niagara Falls, NY, USA, 2017.</p>
</li>
</ul>
<h2 id="fun">Fun</h2>
<ul>
<li>My <a href="/timeline/index.html">Timeline</a></li>
</ul>
:ET
@@ -1,19 +0,0 @@
I"± <p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
<h2 id="xv6-systemcall">Xv6 Systemcall</h2>
<p>To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file <em>user.h</em>.</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="nf">function</span> <span class="p">(</span><span class="kt">void</span><span class="p">);</span>
</code></pre></div></div>
<p>This interface-like function will then pass the function name, in this case function, to <em>usys.S</em>. When using user mode function in programs, <em>usys.S</em> will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from <em>syscall.c</em> and determining whether this system call is available. We must define same name system function and add it into <em>syscall.h</em> and <em>syscall.c</em>.</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#define SYS_function ## // ## is the system call number
</span><span class="p">[</span><span class="n">SYS_function</span><span class="p">]</span> <span class="n">sys_function</span> <span class="c1">// real system function name</span>
<span class="k">extern</span> <span class="kt">int</span> <span class="nf">sys_function</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="c1">// real system function declaration</span>
</code></pre></div></div>
<p>After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.</p>
<p>Sometimes, we need to pass variables among system calls. In this case, variables’ values are not necessary and even can’t be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process’ stack. In file <em>syscall.c</em>, multiple functions are provided to get these variables from the process. I won’t waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.</p>
:ET
@@ -1,2 +0,0 @@
I"¤<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p>
:ET
+1 -1
View File
@@ -6,7 +6,7 @@
# 'jekyll serve'. If you change this file, please restart the server process. # 'jekyll serve'. If you change this file, please restart the server process.
# Site settings # Site settings
title: Stop Talking, Start Doing - 停止空想,开始行动 title: Stop Talking, Start Doing
author: Pengzhan Hao author: Pengzhan Hao
avatar: "/static/avatar.jpg" avatar: "/static/avatar.jpg"
email: haopengzhan@gmail.com email: haopengzhan@gmail.com
+1 -1
View File
@@ -25,5 +25,5 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
+62 -5
View File
@@ -5,10 +5,12 @@ date: 2017-07-28 14:56:55 -0400
categories: xv6 categories: xv6
--- ---
I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system. In this post, you will learn a few basic concepts of xv6. Learning path will be closed coupled to first project assignment I gave when I assisted in teaching OS classes.
Understand system call and know how to implement a simple one will be coved as the first half.
In the second half of this post, I will discuss a little bit more on how to debug xv6 using gdb.
## Xv6 Systemcall ## Xv6 Systemcall
To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file *user.h*. To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file *user.h*.
~~~~c ~~~~c
@@ -18,11 +20,66 @@ void function (void);
This interface-like function will then pass the function name, in this case function, to *usys.S*. When using user mode function in programs, *usys.S* will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from *syscall.c* and determining whether this system call is available. We must define same name system function and add it into *syscall.h* and *syscall.c*. This interface-like function will then pass the function name, in this case function, to *usys.S*. When using user mode function in programs, *usys.S* will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from *syscall.c* and determining whether this system call is available. We must define same name system function and add it into *syscall.h* and *syscall.c*.
~~~~c ~~~~c
#define SYS_function ## // ## is the system call number #define SYS_function ## // ## is the system call number
[SYS_function] sys_function // real system function name [SYS_function] sys_function // real system function name
extern int sys_function(void); // real system function declaration extern int sys_function(void); // real system function declaration
~~~~ ~~~~
After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well. After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.
Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file *syscall.c*, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles. Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file *syscall.c*, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.
## Debug xv6 with gdb
Please make sure that you have used gdb before.
If you never used gdb, you may write a simple 50-100 lines c code and practice how to use gdb first.
- [GDB Manual](https://sourceware.org/gdb/current/onlinedocs/gdb/)
- [GDB cheatsheet (pdf)](https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf)
To make sure xv6 gdb enabled, please check if *.gdbinit.tmpl* file exist.
This file is used for generate *.gdbinit* file which you can late consider it as a configuration for gdb.
Before running the xv6 instance in QEMU, one more thing you need to know is that using gdb to debug xv6 must be attached remotely.
This is because xv6 was running within QEMU, and emulator is virtually gapped from the host device.
Later when you start debugging, QEMU will open a gdb server to let gdb client connect to.
Once you want to start, using following command to compile and run xv6
~~~~bash
$ make qemu-nox-gdb
*** Now run 'gdb'.
qemu-system-i386 -nographic -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 7
~~~~
At this moment, it feels xv6 was stuck, this is because QEMU is ready to be connected by the gdb client.
You may use the *.gdbinit* to automatically finish this remote connection by simple typein following command in another terminal.
~~~~bash
$ gdb -x .gdbinit
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
...
The target architecture is assumed to be i8086
[f000:fff0] 0xffff0: ljmp $0x3630,$0xf000e05b
0x0000fff0 in ?? ()
+ symbol-file kernel
warning: A handler for the OS ABI "GNU/Linux" is not built into this configuration
of GDB. Attempting to continue with the default i8086 settings.
(gdb)
~~~~
Now within this gdb client shell, type 'c' to continue the xv6, and you will see xv6 start execution in the first terminal.
At this moment, you may add breakpoints to your code to see if your code is correctly implemented or not.
**One more thing**, if you open *.gdbinit* file, you'll find that it by default connect to a localhost target.
If you are working on some other environment that target and client were not placed in the same device, change the localhost to ip address correspondingly.
Using ssh may connect to different physical devices under same domain name, this is because load balancer were used. To check ip address, search command *ip*.
~~~~bash
target remote localhost:28467
# target remote [ip-addr]:28467
~~~~
@@ -4,7 +4,12 @@ title: "Generate Word Cloud Figures with Chinese-Tokenization and WordCloud pyt
date: 2020-09-15 22:00:14 -0400 date: 2020-09-15 22:00:14 -0400
categories: visualization categories: visualization
--- ---
<img src="/static/2020-09/2020-06-28.png" height="350">
Let's generate a word cloud like this.
Don't understand the language is not a big deal.
If your written language is based on latin alphabet(or other language has space between words), skip tokenization.
<img src="/static/2020-09/2020-06-28.png" height="250">
## Background ## Background
+5 -5
View File
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Page Not Found « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Page Not Found « Stop Talking, Start Doing</title>
<meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
"> ">
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//404.html"> <link rel="canonical" href="https://codersherlock.github.com//404.html">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,13 +39,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -118,7 +118,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+56 -42
View File
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>About Me « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>About « Stop Talking, Start Doing</title>
<meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
"> ">
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//about/"> <link rel="canonical" href="https://codersherlock.github.com//about/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,13 +39,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -70,15 +70,15 @@
<div class="post"> <div class="post">
<header class="post-header"> <header class="post-header">
<h1 class="post-title">About Me</h1> <h1 class="post-title">About</h1>
</header> </header>
<article class="post-content"> <article class="post-content">
<h1 id="pengzhan-hao">Pengzhan Hao</h1> <h1 id="pengzhan-hao">Pengzhan Hao</h1>
<p><strong>Position:</strong>         Research Assistant in MOSLab<br /> <p><strong>Position:</strong>         Research Assistant in MOSLab<br />
<strong>Education:</strong>      Doctoral Student of SUNY at Binghamton<br /> <strong>Education:</strong>      Doctoral Student of SUNY at Binghamton<br />
<strong>Email:</strong>             phao3 at binghamton dot edu<br /> <strong>Email:</strong>             phao3 at binghamton dot edu<br />
<strong>Address:</strong><br /> <strong>Address:</strong><br />
                        MOSLab, H-6 Engineering Building<br />                         MOSLab, H-6 Engineering Building<br />
                        Binghamton University<br />                         Binghamton University<br />
@@ -86,6 +86,7 @@
                        Binghamton, NY 13902</p>                         Binghamton, NY 13902</p>
<h2 id="education">Education</h2> <h2 id="education">Education</h2>
<ul> <ul>
<li>2017.08 -                 Ph.D. in Computer Science, Binghamton University, NY, USA</li> <li>2017.08 -                 Ph.D. in Computer Science, Binghamton University, NY, USA</li>
<li>2015.08 - 2017.05   M.E in Computer Science, Binghamton University, NY, USA</li> <li>2015.08 - 2017.05   M.E in Computer Science, Binghamton University, NY, USA</li>
@@ -93,63 +94,72 @@
</ul> </ul>
<h2 id="experience">Experience</h2> <h2 id="experience">Experience</h2>
<ul> <ul>
<li>2016.10 -   <strong><em>Research Assistant</em></strong> @ Mobile and Operating System Lab, Binghamton University
<ul>
<li>Advised by Professor <a href="https://buzhangy.github.io/">Yifan Zhang</a></li>
<li>Edge-based distributed deep learning
<ul>
<li>Implemented a system for time-sensitive, edge-based distributed neural network training scenarios with state-of-the-art performance.</li>
<li>Applied empirical experiments to show potential opportunities in Edge-based/Mobile-based distributed neural network training.</li>
<li>Investigated heterogeneous-aware training tasks scheduling problem.</li>
</ul>
</li>
<li>Edge Computing
<ul>
<li>Envision edge computings work-flow in end device performance(latency, traffic) improving.</li>
<li>Applied empirical experiments on different edge computing work-flow and propose/implement related solutions.</li>
<li>Design and implement an edge-based multi-tier system for decreasing bandwidth usage from endpoint mobile device.</li>
</ul>
</li>
</ul>
</li>
<li>2013.10 - 2014.09   <strong><em>Research Intern</em></strong> @ Advanced computer application technology engineering Research Center, Ministry of Education, China <li>2013.10 - 2014.09   <strong><em>Research Intern</em></strong> @ Advanced computer application technology engineering Research Center, Ministry of Education, China
<ul> <ul>
<li>Analyzed real-time routing problem and reliable algorithm design</li> <li>Analyzed real-time routing problem and reliable algorithm design</li>
<li>Led and developed a routing system mostly backend server program</li> <li>Led and developed a routing system mostly backend server program</li>
<li>Participated in vehicle internet research</li> <li>Participated in vehicle internet research</li>
<li>Supervised by <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=105c1bfe787-4d33-48eb-a05f-e2a6f3934216&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Juhua Pu</a>, <a href="http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&amp;secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&amp;thirdSelId=&amp;cardId=3063cc45-7b8b-441a-86b2-3a4f59c26bd40&amp;language=0&amp;curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN">Zhang Xiong</a>, Related project: <a href="https://www.microsoft.com/en-us/research/project/urban-computing/">Urban Computing</a></li> <li>Supervised by Juhua Pu, Zhang Xiong, Related project: Urban Computing</li>
</ul> </ul>
</li> </li>
<li>2013.10 - 2014.01   <strong><em>Research Intern</em></strong> @ Institute of Software, Chinese Academy of Sciences, China <li>2013.10 - 2014.01   <strong><em>Research Intern</em></strong> @ Institute of Software, Chinese Academy of Sciences, China
<ul> <ul>
<li>Analyzed mobile OS kernel and Localized portion with C language</li> <li>Analyzed mobile OS kernel and Localized portion with C language</li>
<li>Supervised by <a href="http://soft.buaa.edu.cn/info/1060/1307.htm">Cangzhou Yuan</a></li> <li>Supervised by Cangzhou Yuan</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<h2 id="research">Research</h2> <h2 id="research-projects">Research projects</h2>
<ul> <ul>
<li>Graduate <li><a href="https://github.com/CoderSherlock/dlib-exper">EDDL: Edge-based distributed deep learning</a></li>
<li><a href="https://github.com/bumoslab/EdgeCourier">Edge Courier: Edge-involved Cloud file synchronization service</a>      <em>Original repository(private)</em></li>
<li>Real time routing planner      <em>Original repository(private)</em>
<ul> <ul>
<li>Edge Computing <li><a href="https://github.com/CoderSherlock/Project-OSCF.git">Map preprocessing driver</a></li>
<ul>
<li>Network Performance</li>
</ul>
</li>
<li>Vitrualization</li>
</ul>
</li>
<li>Undergraduate
<ul>
<li>Urban Comuputing
<ul>
<li>Routing algorithm and system</li>
<li>Real-time data processing</li>
</ul>
</li>
<li>Mobile Operating System
<ul>
<li>Kernel Analysis</li>
<li>Locolization</li>
</ul>
</li>
</ul> </ul>
</li> </li>
</ul> </ul>
<h2 id="publications">Publications</h2> <h2 id="publications">Publications</h2>
<ul> <ul>
<li> <li>
<p><strong><a href="">A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services </a></strong> <br /> <p><strong>EDDL: A Distributed Deep Learning System for Resource-limited Edge Computing Environment.</strong>
Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang <br /> <strong>Pengzhan Hao</strong>, and Yifan Zhang
The Sixth ACM/IEEE Symposium on Edge Computing (<strong>ACM/IEEE SEC</strong>)<br />
San Jose, CA, USA, 2021.</p>
</li>
<li>
<p><strong><a href="/static/2021-10/eta-infocom18.pdf">A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services</a></strong>
Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang
The 37th IEEE International Conference on Computer Communications (<strong>IEEE INFOCOM</strong>)<br /> The 37th IEEE International Conference on Computer Communications (<strong>IEEE INFOCOM</strong>)<br />
Honolulu, HI, USA, 2018.</p> Honolulu, HI, USA, 2018.</p>
</li> </li>
<li> <li>
<p><strong><a href="/static/2018-02/a7-hao.pdf">EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services</a></strong> <strong>[<a href="">slide</a>]</strong><br /> <p><strong><a href="/static/2018-02/a7-hao.pdf">EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services</a></strong> <strong>[<a href="/">slide</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br /> <strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 2nd ACM/IEEE Symposium on Edge Computing (<strong>ACM/IEEE SEC</strong>)<br /> The 2nd ACM/IEEE Symposium on Edge Computing (<strong>ACM/IEEE SEC</strong>)<br />
San Jose, CA, USA, 2017.</p> San Jose, CA, USA, 2017.</p>
@@ -157,23 +167,27 @@ San Jose, CA, USA, 2017.</p>
<li> <li>
<p><strong><a href="/static/2017-07/p169-zhang.pdf">Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach</a></strong><br /> <p><strong><a href="/static/2017-07/p169-zhang.pdf">Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach</a></strong><br />
Xin Zhang, Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang<br /> Xin Zhang, Yongshu Bai, <strong>Pengzhan Hao</strong>, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br /> The 15th ACM International Conference on Mobile Systems, Applications, and Services (<strong>ACM MobiSys</strong>)<br />
Niagara Falls, NY, USA, 2017.</p> Niagara Falls, NY, USA, 2017.</p>
</li> </li>
<li> <li>
<p><strong><a href="/static/2017-07/p163-hao.pdf">Poster: EPS - Edge-hosted Personal Services for Mobile Users</a> [<a href="/static/2017-07/eps_poster.pdf">poster</a>]</strong><br /> <p><strong><a href="/static/2017-07/p163-hao.pdf">Poster: EPS - Edge-hosted Personal Services for Mobile Users</a> [<a href="/static/2017-07/eps_poster.pdf">poster</a>]</strong><br />
<strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br /> <strong>Pengzhan Hao</strong>, Yongshu Bai, Xin Zhang, and Yifan Zhang<br />
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys)<br /> The 15th ACM International Conference on Mobile Systems, Applications, and Services (<strong>ACM MobiSys</strong>)<br />
Niagara Falls, NY, USA, 2017.</p> Niagara Falls, NY, USA, 2017.</p>
</li> </li>
</ul> </ul>
<h2 id="fun">Fun</h2> <h2 id="teaching">Teaching</h2>
<ul> <ul>
<li>My <a href="/timeline/index.html">Timeline</a></li> <li>Operating system (Graduate level)</li>
<li>Operating system (Undergraduate level)</li>
<li>Introduction to distributed system (Graduate level)</li>
</ul> </ul>
<h2 id="fun">Fun</h2>
</article> </article>
@@ -216,7 +230,7 @@ Niagara Falls, NY, USA, 2017.</p>
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
@@ -6,14 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Using charles proxy to monitor mobile SSL traffics « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Using charles proxy to monitor mobile SSL traffics « Stop Talking, Start Doing</title>
<meta name="description" content="In this blog, I will generally talk about how to use proper tools to monitor SSL traffics of a mobile devices. Currently, I only can dealing with those SSL t..."> <meta name="description" content="In this blog, I will generally talk about how to use proper tools to monitor SSL traffics of a mobile devices. Currently, I only can dealing with those SSL t...">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/charles-is-not-a-good-tool"> <link rel="canonical" href="https://codersherlock.github.com//archivers/charles-is-not-a-good-tool">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -38,13 +38,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -160,7 +160,7 @@ You also need to save charles Root Certificate, it also contains in the same men
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
@@ -6,14 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Generate Word Cloud Figures with Chinese-Tokenization and WordCloud python libraries « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Generate Word Cloud Figures with Chinese-Tokenization and WordCloud python libraries « Stop Talking, Start Doing</title>
<meta name="description" content=""> <meta name="description" content="Lets generate a word cloud like this. Dont understand the language is not a big deal.If your written language is based on latin alphabet(or other language ...">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/generate-word-cloud-with-chinese-fenci"> <link rel="canonical" href="https://codersherlock.github.com//archivers/generate-word-cloud-with-chinese-fenci">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -38,13 +38,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -74,7 +74,11 @@
</header> </header>
<article class="post-content"> <article class="post-content">
<p><img src="/static/2020-09/2020-06-28.png" height="350" /></p> <p>Lets generate a word cloud like this.
Dont understand the language is not a big deal.
If your written language is based on latin alphabet(or other language has space between words), skip tokenization.</p>
<p><img src="/static/2020-09/2020-06-28.png" height="250" /></p>
<h2 id="background">Background</h2> <h2 id="background">Background</h2>
@@ -287,7 +291,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+5 -5
View File
@@ -6,14 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stop Talking is the worst title of one blog « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Stop Talking is the worst title of one blog « Stop Talking, Start Doing</title>
<meta name="description" content=""> <meta name="description" content="">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/hello"> <link rel="canonical" href="https://codersherlock.github.com//archivers/hello">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -38,13 +38,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -132,7 +132,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+67 -10
View File
@@ -6,14 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Xv6 introduction « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Xv6 introduction « Stop Talking, Start Doing</title>
<meta name="description" content="I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system."> <meta name="description" content="In this post, you will learn a few basic concepts of xv6. Learning path will be closed coupled to first project assignment I gave when I assisted in teaching...">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/intro-xv6"> <link rel="canonical" href="https://codersherlock.github.com//archivers/intro-xv6">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -38,13 +38,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -74,9 +74,12 @@
</header> </header>
<article class="post-content"> <article class="post-content">
<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p> <p>In this post, you will learn a few basic concepts of xv6. Learning path will be closed coupled to first project assignment I gave when I assisted in teaching OS classes.
Understand system call and know how to implement a simple one will be coved as the first half.
In the second half of this post, I will discuss a little bit more on how to debug xv6 using gdb.</p>
<h2 id="xv6-systemcall">Xv6 Systemcall</h2> <h2 id="xv6-systemcall">Xv6 Systemcall</h2>
<p>To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file <em>user.h</em>.</p> <p>To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file <em>user.h</em>.</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="nf">function</span> <span class="p">(</span><span class="kt">void</span><span class="p">);</span> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">void</span> <span class="nf">function</span> <span class="p">(</span><span class="kt">void</span><span class="p">);</span>
@@ -84,15 +87,69 @@
<p>This interface-like function will then pass the function name, in this case function, to <em>usys.S</em>. When using user mode function in programs, <em>usys.S</em> will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from <em>syscall.c</em> and determining whether this system call is available. We must define same name system function and add it into <em>syscall.h</em> and <em>syscall.c</em>.</p> <p>This interface-like function will then pass the function name, in this case function, to <em>usys.S</em>. When using user mode function in programs, <em>usys.S</em> will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from <em>syscall.c</em> and determining whether this system call is available. We must define same name system function and add it into <em>syscall.h</em> and <em>syscall.c</em>.</p>
<div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#define SYS_function ## // ## is the system call number <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#define SYS_function ## // ## is the system call number
</span><span class="p">[</span><span class="n">SYS_function</span><span class="p">]</span> <span class="n">sys_function</span> <span class="c1">// real system function name</span> </span><span class="p">[</span><span class="n">SYS_function</span><span class="p">]</span> <span class="n">sys_function</span> <span class="c1">// real system function name</span>
<span class="k">extern</span> <span class="kt">int</span> <span class="nf">sys_function</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="c1">// real system function declaration</span> <span class="k">extern</span> <span class="kt">int</span> <span class="nf">sys_function</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span> <span class="c1">// real system function declaration</span>
</code></pre></div></div> </code></pre></div></div>
<p>After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.</p> <p>After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.</p>
<p>Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file <em>syscall.c</em>, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.</p> <p>Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file <em>syscall.c</em>, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.</p>
<h2 id="debug-xv6-with-gdb">Debug xv6 with gdb</h2>
<p>Please make sure that you have used gdb before.
If you never used gdb, you may write a simple 50-100 lines c code and practice how to use gdb first.</p>
<ul>
<li><a href="https://sourceware.org/gdb/current/onlinedocs/gdb/">GDB Manual</a></li>
<li><a href="https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf">GDB cheatsheet (pdf)</a></li>
</ul>
<p>To make sure xv6 gdb enabled, please check if <em>.gdbinit.tmpl</em> file exist.
This file is used for generate <em>.gdbinit</em> file which you can late consider it as a configuration for gdb.</p>
<p>Before running the xv6 instance in QEMU, one more thing you need to know is that using gdb to debug xv6 must be attached remotely.
This is because xv6 was running within QEMU, and emulator is virtually gapped from the host device.
Later when you start debugging, QEMU will open a gdb server to let gdb client connect to.</p>
<p>Once you want to start, using following command to compile and run xv6</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>make qemu-nox-gdb
<span class="k">***</span> Now run <span class="s1">'gdb'</span><span class="nb">.</span>
qemu-system-i386 <span class="nt">-nographic</span> <span class="nt">-drive</span> <span class="nv">file</span><span class="o">=</span>fs.img,index<span class="o">=</span>1,media<span class="o">=</span>disk,format<span class="o">=</span>raw <span class="nt">-drive</span> <span class="nv">file</span><span class="o">=</span>xv6.img,index<span class="o">=</span>0,media<span class="o">=</span>disk,format<span class="o">=</span>raw <span class="nt">-smp</span> 2 7
</code></pre></div></div>
<p>At this moment, it feels xv6 was stuck, this is because QEMU is ready to be connected by the gdb client.
You may use the <em>.gdbinit</em> to automatically finish this remote connection by simple typein following command in another terminal.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>gdb <span class="nt">-x</span> .gdbinit
GNU gdb <span class="o">(</span>Debian 8.2.1-2+b3<span class="o">)</span> 8.2.1
...
The target architecture is assumed to be i8086
<span class="o">[</span>f000:fff0] 0xffff0: ljmp <span class="nv">$0x3630</span>,<span class="nv">$0xf000e05b</span>
0x0000fff0 <span class="k">in</span> ?? <span class="o">()</span>
+ symbol-file kernel
warning: A handler <span class="k">for </span>the OS ABI <span class="s2">"GNU/Linux"</span> is not built into this configuration
of GDB. Attempting to <span class="k">continue </span>with the default i8086 settings.
<span class="o">(</span>gdb<span class="o">)</span>
</code></pre></div></div>
<p>Now within this gdb client shell, type c to continue the xv6, and you will see xv6 start execution in the first terminal.</p>
<p>At this moment, you may add breakpoints to your code to see if your code is correctly implemented or not.</p>
<p><strong>One more thing</strong>, if you open <em>.gdbinit</em> file, youll find that it by default connect to a localhost target.
If you are working on some other environment that target and client were not placed in the same device, change the localhost to ip address correspondingly.
Using ssh may connect to different physical devices under same domain name, this is because load balancer were used. To check ip address, search command <em>ip</em>.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>target remote localhost:28467
<span class="c"># target remote [ip-addr]:28467</span>
</code></pre></div></div>
</article> </article>
@@ -149,7 +206,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
@@ -6,14 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Some of my previews experiment works: 2016 « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Some of my previews experiment works: 2016 « Stop Talking, Start Doing</title>
<meta name="description" content="This blog contains only some basic record of my works. For some details, I will write a unique blog just for some specific topics."> <meta name="description" content="This blog contains only some basic record of my works. For some details, I will write a unique blog just for some specific topics.">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//archivers/some-of-my-previews-exper-work"> <link rel="canonical" href="https://codersherlock.github.com//archivers/some-of-my-previews-exper-work">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -38,13 +38,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -241,7 +241,7 @@ su
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+5 -5
View File
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Category « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Category « Stop Talking, Start Doing</title>
<meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
"> ">
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//category/"> <link rel="canonical" href="https://codersherlock.github.com//category/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,13 +39,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -155,7 +155,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+1 -1
View File
@@ -1,4 +1,4 @@
body { margin: 0; font-family: "Times New Roman"; font-size: 15px; line-height: 1.35; } body { margin: 0; font-family: "Arial"; font-size: 15px; line-height: 1.35; }
a { text-decoration: none; color: #036; } a { text-decoration: none; color: #036; }
File diff suppressed because one or more lines are too long
+69 -8
View File
@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Stop Talking, Start Doing</title>
<description>My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <description>My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
</description> </description>
<link>https://codersherlock.github.com//</link> <link>https://codersherlock.github.com//</link>
<atom:link href="https://codersherlock.github.com//feed.xml" rel="self" type="application/rss+xml"/> <atom:link href="https://codersherlock.github.com//feed.xml" rel="self" type="application/rss+xml"/>
<pubDate>Tue, 15 Sep 2020 22:22:06 -0400</pubDate> <pubDate>Tue, 12 Oct 2021 18:31:37 -0400</pubDate>
<lastBuildDate>Tue, 15 Sep 2020 22:22:06 -0400</lastBuildDate> <lastBuildDate>Tue, 12 Oct 2021 18:31:37 -0400</lastBuildDate>
<generator>Jekyll v4.1.1</generator> <generator>Jekyll v4.1.1</generator>
<item> <item>
<title>Generate Word Cloud Figures with Chinese-Tokenization and WordCloud python libraries</title> <title>Generate Word Cloud Figures with Chinese-Tokenization and WordCloud python libraries</title>
<description>&lt;p&gt;&lt;img src=&quot;/static/2020-09/2020-06-28.png&quot; height=&quot;350&quot; /&gt;&lt;/p&gt; <description>&lt;p&gt;Lets generate a word cloud like this.
Dont understand the language is not a big deal.
If your written language is based on latin alphabet(or other language has space between words), skip tokenization.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/static/2020-09/2020-06-28.png&quot; height=&quot;250&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt; &lt;h2 id=&quot;background&quot;&gt;Background&lt;/h2&gt;
@@ -180,9 +184,12 @@
<item> <item>
<title>Xv6 introduction</title> <title>Xv6 introduction</title>
<description>&lt;p&gt;I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.&lt;/p&gt; <description>&lt;p&gt;In this post, you will learn a few basic concepts of xv6. Learning path will be closed coupled to first project assignment I gave when I assisted in teaching OS classes.
Understand system call and know how to implement a simple one will be coved as the first half.
In the second half of this post, I will discuss a little bit more on how to debug xv6 using gdb.&lt;/p&gt;
&lt;h2 id=&quot;xv6-systemcall&quot;&gt;Xv6 Systemcall&lt;/h2&gt; &lt;h2 id=&quot;xv6-systemcall&quot;&gt;Xv6 Systemcall&lt;/h2&gt;
&lt;p&gt;To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file &lt;em&gt;user.h&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;To invoke a system call, we have to first define a user mode function to be the interface of the kernel instruction in file &lt;em&gt;user.h&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
@@ -190,14 +197,68 @@
&lt;p&gt;This interface-like function will then pass the function name, in this case function, to &lt;em&gt;usys.S&lt;/em&gt;. When using user mode function in programs, &lt;em&gt;usys.S&lt;/em&gt; will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from &lt;em&gt;syscall.c&lt;/em&gt; and determining whether this system call is available. We must define same name system function and add it into &lt;em&gt;syscall.h&lt;/em&gt; and &lt;em&gt;syscall.c&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;This interface-like function will then pass the function name, in this case function, to &lt;em&gt;usys.S&lt;/em&gt;. When using user mode function in programs, &lt;em&gt;usys.S&lt;/em&gt; will generate a reference to SYS_function and push system call number of this function into %eax. After that, system can know from &lt;em&gt;syscall.c&lt;/em&gt; and determining whether this system call is available. We must define same name system function and add it into &lt;em&gt;syscall.h&lt;/em&gt; and &lt;em&gt;syscall.c&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#define SYS_function ## // ## is the system call number &lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;#define SYS_function ## // ## is the system call number
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SYS_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys_function&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function name&lt;/span&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SYS_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sys_function&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function name&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sys_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function declaration&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;extern&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;sys_function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// real system function declaration&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.&lt;/p&gt; &lt;p&gt;After adding these sentences to syscall files, we can implement real function in specific place where you want to make the function works well.&lt;/p&gt;
&lt;p&gt;Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file &lt;em&gt;syscall.c&lt;/em&gt;, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.&lt;/p&gt; &lt;p&gt;Sometimes, we need to pass variables among system calls. In this case, variables values are not necessary and even cant be pass directly into system_function. When invoke a system call function, all variables of this system call will be pushed into current process stack. In file &lt;em&gt;syscall.c&lt;/em&gt;, multiple functions are provided to get these variables from the process. I wont waste time on explaining how to use these functions especially when elegant and detailed comments were written in source codes. However, I will explain concepts and how process organized and works in xv6 in future articles.&lt;/p&gt;
&lt;h2 id=&quot;debug-xv6-with-gdb&quot;&gt;Debug xv6 with gdb&lt;/h2&gt;
&lt;p&gt;Please make sure that you have used gdb before.
If you never used gdb, you may write a simple 50-100 lines c code and practice how to use gdb first.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sourceware.org/gdb/current/onlinedocs/gdb/&quot;&gt;GDB Manual&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://darkdust.net/files/GDB%20Cheat%20Sheet.pdf&quot;&gt;GDB cheatsheet (pdf)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To make sure xv6 gdb enabled, please check if &lt;em&gt;.gdbinit.tmpl&lt;/em&gt; file exist.
This file is used for generate &lt;em&gt;.gdbinit&lt;/em&gt; file which you can late consider it as a configuration for gdb.&lt;/p&gt;
&lt;p&gt;Before running the xv6 instance in QEMU, one more thing you need to know is that using gdb to debug xv6 must be attached remotely.
This is because xv6 was running within QEMU, and emulator is virtually gapped from the host device.
Later when you start debugging, QEMU will open a gdb server to let gdb client connect to.&lt;/p&gt;
&lt;p&gt;Once you want to start, using following command to compile and run xv6&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;make qemu-nox-gdb
&lt;span class=&quot;k&quot;&gt;***&lt;/span&gt; Now run &lt;span class=&quot;s1&quot;&gt;'gdb'&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
qemu-system-i386 &lt;span class=&quot;nt&quot;&gt;-nographic&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-drive&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;fs.img,index&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1,media&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;disk,format&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;raw &lt;span class=&quot;nt&quot;&gt;-drive&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;file&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;xv6.img,index&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0,media&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;disk,format&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;raw &lt;span class=&quot;nt&quot;&gt;-smp&lt;/span&gt; 2 7
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;At this moment, it feels xv6 was stuck, this is because QEMU is ready to be connected by the gdb client.
You may use the &lt;em&gt;.gdbinit&lt;/em&gt; to automatically finish this remote connection by simple typein following command in another terminal.&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;gdb &lt;span class=&quot;nt&quot;&gt;-x&lt;/span&gt; .gdbinit
GNU gdb &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;Debian 8.2.1-2+b3&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 8.2.1
...
The target architecture is assumed to be i8086
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;f000:fff0] 0xffff0: ljmp &lt;span class=&quot;nv&quot;&gt;$0x3630&lt;/span&gt;,&lt;span class=&quot;nv&quot;&gt;$0xf000e05b&lt;/span&gt;
0x0000fff0 &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; ?? &lt;span class=&quot;o&quot;&gt;()&lt;/span&gt;
+ symbol-file kernel
warning: A handler &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;the OS ABI &lt;span class=&quot;s2&quot;&gt;&quot;GNU/Linux&quot;&lt;/span&gt; is not built into this configuration
of GDB. Attempting to &lt;span class=&quot;k&quot;&gt;continue &lt;/span&gt;with the default i8086 settings.
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;gdb&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now within this gdb client shell, type c to continue the xv6, and you will see xv6 start execution in the first terminal.&lt;/p&gt;
&lt;p&gt;At this moment, you may add breakpoints to your code to see if your code is correctly implemented or not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One more thing&lt;/strong&gt;, if you open &lt;em&gt;.gdbinit&lt;/em&gt; file, youll find that it by default connect to a localhost target.
If you are working on some other environment that target and client were not placed in the same device, change the localhost to ip address correspondingly.
Using ssh may connect to different physical devices under same domain name, this is because load balancer were used. To check ip address, search command &lt;em&gt;ip&lt;/em&gt;.&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;target remote localhost:28467
&lt;span class=&quot;c&quot;&gt;# target remote [ip-addr]:28467&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description> </description>
<pubDate>Fri, 28 Jul 2017 14:56:55 -0400</pubDate> <pubDate>Fri, 28 Jul 2017 14:56:55 -0400</pubDate>
<link>https://codersherlock.github.com//archivers/intro-xv6</link> <link>https://codersherlock.github.com//archivers/intro-xv6</link>
+13 -7
View File
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stop Talking, Start Doing - 停止空想,开始行动</title> <title>Stop Talking, Start Doing</title>
<meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
"> ">
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//"> <link rel="canonical" href="https://codersherlock.github.com//">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,13 +39,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -81,7 +81,11 @@
<div class="post-meta">Sep 15, 2020</div> <div class="post-meta">Sep 15, 2020</div>
<div class="post-excerpt"> <div class="post-excerpt">
<p><img src="/static/2020-09/2020-06-28.png" height="350" /></p> <p>Lets generate a word cloud like this.
Dont understand the language is not a big deal.
If your written language is based on latin alphabet(or other language has space between words), skip tokenization.</p>
<p><img src="/static/2020-09/2020-06-28.png" height="250" /></p>
<p> <p>
<a class="post-link" href="/archivers/generate-word-cloud-with-chinese-fenci">Read More &raquo;</a> <a class="post-link" href="/archivers/generate-word-cloud-with-chinese-fenci">Read More &raquo;</a>
@@ -97,7 +101,9 @@
<div class="post-meta">Jul 28, 2017</div> <div class="post-meta">Jul 28, 2017</div>
<div class="post-excerpt"> <div class="post-excerpt">
<p>I hate xv6, a stupid, useless education-oriented system. In this article, I will generally talk about how to implement system call to this operating system.</p> <p>In this post, you will learn a few basic concepts of xv6. Learning path will be closed coupled to first project assignment I gave when I assisted in teaching OS classes.
Understand system call and know how to implement a simple one will be coved as the first half.
In the second half of this post, I will discuss a little bit more on how to debug xv6 using gdb.</p>
<p> <p>
<a class="post-link" href="/archivers/intro-xv6">Read More &raquo;</a> <a class="post-link" href="/archivers/intro-xv6">Read More &raquo;</a>
@@ -204,7 +210,7 @@ My current solution is using AP to forward all SSL traffic to a proxy, <a href="
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
Binary file not shown.
+5 -5
View File
@@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>About - Timeline « Stop Talking, Start Doing - 停止空想,开始行动</title> <title>About - Timeline « Stop Talking, Start Doing</title>
<meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab. <meta name="description" content="My personal blog, with some boring research staff and some tricks I was fancy to. I'll try my best to make this blog fun and useful. Not just a place I complain about all happens in my Lab.
"> ">
@@ -14,7 +14,7 @@
<link rel="stylesheet" href="/css/timeline.css"> <link rel="stylesheet" href="/css/timeline.css">
<link rel="canonical" href="https://codersherlock.github.com//timeline/"> <link rel="canonical" href="https://codersherlock.github.com//timeline/">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Tangerine">
<link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing - 停止空想,开始行动" href="https://codersherlock.github.com//feed.xml" /> <link rel="alternate" type="application/rss+xml" title="Stop Talking, Start Doing" href="https://codersherlock.github.com//feed.xml" />
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -39,13 +39,13 @@
<header class="header"> <header class="header">
<div class="wrapper"> <div class="wrapper">
<a class="site-title" href="/">Stop Talking, Start Doing - 停止空想,开始行动</a> <a class="site-title" href="/">Stop Talking, Start Doing</a>
<nav class="site-nav"> <nav class="site-nav">
<a class="page-link" href="/about/">About Me</a> <a class="page-link" href="/about/">About</a>
@@ -222,7 +222,7 @@
</div> </div>
<div class="col-box post-toc hide"> <div class="col-box post-toc hide">
<div class="col-box-title">TOC</div> <div class="col-box-title">Indexes</div>
</div> </div>
</div> </div>
</div> </div>
+45 -28
View File
@@ -1,6 +1,6 @@
--- ---
layout: page layout: page
title: About Me title: About
permalink: /about/ permalink: /about/
public: true public: true
nocomments: true nocomments: true
@@ -8,9 +8,9 @@ nocomments: true
# Pengzhan Hao # Pengzhan Hao
**Position:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Research Assistant in MOSLab **Position:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Research Assistant in MOSLab
**Education:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Doctoral Student of SUNY at Binghamton **Education:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Doctoral Student of SUNY at Binghamton
**Email:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phao3 at binghamton dot edu **Email:** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phao3 at binghamton dot edu
**Address:** **Address:**
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOSLab, H-6 Engineering Building &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MOSLab, H-6 Engineering Building
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton University &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton University
@@ -18,55 +18,72 @@ nocomments: true
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton, NY 13902 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binghamton, NY 13902
## Education ## Education
- 2017.08 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ph.D. in Computer Science, Binghamton University, NY, USA - 2017.08 - &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ph.D. in Computer Science, Binghamton University, NY, USA
- 2015.08 - 2017.05 &nbsp;&nbsp;M.E in Computer Science, Binghamton University, NY, USA - 2015.08 - 2017.05 &nbsp;&nbsp;M.E in Computer Science, Binghamton University, NY, USA
- 2011.08 - 2015.06 &nbsp;&nbsp;B.E in Software Engineering, Beihang University, Beijing, China - 2011.08 - 2015.06 &nbsp;&nbsp;B.E in Software Engineering, Beihang University, Beijing, China
## Experience ## Experience
- 2016.10 - &nbsp;&nbsp;***Research Assistant*** @ Mobile and Operating System Lab, Binghamton University
- Advised by Professor [Yifan Zhang](https://buzhangy.github.io/)
- Edge-based distributed deep learning
- Implemented a system for time-sensitive, edge-based distributed neural network training scenarios with state-of-the-art performance.
- Applied empirical experiments to show potential opportunities in Edge-based/Mobile-based distributed neural network training.
- Investigated heterogeneous-aware training tasks scheduling problem.
- Edge Computing
- Envision edge computings work-flow in end device performance(latency, traffic) improving.
- Applied empirical experiments on different edge computing work-flow and propose/implement related solutions.
- Design and implement an edge-based multi-tier system for decreasing bandwidth usage from endpoint mobile device.
- 2013.10 - 2014.09 &nbsp;&nbsp;***Research Intern*** @ Advanced computer application technology engineering Research Center, Ministry of Education, China - 2013.10 - 2014.09 &nbsp;&nbsp;***Research Intern*** @ Advanced computer application technology engineering Research Center, Ministry of Education, China
- Analyzed real-time routing problem and reliable algorithm design - Analyzed real-time routing problem and reliable algorithm design
- Led and developed a routing system mostly backend server program - Led and developed a routing system mostly backend server program
- Participated in vehicle internet research - Participated in vehicle internet research
- Supervised by [Juhua Pu](http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&thirdSelId=&cardId=105c1bfe787-4d33-48eb-a05f-e2a6f3934216&language=0&curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN), [Zhang Xiong](http://scse.buaa.edu.cn/buaa-css-web/toCardDetailAction.action?firstSelId=CARD_TMPL_OF_FIRST_NAVI_CN&secondSelId=CARD_TMPL_OF_ALL_TEACHER_CN&thirdSelId=&cardId=3063cc45-7b8b-441a-86b2-3a4f59c26bd40&language=0&curSelectNavId=CARD_TMPL_OF_ALL_TEACHER_CN), Related project: [Urban Computing](https://www.microsoft.com/en-us/research/project/urban-computing/) - Supervised by Juhua Pu, Zhang Xiong, Related project: Urban Computing
- 2013.10 - 2014.01 &nbsp;&nbsp;***Research Intern*** @ Institute of Software, Chinese Academy of Sciences, China - 2013.10 - 2014.01 &nbsp;&nbsp;***Research Intern*** @ Institute of Software, Chinese Academy of Sciences, China
- Analyzed mobile OS kernel and Localized portion with C language - Analyzed mobile OS kernel and Localized portion with C language
- Supervised by [Cangzhou Yuan](http://soft.buaa.edu.cn/info/1060/1307.htm) - Supervised by Cangzhou Yuan
## Research ## Research projects
- Graduate
- Edge Computing
- Network Performance
- Vitrualization
- Undergraduate
- Urban Comuputing
- Routing algorithm and system
- Real-time data processing
- Mobile Operating System
- Kernel Analysis
- Locolization
- [EDDL: Edge-based distributed deep learning](https://github.com/CoderSherlock/dlib-exper)
- [Edge Courier: Edge-involved Cloud file synchronization service](https://github.com/bumoslab/EdgeCourier) &nbsp;&nbsp;&nbsp;&nbsp; *Original repository(private)*
- Real time routing planner &nbsp;&nbsp;&nbsp;&nbsp; *Original repository(private)*
- [Map preprocessing driver](https://github.com/CoderSherlock/Project-OSCF.git)
## Publications ## Publications
- **[A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services ]()**
- **EDDL: A Distributed Deep Learning System for Resource-limited Edge Computing Environment.**
**Pengzhan Hao**, and Yifan Zhang
The Sixth ACM/IEEE Symposium on Edge Computing (**ACM/IEEE SEC**)
San Jose, CA, USA, 2021.
- **[A Case for Web Service Bandwidth Reduction on Mobile Devices with Edge-hosted Personal Services](/static/2021-10/eta-infocom18.pdf)**
Yongshu Bai, **Pengzhan Hao**, and Yifan Zhang Yongshu Bai, **Pengzhan Hao**, and Yifan Zhang
The 37th IEEE International Conference on Computer Communications (**IEEE INFOCOM**) The 37th IEEE International Conference on Computer Communications (**IEEE INFOCOM**)
Honolulu, HI, USA, 2018. Honolulu, HI, USA, 2018.
- **[EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services](/static/2018-02/a7-hao.pdf)** **[[slide]()]** - **[EdgeCourier: An Edge-hosted Personal Service for Low-bandwidth Document Synchronization in Mobile Cloud Storage Services](/static/2018-02/a7-hao.pdf)** **[[slide](/)]**
**Pengzhan Hao**, Yongshu Bai, Xin Zhang, and Yifan Zhang **Pengzhan Hao**, Yongshu Bai, Xin Zhang, and Yifan Zhang
The 2nd ACM/IEEE Symposium on Edge Computing (**ACM/IEEE SEC**) The 2nd ACM/IEEE Symposium on Edge Computing (**ACM/IEEE SEC**)
San Jose, CA, USA, 2017. San Jose, CA, USA, 2017.
- **[Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach](/static/2017-07/p169-zhang.pdf)** - **[Poster: Securing Device Inputs for Smartphones Using Hypervisor Based Approach](/static/2017-07/p169-zhang.pdf)**
Xin Zhang, Yongshu Bai, **Pengzhan Hao**, and Yifan Zhang Xin Zhang, Yongshu Bai, **Pengzhan Hao**, and Yifan Zhang
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys) The 15th ACM International Conference on Mobile Systems, Applications, and Services (**ACM MobiSys**)
Niagara Falls, NY, USA, 2017. Niagara Falls, NY, USA, 2017.
- **[Poster: EPS - Edge-hosted Personal Services for Mobile Users](/static/2017-07/p163-hao.pdf) [[poster](/static/2017-07/eps_poster.pdf)]** - **[Poster: EPS - Edge-hosted Personal Services for Mobile Users](/static/2017-07/p163-hao.pdf) [[poster](/static/2017-07/eps_poster.pdf)]**
**Pengzhan Hao**, Yongshu Bai, Xin Zhang, and Yifan Zhang **Pengzhan Hao**, Yongshu Bai, Xin Zhang, and Yifan Zhang
The 15th ACM International Conference on Mobile Systems, Applications, and Services (ACM MobiSys) The 15th ACM International Conference on Mobile Systems, Applications, and Services (**ACM MobiSys**)
Niagara Falls, NY, USA, 2017. Niagara Falls, NY, USA, 2017.
## Fun ## Teaching
- My [Timeline](/timeline/index.html) - Operating system (Graduate level)
- Operating system (Undergraduate level)
- Introduction to distributed system (Graduate level)
## Fun
+1 -1
View File
@@ -3,7 +3,7 @@
--- ---
@charset "utf-8"; @charset "utf-8";
$base-font-family: "Times New Roman";//"DejaVu Sans Mono", "PingFang SC", "DejaVu Sans", "Open Sans", "Helvetica Neue", Arial, "Noto Sans CJK SC", "Hiragino Sans GB", "微软雅黑", Helvetica, sans-serif; $base-font-family: "Arial";// "Times New Roman", "DejaVu Sans Mono", "PingFang SC", "DejaVu Sans", "Open Sans", "Helvetica Neue", Arial, "Noto Sans CJK SC", "Hiragino Sans GB", "微软雅黑", Helvetica, sans-serif;
$base-font-size: 15px; $base-font-size: 15px;
$small-font-size: $base-font-size; $small-font-size: $base-font-size;
$base-line-height: 1.35; $base-line-height: 1.35;
Binary file not shown.