my report on os structures

27
* *System Components Operating System Services *System Calls *System Programs

Upload: wacks-guadalupe

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 1/27

*

*System Components

*Operating System Services

*System Calls

*System Programs

Page 2: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 2/27

*

*Process Management

*Main Memory Management

*Secondary Management

*I/O System Management

*File Management

*Protection System

*Networking

*Command-Interpreter System

Page 3: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 3/27

*

*A  process is a program in execution. A process needscertain resources, including CPU time, memory, files, andI/O devices, to accomplish its task.

*A process maybe considered as a batch job, a time sharedprogram & system task (e.g. spooling output to printer)

*The operating system is responsible for the following

activities in connection with process management.*Process creation and deletion.

*process suspension and resumption.

*Provision of mechanisms for:

* process synchronization

*process communication

* deadlock handling

Page 4: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 4/27

*

*A program itself is not a process; A program is a

Passive entity, such as the contents of a file stored 

on a disk.

* A process is an Active entity with a program

counter specifying the next program to execute.

Page 5: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 5/27

*

*Memory is a large array of words or bytes, each with itsown address. It is a repository of quickly accessible datashared by the CPU and I/O devices.

*Main memory is a volatile storage device. It loses its

contents in the case of system failure.*The operating system is responsible for the following

activities in connections with memory management:

*Keep track of which parts of memory are currently beingused and by whom.

*Decide which processes to load when memory spacebecomes available.

*Allocate and de- allocate memory space as needed.

Page 6: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 6/27

*

*Since main memory ( primary storage) is volatile and too

small to accommodate all data and programs

permanently, the computer system must provide

secondary storage to back up main memory.

*Most modern computer systems use disks as the principle

on-line storage medium, for both programs and data.

*The operating system is responsible for the following

activities in connection with disk management:

*Free space management

*Storage allocation

*Disk scheduling

Page 7: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 7/27

*

*The I/O system consists of:

*A buffer-caching system

*A general device-driver interface

*Drivers for specific hardware devices

Page 8: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 8/27

*

*A file is a collection of related information defined by its creator.Commonly, files represent programs (both source and object forms)and data.

* Most visible component of OS. Computers can store information onseveral different types of physical media (e.g. magnetic tap,magnetic disk, CD etc).

* The operating system is responsible for the following activities in

connections with file management:* File creation and deletion.

* Directory creation and deletion.

* Support of primitives for manipulating files and directories.

* Mapping files onto secondary storage.

* File backup on stable (nonvolatile) storage media.

Page 9: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 9/27

*

*A file is a collection of related information definedby its creator. Commonly, files represent programs(both source and object forms) and data.

*Most visible component of OS. Computers can storeinformation on several different types of physicalmedia (e.g. magnetic tap, magnetic disk, CD etc).

*For convenient use of the computer system, the OSprovides a uniform logical view of informationstorage.

*A file a logical storage unit, which abstract awaythe physical properties of its storage device.

*A file is a collection of related information definedby its creator. Commonly, files represent programs(both source and object forms) and data.

Page 10: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 10/27

*

*Protection refers to a mechanism for

controlling access by programs, processes, or

users to both system and user resources.

*The protection mechanism must:

*distinguish between authorized and unauthorizedusage.

*specify the controls to be imposed.

*provide a means of enforcement.

Page 11: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 11/27

*

*A distributed system is a collection processors that donot share memory or a clock. Each processor has itsown local memory.

*The processors in the system are connected through a

communication network.*Communication takes place using a protocol.

*A distributed system provides user access to varioussystem resources.

*Access to a shared resource allows:

* Computation speed-up

* Increased data availability

* Enhanced reliability

Page 12: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 12/27

*

*One of the most important system programs for anoperating system.

*Many commands are given to the operating system

by control statements which deal with:*process creation and management

* I/O handling

* secondary-storage management

*main-memory management

*file-system access

*protection

*networking

Page 13: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 13/27

*

* The program that reads and interprets control

statements is called variously:

*command-line interpreter

*shell (in UNIX)

*Control card interpreter

Its function is to get and execute the next

command statement.

Page 14: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 14/27

*

* Program execution ² system capability to load a program intomemory and to run it.

* I/O operations ² since user programs cannot execute I/Ooperations directly, the operating system must provide some

means to perform I/O.* File-system manipulation ² program capability to read, write,

create, and delete files.

*Communications ² exchange of information between processesexecuting either on the same computer or on different systemstied together by a network. Implemented via shared memory 

or message passing.* Error detection ² ensure correct computing by detecting errors

in the CPU and memory hardware, in I/O devices, or in userprograms.

Page 15: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 15/27

*

Additional functions exist not for helping the user, but rather for ensuringefficient system operations.

�Resource allocation ² allocating resources to multiple users or multiplejobs running at the same time.

�Accounting ² keep track of and record which users use how much andwhat kinds of computer resources for account billing or for accumulatingusage statistics.

�Protection ² ensuring that all access to system resources is controlled.

* Protection involves ensuring that all access to system resources is controlled

* Security of the system from outsiders requires user authentication, extends todefending external I/O devices from invalid access attempts

* If a system is to be protected and secure, precautions must be institutedthroughout it. A chain is only as strong as its weakest link.

Page 16: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 16/27

*

*System calls provide the interface between a runningprogram and the operating system.

*Generally available as assembly-language instructions.

*Languages defined to replace assembly language forsystems programming allow system calls to be madedirectly (e.g., C, C++)

*Three general methods are used to pass parametersbetween a running program and the operating system.

*Pass parameters in registers.

*Store the parameters in a table in memory, and the tableaddress is passed as a parameter in a register.

*Push (store) the parameters onto the stack by theprogram, and pop off the stack by operating system.

Page 17: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 17/27

*

*Often, more information is required than simply identityof desired system call*Exact type and amount of information vary according to

OS and call

*Three general methods used to pass parameters to the OS

*Simplest: pass the parameters in registers*

In some cases, may be more parameters than registers*Parameters stored in a block, or table, in memory, and

address of block passed as a parameter in a register* This approach taken by Linux and Solaris

*Parameters placed, or pushed, onto the stack by theprogram and popped off the stack by the operatingsystem

*Block and stack methods do not limit the number orlength of parameters being passed

Page 18: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 18/27

Passing of Parameters as a Table

Page 19: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 19/27

*

*Process control

- End, Abort

- Load, Execute

- Create Process, Terminate Process

- Get Process Attributes, Set Process Attributes

- Wait for Time

- Wait Event, Signal Event

- Allocate and Free Memory

Page 20: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 20/27

* File Manipulation

- Create File, Delete File

- Open, Close

- Read, Write, Reposition

- Get File Attributes, Set File Attributes

Page 21: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 21/27

*Device Manipulation

- Request Device, Release Device

- Read, Write, Reposition

- Get Device Attributes, Set Device Attributes

- Logically Attach or Detach Devices

Page 22: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 22/27

*Information Maintenance

- Get Time or Date, Set Time or Date

- Get System Data, Set System Data

- Get Process, File, or Device Attributes,

Set Process, File or Device Attributes

Page 23: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 23/27

*Communications

- Create, Delete Communication Connection

- Send, Receive Messages

- Transfer Status Information

- Attached or Detach Remove Device

Page 24: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 24/27

*

* Often, more information is required than simply identity ofdesired system call

* Exact type and amount of information vary according to OSand call

* Three general methods used to pass parameters to the OS

* Simplest: pass the parameters in registers> In some cases, may be more parameters than registers

* Parameters stored in a block, or table, in memory, andaddress of block passed as a parameter in a register> This approach taken by Linux and Solaris

* Parameters placed, or pushed, onto the stack by the programand popped off the stack by the operating system

* Block and stack methods do not limit the number or length ofparameters being passed

Page 25: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 25/27

*

M essage Passing Shared  M emory 

C ommunication may take place using either message passing or 

shared memory.

Page 26: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 26/27

*

*System programs provide a convenient environment

for program development and execution. The can

be divided into:*File manipulation ² create, delete, copy, rename,

print, list.

*Status information ² display date, time, disk space,

memory size, etc.*File modification ² create and modify files using text

editors

Page 27: My Report on Os Structures

8/6/2019 My Report on Os Structures

http://slidepdf.com/reader/full/my-report-on-os-structures 27/27

*Programming language support - Compilers, assemblers

and interpreters

*Program loading and execution ² loaders and linkers

*Communications ² remote login, send and receive

messages

*Application programs ² compilers, text formatters,

plotting packages, database

systems, spreadsheets, game

and so on

*Most users· view of the operation system is defined

by system programs, not the actual system calls.