Professional Documents
Culture Documents
Unit I Fundamentals of OS and System Software: Click To Edit Master Subtitle Style
Unit I Fundamentals of OS and System Software: Click To Edit Master Subtitle Style
Sangram Patil
5/22/12
Overview
An operating system (OS) is a set of programs that manage computer hardware resources and provide common services for application software. OS is a program that acts as an intermediary between a user of a computer and the computer hardware. Operating system goals
user programs and make solving user 5/22/12 22
Sangram Patil
5/22/12
33
Sangram Patil
5/22/12
44
Sangram Patil
5/22/12
55
Sangram Patil
5/22/12
66
Real-time
aims at executing real-time applications; often use specialized scheduling algorithms Usable by a single user at a time allows multiple users to access a computer system concurrently
5/22/12 77
Single-user
Multi-user
Sangram Patil
Single-tasking
Only a single program is allowed to run at a time Allows the execution of multiple tasks at one time
Multi-tasking
Distributed
manages a group of independent computers and makes them appear to be a single Sangram Patil computer 5/22/12 88
Batch processing Jobs, together with input data, are fed into the system in a batch. The jobs are then run one after another. No job can be started until previous job is completed
Sangram Patil
5/22/12
99
anti-missile defense system airplane landing control system interrupt error in computer system
Sangram Patil
5/22/12
1010
Sangram Patil
5/22/12
1111
Sangram Patil
5/22/12
1212
The actual program which runs in a CPU consists of instructions in machine code ; patterns of 0's and 1's stored in words of memory. At last the expectation is - the machine code has to be placed in the right addresses for the dispatch unit of the CPU to run the instructions
5/22/12 1313
Sangram Patil
Assembler
E.g. INC COUNTER is easier to understand and5/22/12 remember than Sangram Patil
Assembler
Sangram Patil
5/22/12
1515
Compiler
The process of compilation is very complex, but the basic operation resembles that of assembly, with one exception - each line of the program can produce one or more machine code instructions.
Sangram Patil
5/22/12
1616
Most programs are written in a "high level language" such as C, rather than assembler. Programs can be clearer, better structured. It is easy to use pre-written functions, which may be quite complicated. The C compiler, if written carefully, can
5/22/12 1717
Advantages of C
Sangram Patil
Libraries
Programmers choose to let others use the procedures, rather than to give the source code for their programs. These are libraries.
Sangram Patil
5/22/12
1818
Sangram Patil
5/22/12
1919
Linker
Tool that merges the object files produced by separate compilation or assembly and creates an executable file Three tasks
Searches the program to find library routines used by program, e.g. printf(), math routines,
Determines the memory locations that code from each module will occupy and relocates its instructions by adjusting absolute Sangram Patil 5/22/12 2020
Loader
Part of the OS that brings an executable file residing on disk into memory and starts it running Steps
Read executable files header to determine the size of text and data segments Create a new address space for the program Copies instructions and data into address space Copies arguments passed to the program on the stack
5/22/12 2121
Sangram Patil
Process Management Main Memory Management File Management I/O System Management Secondary-Storage Management Networking Protection System Command-Interpreter System 5/22/12
2222
Sangram Patil
Process Management
A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task
The operating system is responsible for the following activities in connection with process management
Main-Memory Management
Memory is a large array of words or bytes, each with its own address
It is a repository of quickly accessible data shared 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 Sangram Patil 5/22/12 2424
File Management
Commonly, files represent programs (both source and object forms) and data
The operating system is responsible for the following activities in connections with file management:
A buffer-caching system A general device-driver interface Drivers for specific hardware devices
Sangram Patil
5/22/12
2626
Secondary-Storage Management
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 5/22/12 2727
Sangram Patil
A distributed system is a collection of processors that do not share memory or a clock Each processor has its own local memory The processors in the system are connected through a communication network
2828
Protection System
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 unauthorized usage specify the controls to be imposed provide a means of enforcement
5/22/12 2929
Sangram Patil
Command-Interpreter 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
5/22/12 3030
Sangram Patil
Command-Interpreter System
The program that reads and interprets control statements is called variously:
Sangram Patil
5/22/12
3131
Program execution
system capability to load a program into memory and to run it since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O
I/O operations
File-system manipulation
program capability to read, write, create, and delete files 5/22/12 Sangram Patil 3232
Communications
exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing ensure correct computing by detecting errors in the CPU and memory hardware, in
5/22/12 3333
Error detection
Sangram Patil
Special Features of OS
Sangram Patil
5/22/12
3434
Multi-tasking
To handle two or more programs at the same time from a single users perception
CPU can only perform one task at a time, however, it runs so fast that two or more jobs seem to execute at the same time
Sangram Patil
5/22/12
3535
Multi-programming
Two or more programs store in the main memory at the same time when one job needs to wait (e.g. I/O operation), CPU switch to another job to execute when the first job finishes waiting, CPU will get back the first job to execute
Sangram Patil
5/22/12
3636
Parallel Processing
Sangram Patil
5/22/12
3737
Buffering
a temporary storage area (buffers) to read data from input device or send data to the output device keep CPU busy
Sangram Patil
5/22/12
3838
Spooling
a larger buffer from hard disk buffer store the data through I/O operation
Sangram Patil
5/22/12
3939