Download - OPERATING SYSTEM
![Page 1: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/1.jpg)
Introduction to operating system
• Operating system is a master control program that control the overall operation of the computer.
• Operating system is a system software.
![Page 2: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/2.jpg)
• An operating system acts as an intermediate between the user of a computer and computer hardware(disk, memory part and so on).
![Page 3: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/3.jpg)
Computer system is divided into four parts:
1. Hardware
2. Operating system
3. Application software
4. Users
![Page 4: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/4.jpg)
User
Application s/w
O.S.
Hardware
Structure of operating system
![Page 5: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/5.jpg)
• The purpose of an operating system is to provide an environment in which a user can execute programs in convenient and efficient manner.
• The most common operating systems are the windows95, windows98, windows2000, windows ME, windowsNT, windowsXP, windowsVista, windows7.
![Page 6: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/6.jpg)
Efficiency of operating system
• Throughput – it is the total amount of work performed by the computer system over a given duration of time.
![Page 7: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/7.jpg)
2. Turnaround time – (response time)
its defined as the difference of time between the time a user submits his job to the system for processing and the time he receives output.
![Page 8: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/8.jpg)
FUNCTIONS OF O.S.
1. An operating system provides system services, many of which can be started automatically when the computer boots.
![Page 9: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/9.jpg)
2. O.S. is responsible for creation, deletion, suspension and restart of both user and system process.
3. Handling process synchronization and inter process communication.
![Page 10: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/10.jpg)
4. Allocation and de-allocation of memory as and when needed.
5. Keeping track of used and unused memory space.
Track 0
Track 1
Sec
tor1
Sector 2
![Page 11: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/11.jpg)
TYPES OF OPERATING SYSTEM
1. Time sharing / Multitasking Operating System
2. Multiprogramming Operating System
3. Real time system
4. Multi-user Operating System
5. Batch Operating System
![Page 12: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/12.jpg)
Time sharing O.S.
• Time sharing implies that multiple task can be handled simultaneously by the system.
• Time sharing is an operating system features that allows several users to run several tasks concurrently on one processor or on many processor.
![Page 13: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/13.jpg)
• In a time sharing system, allocates a very short period of CPU time one by one to each user process.
• Beginning from the first user access and proceed through the last one. And again start from the first one.
• The short period of time during which a user program is known as Time slice, Time slot, or quantum.
![Page 14: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/14.jpg)
Advantage –
1. CPU utilization is efficient.
2. It allows user to interact with O.S. during program execution.
3. Reduce turnaround time or response time.
![Page 15: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/15.jpg)
Disadvantage:-
• It requires disk management.
• It is more complex.
• In it protection & security is necessary.
![Page 16: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/16.jpg)
• Its time between 10 to 50 milliseconds.
Ready
Blocked
Running
New job
Job is allocated to CPU for execution
Allocated time slice is over
I/O CompletedJob must wait for I/O completion
Job processing completed
The process state diagram for a time sharing system
![Page 17: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/17.jpg)
Multiprogramming
• Multiprogramming is the name given to the one after another execution of two or more different and independent programs by the same computer system.
• In multiprogramming, placing two or more user’s programs in main memory and executing them concurrently.
![Page 18: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/18.jpg)
• The operating speed of CPU is much faster than that of I/O operation.
• In multiprogramming system, various users share the time of CPU.
• When one user program waiting for I/O transfer, there is another user program which is ready to make use of the CPU time.
![Page 19: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/19.jpg)
CPU
Program1
Program2
Program3
Program4
Program5
Main Memory
O/P data
Exe
cutio
n in
pro
gres
s
Secondary Disk storage
The operation of Multiprogramming
![Page 20: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/20.jpg)
Advantages of Multiprogramming
• High CPU utilization
• It appears that many programs are allotted CPU most simultaneously.
Disadvantage• Jobs may have different sizes therefore,
memory management is needed to accommodate them in memory.
![Page 21: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/21.jpg)
Real Time System
• There are many application that require an immediate response from computer.
• Application should be required that processing should be perform within given time limit.
![Page 22: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/22.jpg)
• A real time system is one in which the correctness of the computation not only depends upon the logical correctness of the computation.
• If the timing constraint of the system are not met, system failure is said to have occurred.
![Page 23: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/23.jpg)
• Many real time system are embedded in specialized devices such as ordinary home application.
![Page 24: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/24.jpg)
Real time system are two types:
1. Hard Real time system
2. Soft Real time system
![Page 25: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/25.jpg)
Multiprocessing O.S.
• A computer system which contains one CPU is called Uniprocessor system.
• A computer system which contains two or more CPUs is called a multiprocessor system.
• These type of O.S. have multiple processor.
![Page 26: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/26.jpg)
• The multiprocessor computers are mainly of two types:
1. Shared memory type
2. Distributed memory type
![Page 27: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/27.jpg)
Shared Memory-
• The system is referred to as shared memory type.
• The shared portion of the main memory is called Global Memory.
• The global memory holds programs and data that are to be shared among the processor.
• It contains less number of CPUs.
![Page 28: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/28.jpg)
Distributed memory
• In the distributed memory type multiprocessor computer, each processor has a large local main memory.
• A distributed memory system may have no global memory or little global memory.
• A distributed memory computer is also called message passing computer.
![Page 29: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/29.jpg)
Advantage of multiprocessing :
• It provide facilities more efficient utilization of all the other devices of the computer system.
• It gives us a facility of a built in backup.
![Page 30: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/30.jpg)
Disadvantage of multiprocessor:
• A main memory is bigger sizes is required.
• It is very expensive.
![Page 31: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/31.jpg)
Batch O.S.
• Batch O.S. is based on the idea of automatic job to job transition facility provided by almost all O.S.
• In batch mode, each user prepares his program off line and submits it to the computer center.
![Page 32: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/32.jpg)
• Prepare programs transferred by Punched Card.
• When batch of programs have been collected.
the operator loads this batch of programs into the computer at one time.
• Where they are executed one after another.
![Page 33: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/33.jpg)
• Batch processing is also known as serial, sequential, stacked job processing.
Disadvantage –• The time required to accumulate (collected) data
into batches, in some instances, destroys much of the value of the data.
• Batch processing makes each job wait in line at each step. and often increases its turnaround time.
![Page 34: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/34.jpg)
• Resource utilization is not optimum.
• Strict job sequencing is required.
![Page 35: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/35.jpg)
Classification of O.S.
• Single user O.S.
• Multi user O.S.
![Page 36: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/36.jpg)
• A program which translate a high level language program into a machine language program is called a compiler.
• A compiler is more intelligent than an assembler. It check all kinds of limit , error etc.
Compiler
![Page 37: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/37.jpg)
• Its program execution time is more and occupies a larger part of the memory.
• It has low speed.
• It translate all program at a time.
• A compiler is faster than an interpreter.
![Page 38: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/38.jpg)
Interpreter
• An interpreter is a program which translate statement of a high level program into machine code.
• It translates one statement of the program at a time.
• It reads one statement of a high level language program , translate it into machine code and executes it.
![Page 39: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/39.jpg)
Assembler
• A program which translates an assembly language program into a machine language program is called an assembler.
• An assembler which runs on a computer for which it produce object code it called a self assembler.
• A cross assembler is an assembler that runs on a computer other than that for which it produce machine code.
![Page 40: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/40.jpg)
• Assembler are two types
1. One pass assembler
2. Two pass assembler
![Page 41: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/41.jpg)
Algorithm
• Algorithm is a sequence of statements or instruction for solving.
• A precise statement of the procedure required for solving a problem is called an Algorithm.
• An algorithm represents the logic of the processing to be performed.
![Page 42: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/42.jpg)
• It is step by step description of how to arrive of the solution of the given problem.
![Page 43: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/43.jpg)
In order to quality as an algorithm a sequence of instructions must be process the following characteristics:-
1. Each and every instruction should be clear.
2. One or more instruction should not be repeated infinitely.
3. After performing the instructions, that is, after the algorithm terminates, the desired results must be obtained.
![Page 44: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/44.jpg)
Q.1 write a algorithm to find out addition of two no.
c = a + b
Step1: Start
Step2: Input number a & b
Step3: use formula c= a+b
Step4: print the result c
Step5: Stop
![Page 45: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/45.jpg)
Q.2 write a algorithm find entered no. is even or odd.
A/2 = 0 or 1
Step1: StartStep2: Input a number AStep3: divide A by 2Step4: find remainderStep5: if remainder is 1 then A is oddStep6: if remainder is 0 then A is evenStep7: Stop
![Page 46: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/46.jpg)
Flow Chart• Flow chart is a pictorial representation that uses
predefined symbols to describe logic of computer program.
• The Algorithm is expressed in a pictorial form called a flow chart.
• A flow chart shows the order of operation.
• It also shows the relationship between the section of the program.
![Page 47: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/47.jpg)
Flow Chart Symbols
Start or End
Input or Output
Processing
![Page 48: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/48.jpg)
Decision / Condition
Connector
Flow Lines
![Page 49: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/49.jpg)
1. Start /Stop
• It is used to indicate the beginning , ending in the program logic.
• It is the first and last symbol in the program.
![Page 50: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/50.jpg)
2. Input / Output
• It is used to denote any function of input /output device in the program.
• The input can be supplied by the input device.
The output can be received by the output device in the flow chart with an input/output symbol.
![Page 51: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/51.jpg)
3. Process
• It is used to represent arithmetic and data movement instructions.
![Page 52: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/52.jpg)
4. Decision
• The condition should be indicate with in decision box.
![Page 53: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/53.jpg)
5. Flow Lines
• Flow lines indicate the flow of operation.
• Flow lines should not cross each other.
• The normal flow of flow chart from top to bottom & left to right.
![Page 54: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/54.jpg)
6. Connector
• If the flow lines cross each other we can use connector.
![Page 55: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/55.jpg)
Addition of two numbers:-
Start
Input a , b
C= a+b
Print c
Stop
![Page 56: OPERATING SYSTEM](https://reader033.vdocuments.us/reader033/viewer/2022061118/54691eefb4af9fb1678b48b9/html5/thumbnails/56.jpg)