Sie sind auf Seite 1von 24

1

Contents:

Introduction Two views of operating system Operating system objective Operating system operations Process management Memory management Storage management Protection and security conclusion

A program

that controls the execution of application programs. interface between applications and hardware.

An

This the program that runs all time on computer , as long as the computer is operational and exits only when the computer is shut down. Examples such as WINDOWS , DOS,LINUX etc.

User 1

User 2

User 3

User n

compiler

assembler

Text editor

Database system

System and application program

Operating system

Computer hardware

Abstract view of the components of computer system


5

USERS VIEW It varies according to the interface being used. Design for single user to monopolize the system resources. For multiple users.
6

SYSTEMS VIEW
Operating system works as resource allocator. A computer system has many resources . so operating system acts as manager of these resources.

end end user user

Programmer

Operating

system
designer

Application program utilities Operating system

Computer hardware

Layers and views of computer system

Convenience Makes the computer more convenient to use. Efficiency Allows computer system resources to be used in an efficient manner. Ability to evolve Permit effective development, testing, and introduction of new system functions without interfering with service.
9

Dual-mode operations:-

Two types of modes, these are User mode Kernel mode (system mode, supervisor mode)

A bit called the mode bit is added to hardware of the computer to indicate the current mode i.e. 0 for kernel mode and 1 for user mode
10

When the computer is executing on the behalf of user application , then the system is in users mode. when use application requests a service from the operating system, it switches from user mode to kernel mode to fulfill the requirement. i.e. switch from mode 1 to mode 0.

11

User process

User mode Calls system call Return from system call (mode bit=1)

User process executing

kernel

Trap mode bit =0

Return mode bit=1

Executing system call

Kernel mode (mode bit=0)

Transition from user to kernel mode


12

A program in execution, is a process. For example- A time shared user program such as complier is a process. A program becomes a process when an executable file loaded into memory.

13

Operating system is responsible for following activities in operating system:

Creating and deleting processes. Suspending and resuming processes. Providing mechanisms for process synchronization. Providing mechanism for deadlock handling.

Process state:

As process executes, it changes state. the state of process is defined in part by the current activity of the process.
14

New

Terminated

Admitted Exit Interrupt

Ready

Running

I/O or event completion

Scheduler dispatch Waiting

I/O or event wait

Diagram of process state


15

Programs resides in main memory during the execution so, to improve both the utilization of CPU and the speed of its response to users computer must keep several processes in memory. So memory management schemes exists. Selection of memory management schemes for a system depends on many factors such as hardware design.
16

Memory allocation

Fragmentation
Paging

17

Swapping

A process can be swapped temporarily out of memory for continued execution. When higher priority process finishes , the lower priority process can be swapped back in and continue, that calls roll in and roll out.

18

Process of swapping

Operating system

Process P1 Roll out Process P2

Roll in User space

Main memory

Backing store
19

File system management


Creation and deletion of files Supporting primitives for manipulating files Mapping files into secondary storage Backing up files on nonvolatile storage media.

20

Mass storage management


Free space management Storage allocation Disk scheduling
21

Protection mechanism control access to a system by limiting the types of file access permitted to users. Least privilege dictates that programs, users, system be given enough privilege to perform task.

22

So finally we got the operating system overview and conquer that all essential needs of operating system for a computer architecture.

23

24

Das könnte Ihnen auch gefallen