Download comp1214-3-os-concepts

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Plan 9 from Bell Labs wikipedia , lookup

Unix security wikipedia , lookup

Distributed operating system wikipedia , lookup

DNIX wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Spring (operating system) wikipedia , lookup

Burroughs MCP wikipedia , lookup

Process management (computing) wikipedia , lookup

Paging wikipedia , lookup

Transcript
COMP1214
Systems & Platforms:
Operating Systems Concepts
Dr. Yvonne Howard – [email protected]
Rikki Prince – [email protected]
1
Lessons from last sessions
• The main concerns of an OS
– Providing application developers
with an interface to use system
resources
– Managing the system resources
• How can devices communicate with
the OS?
• The separation of concerns among
– I/O devices, I/O device controllers
(hardware), Device drivers & OS
2
Plan
• Identifying OS concepts
• Discuss individual concepts
– Establish relevance to OS concerns
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
3
Discussion
• Are you familiar with the following
OS concepts? What are they?
– Files
– Processes
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
4
Files
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
5
Files
• path name
• root directory
• working directory
• special files
• pipes
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
6
Discussion
• Have you seen the list of processes
running on:
- A windows environment?
- A UNIX environment?
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
• What types of processes can you see?
- Is it one process per application?
• What is the life-cycle of a process?
8
Windows Task Manager
9
Linux ps command
10
Processor modes
• Processors can be running in
– Kernel mode
– User mode
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
• The processor enters kernel mode:
– At start-up, interrupt, error....
• The processor enters user mode:
– By an instruction (which sets the respective
register in the CPU)
• Certain instructions can only be executed in
kernel mode (privileged instructions)
– Accessing CPU registers
– Memory used by the kernel
– I/O
11
Kernel mode-User mode in Win NT
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
SOURCE: support.novell.com
12
Processes
• Multiprogramming
– More tasks than processors
– Processors switching between tasks
– Illusion of parallelism
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
• Scheduling
– Which task is next?
• One application requires one or
more such tasks (processes)
13
Processes
• Each task/process can access
system resources
• Illusion of exclusive use of
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
– Memory (Address space)
– Storage
–…
• Can be notified of events by the
OS or other processes (signals)
14
Discussion
• What is the use of each type of memory in the
hierarchy below?
• How is memory shared among processes?
• What if a program needs more memory than
available in RAM?
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
15
Memory layout & Processes
Memory available per process?
ADDRESS SPACE
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
Memory needed larger than RAM?
VIRTUAL MEMORY
Process Table
Process Address Space
…
16
Discussion
• Which concerns of an OS does each
of the following concepts relate to?
– Process
– Files
– Memory management
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
• How can the OS provide a clean
interface to the resources it
manages?
17
Accessing system resources
• An OS provides applications with
APIs/libraries to access system
resources
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
– System calls can be invoked by applications
in user mode
– And are executed in kernel mode
• It is important that these are stable or
else applications have to be re-written
each time they change
18
System calls
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
19
OS concept map
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
p1
p2
CPU
p3
pN
Other
File System
File System
Other
System
20
Other online resources
• CPU components and animation
– http://courses.cs.vt.edu/~csonline/MachineArchitecture/
Lessons/CPU/Lesson.html
• Computer architeture resources
(advanced)
– http://williamstallings.com/COA5e.html
21
Lessons learned
• We are aware of the importance of OS
• We have introduced basic OS concepts
• We are familiar with the following concepts
–
–
–
–
–
–
OS concepts
Files
Processes
Memory mgmt
System calls
Relating concepts
Processes
Address space
Files
Processor modes: Kernel mode/User mode
System calls
The UNIX Shell
• Textbook: sections 1.5-1.6
22
next OS lectures:
• How can we deal with system resources
competing for CPU and Memory?
–
–
–
–
Process scheduling
Memory management
File system
Virtual memory
• How can processors/computers be combined?
• How can a file system be reliable and secure?
• WHAT ABOUT SPECIFIC OPERATING SYSTEMS?
23