Difference between revisions of "Introduction to Linux in HPC/Processes"
Introduction to Linux in HPC/Processes
Jump to navigation
Jump to search
m (Fit video canvas to 16:9 ratio) |
|||
Line 10: | Line 10: | ||
([[Media:HPC.NRW_Introduction_to_Linux_in_HPC_07_Processes.pdf | Slides as pdf]]) | ([[Media:HPC.NRW_Introduction_to_Linux_in_HPC_07_Processes.pdf | Slides as pdf]]) | ||
− | |||
− | === | + | === Quiz === <!--T:5--> |
− | 1. Start a process (e.g. sleep 10m) | + | |
+ | {{hidden begin | ||
+ | |title = What does PID stand for? | ||
+ | }} | ||
+ | <quiz display=simple> | ||
+ | { | ||
+ | |type="()"} | ||
+ | - Packet Identifier | ||
+ | || Explanation: Wrong | ||
+ | + Process Identifier | ||
+ | || Explanation: Correct | ||
+ | - Protocol Identifocation | ||
+ | || Explanation: Wrong | ||
+ | </quiz> | ||
+ | {{hidden end}} | ||
+ | |||
+ | {{hidden begin | ||
+ | |title = How are the permissions of a process set? | ||
+ | }} | ||
+ | <quiz display=simple> | ||
+ | { | ||
+ | |type="()"} | ||
+ | + By inheritance of owner's permissions. | ||
+ | || Explanation: Correct. Process can/can’t do what owner can/can’t do! | ||
+ | - Manually by user | ||
+ | || Explanation: Wrong. | ||
+ | + Explicitly at startup by parameters. | ||
+ | || Explanation: Wrong. | ||
+ | </quiz> | ||
+ | {{hidden end}} | ||
+ | |||
+ | === Exercises in Terminal === <!--T:5--> | ||
+ | |||
+ | 1. Start a process (e.g. sleep 10m) and kill it from a second console. | ||
{| role="presentation" class="wikitable mw-collapsible mw-collapsed" | {| role="presentation" class="wikitable mw-collapsible mw-collapsed" | ||
| <strong>Answer:</strong> | | <strong>Answer:</strong> | ||
|- | |- | ||
| | | | ||
− | + | Start the process: sleep 10m | |
− | + | Go to a second console. | |
− | + | Start the process manager: top | |
− | + | Filter process from your user account: press 'u' and type in your account name. | |
− | + | Identify the job ('sleep') and note the associated PID. | |
− | + | Kill it: press 'k' and type in the PID from previous step. | |
|} | |} | ||
Line 36: | Line 68: | ||
Type bg (bring it to background). | Type bg (bring it to background). | ||
To bring a process to foreground: | To bring a process to foreground: | ||
− | Type fg (bring it to foreground). | + | Display running "jobs" and identify the job ID: jobs |
+ | Type fg <job-ID> (bring it to foreground). | ||
|} | |} | ||
Revision as of 17:00, 30 November 2020
Tutorial | |
---|---|
Title: | Introduction to Linux in HPC |
Provider: | HPC.NRW
|
Contact: | tutorials@hpc.nrw |
Type: | Multi-part video |
Topic Area: | HPC Platforms |
License: | CC-BY-SA |
Syllabus
| |
1. Background and History | |
2. The Command Line | |
3. Linux Directory Structure | |
4. Files | |
5. Text display and search | |
6. Users and permissions | |
7. Processes | |
8. The vim text editor | |
9. Shell scripting | |
10. Environment variables | |
11. System configuration | |
12. SSH Connections | |
13. SSH: Graphics and File Transfer | |
14. Various tips |
Video
Quiz
What does PID stand for?
How are the permissions of a process set?
Exercises in Terminal
1. Start a process (e.g. sleep 10m) and kill it from a second console.
Answer: |
Start the process: sleep 10m Go to a second console. Start the process manager: top Filter process from your user account: press 'u' and type in your account name. Identify the job ('sleep') and note the associated PID. Kill it: press 'k' and type in the PID from previous step. |
2. Start a process, bring it into background/foreground.
Hint: |
To bring a process to background: Press Ctrl-Z (pause the process). Type bg (bring it to background). To bring a process to foreground: Display running "jobs" and identify the job ID: jobs Type fg <job-ID> (bring it to foreground). |