Os2 p1c2 Operatingsystemstructures
Os2 p1c2 Operatingsystemstructures
E-mail: [email protected]
(partly based on slides of Le Thanh Van)
1 / 47
Outline
4 Advanced issues
2 / 47
Outline
4 Advanced issues
3 / 47
Operating system services
4 / 47
Operating system services
5 / 47
Operating system services
What is a program ?
A computer program is a collection of instructions that
performs a specific task when executed by a computer.
7 / 47
Functional services
Program execution
What is a program ?
A computer program is a collection of instructions that
performs a specific task when executed by a computer.
8 / 47
Functional services
I/O operations & File-system manipulation
I/O operations
A running program may access I/O devices, e.g.,
recording DVD)
For efficiency and protection, OS must provide a means
(for programs) to do I/O
9 / 47
Functional services
I/O operations & File-system manipulation
I/O operations
A running program may access I/O devices, e.g.,
recording DVD)
For efficiency and protection, OS must provide a means
(for programs) to do I/O
File-system manipulation
Programs need operations on files/directories: list, create,
delete, read, write, permission management
10 / 47
Functional services
Communications
Shared memory
11 / 47
Functional services
Communications
Shared memory
12 / 47
Functional services
Communications
Shared memory
13 / 47
Functional services
Communications
Shared memory
Running program A Running program B
Interconnect
14 / 47
Functional services
Error detection
15 / 47
Non-functional services
Resource allocation
OS manages multiple resources (hardware, software) and
allocates them to multiple users and multiple running
programs
Special codes are needed to make allocation efficiently,
e.g., CPU scheduling, printers allocation
Accounting
Recording which users to use how much and what kind of resources
Usage statistics is useful to reconfigure for improvement of
computing services
Multiple command
interpreters (also
shell) in a modern
operating system
Example: Bourne shell,
Bash shell, C shell,
Bourne-Again shell, Korn
shell
17 / 47
User interface
Multiple command
interpreters (also
shell) in a modern
operating system
Example: Bourne shell,
Bash shell, C shell,
Bourne-Again shell, Korn
shell
GUI - a user friendly graphical interface, input/output is
performed in a more interactive way
18 / 47
Choice of interface
Interface choice
Kind of interface (CLI or GUI) is mostly one of personal
preference
19 / 47
Choice of interface
Interface choice
Kind of interface (CLI or GUI) is mostly one of personal
preference
20 / 47
Outline
4 Advanced issues
21 / 47
Example on system call demand
File-to-file copy
22 / 47
Example on system call demand
File-to-file copy
23 / 47
API vs. system call interface
25 / 47
A call to system call open()
26 / 47
Parameters passing to system call
27 / 47
Types of system calls
Process control
File management
Device management
Information maintenance
Communications
Protection
28 / 47
Process control
What is a program ?
A computer program is a collection of instructions that
performs a specific task when executed by a computer.
What is a process ?
A program loaded into memory and executing is called a
process
29 / 47
Execution on single-task OS
MS-DOS
30 / 47
Execution on single-task OS
MS-DOS
31 / 47
Execution on multiple-task OS
FreeBSD
32 / 47
Interprocess communication
33 / 47
Interprocess communication
34 / 47
System programs
35 / 47
System programs
36 / 47
Outline
4 Advanced issues
37 / 47
Simple structure
MS-DOS
38 / 47
Simple structure
Traditional UNIX
39 / 47
Layered approach
40 / 47
Layered approach
41 / 47
Microkernel structure
42 / 47
Microkernel structure
44 / 47
Hybrid structure
45 / 47
Outline
4 Advanced issues
46 / 47