Your SlideShare is downloading. ×
0
Lecture 1 Introduction Chapter1
What is systems Programming? <ul><li>Simple model: Single User </li></ul>
What is systems Programming? <ul><li>Reality: multiple users, multiple programs and multiple devices </li></ul>
What is systems Programming? <ul><li>Role of operating system: </li></ul><ul><ul><li>Manage and protect all the  resources...
What is systems Programming? <ul><li>The operating system is a program. </li></ul><ul><li>The code for operating system re...
What is systems Programming? <ul><li>Providing Services to Program! </li></ul><ul><ul><li>Only  kernel can access to all t...
Understand systems Programming? <ul><li>The kernel provides access to system resources. </li></ul><ul><li>System programs ...
Login – How the shell work? <ul><li>If your name and password are correct, the system starts up a program called a shell a...
Directory/File <ul><li>ls </li></ul><ul><li>cd </li></ul><ul><li>pwd </li></ul><ul><li>rmdir </li></ul><ul><li>cat </li></...
Bc – UNIX Desk Top Calcualtor <ul><li>>bc </li></ul><ul><li>2+3 </li></ul><ul><li>5 </li></ul><ul><li>Exit from bc, press ...
more  command <ul><ul><li>Show 24 lines from the input </li></ul></ul><ul><ul><li>Print [more?] message </li></ul></ul><ul...
more  command <ul><li>Code </li></ul><ul><ul><li>Version 1:  more read  stdin   more01 does not pause after 24 lines. It ...
more  command <ul><li>Code </li></ul><ul><ul><li>Version 2:  more  reads user input from a terminal </li></ul></ul><ul><ul...
Upcoming SlideShare
Loading in...5
×

Chapter 1

210

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
210
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Chapter 1"

  1. 1. Lecture 1 Introduction Chapter1
  2. 2. What is systems Programming? <ul><li>Simple model: Single User </li></ul>
  3. 3. What is systems Programming? <ul><li>Reality: multiple users, multiple programs and multiple devices </li></ul>
  4. 4. What is systems Programming? <ul><li>Role of operating system: </li></ul><ul><ul><li>Manage and protect all the resources and to connect the various devices to the various program . </li></ul></ul>Kernel User Space System space
  5. 5. What is systems Programming? <ul><li>The operating system is a program. </li></ul><ul><li>The code for operating system reside in the computer’s memory with other programs created by users. </li></ul><ul><li>The operating system connects those programs to the outside world. </li></ul>
  6. 6. What is systems Programming? <ul><li>Providing Services to Program! </li></ul><ul><ul><li>Only kernel can access to all the devices </li></ul></ul><ul><ul><ul><li>Terminal, disks, printers, … </li></ul></ul></ul><ul><ul><li>Kernel provides service for user programs to access devices </li></ul></ul>
  7. 7. Understand systems Programming? <ul><li>The kernel provides access to system resources. </li></ul><ul><li>System programs use those services directly. </li></ul><ul><li>Systems resources: </li></ul><ul><ul><li>Processor </li></ul></ul><ul><ul><li>I/O </li></ul></ul><ul><ul><li>Process Management </li></ul></ul><ul><ul><li>Memory </li></ul></ul><ul><ul><li>Devices </li></ul></ul><ul><ul><li>Timers </li></ul></ul><ul><ul><li>Inter-process Communication </li></ul></ul><ul><ul><li>Networking </li></ul></ul>
  8. 8. Login – How the shell work? <ul><li>If your name and password are correct, the system starts up a program called a shell and connects you to that shell. </li></ul><ul><li>The shell prompts to tell the </li></ul><ul><li>user it is ready to run a </li></ul><ul><li>program. </li></ul><ul><li>Try date , fortune commands </li></ul>
  9. 9. Directory/File <ul><li>ls </li></ul><ul><li>cd </li></ul><ul><li>pwd </li></ul><ul><li>rmdir </li></ul><ul><li>cat </li></ul><ul><li>more </li></ul><ul><li>cp </li></ul><ul><li>mv </li></ul><ul><li>File permission </li></ul>
  10. 10. Bc – UNIX Desk Top Calcualtor <ul><li>>bc </li></ul><ul><li>2+3 </li></ul><ul><li>5 </li></ul><ul><li>Exit from bc, press Ctrl – D </li></ul><ul><li>stop a process, press Ctrl - Z </li></ul>
  11. 11. more command <ul><ul><li>Show 24 lines from the input </li></ul></ul><ul><ul><li>Print [more?] message </li></ul></ul><ul><ul><li>Input Enter, SPACE, or q </li></ul></ul><ul><ul><li>If Enter, advance one line </li></ul></ul><ul><ul><li>If SPACE </li></ul></ul><ul><ul><li>If q  exit </li></ul></ul>
  12. 12. more command <ul><li>Code </li></ul><ul><ul><li>Version 1: more read stdin  more01 does not pause after 24 lines. It reads user command from the same stream as the data. </li></ul></ul>
  13. 13. more command <ul><li>Code </li></ul><ul><ul><li>Version 2: more reads user input from a terminal </li></ul></ul><ul><ul><li>Connect to the keyboard and screen using /dev/tty </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×