O.S. Notes based on syllabus PDF PDF

Title O.S. Notes based on syllabus PDF
Course Computer Applications
Institution Maharishi Dayanand University
Pages 37
File Size 1.9 MB
File Type PDF
Total Downloads 90
Total Views 137

Summary

Introduction to Operating System Notes Of BCA 3rd Semester...


Description

1

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Semester-3 BCA 204

Operating System (According to Purvanchal University Syllabus)

“Full Line By Line Notes”

For More Information go to www.dpmishracom

2

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Unit – 1 Introduction  An Operating System is the Set of instructions which is provide the conventional way between the Hardware and Software.

Architecture of Operating System –

User Software O.S.

Hardware

Functions Of Operating System –  There are Various Type of Functions of Operating System1. Memory Management 2. Processor Management 3. Device Management 4. File Management 5. Security 6. Control over system performance 7. Job accounting 8. Error detecting aids 9. Coordination between other software and users

For More Information go to www.dpmishracom

3

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Memory Management– Memory management refers to management of Primary Memory or Main Memory. Main memory is a large array of words or bytes where each word or byte has its own address. Main memory provides a fast storage that can be accessed directly by the CPU. For a program to be executed, it must in the main memory. An Operating System does the following activities for memory management.  Keeps tracks of primary memory, i.e., what part of it are in use by whom, what part are not in use.  In multiprogramming, the OS decides which process will get memory when and how much.  Allocates the memory when a process requests it to do so.  De-allocates the memory when a process no longer needs it or has been terminated.

Processor Management In multiprogramming environment, the OS decides which process gets the processor when and for how much time. This function is called process scheduling. An Operating System does the following activities for processor management –  Keeps tracks of processor and status of process. The program responsible for this task is known as traffic controller.  Allocates the processor (CPU) to a process.  De-allocates processor when a process is no longer required.

Device Management An Operating System manages device communication via their respective drivers. It does the following activities for device management –  Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.  Decides which process gets the device when and for how much time.

For More Information go to www.dpmishracom

4

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

 Allocates the device in the efficient way.  De-allocates devices.

File Management A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions. An Operating System does the following activities for file management –  Keeps track of information, location, uses, status etc. The collective facilities are often known as file system.  Decides who gets the resources.  Allocates the resources.  De-allocates the resources.

Security Management –By means of password and similar other techniques, it prevents unauthorized access to programs and data.

Control over system performance −Recording delays between request for a service and response from the system.

Job accounting −Keeping track of time and resources used by various jobs and users.

Error detecting aids − Production of dumps, traces, error messages, and other debugging and error detecting aids.

Coordination between other software and users −Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems.

Evaluation Of Operating System –  The evolution of operating systems is directly dependent on the development of computer systems and how users use them. Here is a quick tour of computing systems through the past fifty years in the timeline.

For More Information go to www.dpmishracom

5

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Early Evolution  1945: ENIAC, Moore School of Engineering, University of Pennsylvania.  1949: EDSAC and EDVAC  1949: BINAC - a successor to the ENIAC  1951: UNIVAC by Remington  1952: IBM 701  1956: The interrupt  1954-1957: FORTRAN was developed

Operating Systems - Late 1950s  By the late 1950s Operating systems were well improved and started supporting following usages:  It was able to perform Single stream batch processing.  It could use Common, standardized, input/output routines for device access.  Program transition capabilities to reduce the overhead of starting a new job were added.  Error recovery to clean up after a job terminated abnormally was added.  Job control languages that allowed users to specify the job definition and resource requirements were made possible.

Operating Systems - In 1960s 1961: The dawn of minicomputers 1962: Compatible Time-Sharing System (CTSS) from MIT 1963: Burroughs Master Control Program (MCP) for the B5000 system 1964: IBM System/360 1960s: Disks became mainstream 1966: Minicomputers got cheaper, more powerful, and really useful. 1967-1968: Mouse was invented. 1964 and onward: Multics  1969: The UNIX Time-Sharing System from Bell Telephone Laboratories.

       

For More Information go to www.dpmishracom

6

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Supported OS Features by 1970s  Multi User and Multi tasking was introduced.  Dynamic address translation hardware and Virtual machines came into picture.  Modular architectures came into existence.  Personal, interactive systems came into existence.

Accomplishments after 1970                

1971: Intel announces the microprocessor 1972: IBM comes out with VM: the Virtual Machine Operating System 1973: UNIX 4th Edition is published 1973: Ethernet 1974 The Personal Computer Age begins 1974: Gates and Allen wrote BASIC for the Altair 1976: Apple II August 12, 1981: IBM introduces the IBM PC 1983 Microsoft begins work on MS-Windows 1984 Apple Macintosh comes out 1990 Microsoft Windows 3.0 comes out 1991 GNU/Linux 1992 The first Windows virus comes out 1993 Windows NT 2007: iOS 2008: Android OS

Batch–  The users of a batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To speed up processing, jobs with similar needs are batched together and run as a group. The programmers leave their programs with the operator and the operator then sorts the programs with similar requirements into batches.

For More Information go to www.dpmishracom

7

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

The problems with Batch Systems are as follows −  Lack of interaction between the user and the job.  CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.  Difficult to provide the desired priority.

Interactive–  An interactive operating system is one that allows the user to directly interact with the operating system whilst one or more programs are running.

Time Sharing & Real Time Systems– Time Sharing –  Time-sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously is termed as time-sharing.

Advantages of Timesharing operating systems are as follows − 

Provides the advantage of quick response.



Avoids duplication of software.



Reduces CPU idle time.

Disadvantages of Time-sharing operating systems are as follows − 

Problem of reliability.



Question of security and integrity of user programs and data. Problem of data communication.



For More Information go to www.dpmishracom

8

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Real Time – 

A real-time system is defined as a data processing system in which the time interval required to process and respond to inputs is so small that it controls the environment. The time taken by the system to respond to an input and display of required updated information is termed as the response time. So in this method, the response time is very less as compared to online processing.

System Protection– 

The processes in an operating system must beprotected from one another's activities. To provide such protection, we can use various mechanisms to ensure that only processes that have gained proper authorization from the operating system can operate on the files, memory segments, CPU, and other resources of a system.

System Components–        

Process management I/O management Main Memory management File & Storage Management Protection Networking Protection Command Interpreter

System Structure– Simple Structure



There are many operating systems that have a rather simple structure. These started as small systems and rapidly expanded much further than their scope. A common example of this is MS-DOS. It was designed simply for a niche amount for people. There was no indication that it would become so popular.

For More Information go to www.dpmishracom

9

Keep Learning with us

O System VBSPU BCA 3rd sem. Operating

An image to illustrate the structure of MS-DOS is as follo

Layered Structure 

One way to achievee modularity in the operating system iss the layered approach. In this, the bottom layer is the hardware and the topmost layer is the user intterface.

An image demonstrating the layered approach is as follows:

For More Information go to www.dpmishracom w

10

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Operating System Services– There are various type of services such as     

Process Management Memory Management Security Management I/O Management Error Detection Communication

I/O Operating System Check all I/O Devices Proper functioning or not

Error Detection If Process have Occur any error than O.S. Detect These error and short out them.

Communication The OS stands the communication b/w Two Computer.

For More Information go to www.dpmishracom

11

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Unit – 2 Concurrent Process  When a multiuser access in a single machine at a time is known as Concurrent process.

In Other words  Concurrent processing is a computing model in which multiple processors execute instructions simultaneously for better performance. Concurrent means something that happens at the same time as something else.

Process–  The Flow of Execution is known as process.  A process is basically a program in execution. The execution of a process must progress in a sequential fashion. 

When a program is loaded into the memory and it becomes a process, it can be divided into four sections ─ stack, heap, text and data. The following image shows a simplified layout of a process inside main memory −

For More Information go to www.dpmishracom

12

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

State Transition– Terminate New

Ready Running

Waiting

Interrupts–  An interrupt is a function of an operating system that provides multiprocess multi-tasking. The interrupt is a signal that prompts the operating system to stop work on one process and start work on another.

Process Control Block–  PCB is a data structure of O.S which is store the all Information about your process.Such as – 1. Process state 2. Process ID 3. Program Counter 4. CPU Register 5. Memory Management 6. I/O Status

S.N. 1

Information & Description Process State The current state of the process i.e., whether it is ready, running, waiting, or whatever.

For More Information go to www.dpmishracom

13

Keep Learning with us

2

VBSPU BCA 3rd sem. Operating System

Process privileges This is required to allow/disallow access to system resources.

3

Process ID Unique identification for each of the process in the operating system.

4

Pointer A pointer to parent process.

5

Program Counter Program Counter is a pointer to the address of the next instruction to be executed for this process.

6

CPU registers Various CPU registers where process need to be stored for execution for running state.

7

CPU Scheduling Information Process priority and other scheduling information which is required to schedule the process.

8

Memory management information This includes the information of page table, memory limits, Segment table depending on memory used by the operating system.

9

Accounting information This includes the amount of CPU used for process execution, time limits, execution ID etc.

10

IO status information This includes a list of I/O devices allocated to the process.

For More Information go to www.dpmishracom

14

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Principle of Concurrency–  When a multiuser access in a single machine at a time is known as Concurrent process. There are 2 examples for concurrent processing:  In a single processor multi programming system, processes are interleaved in time to yield the appearance of simultaneous execution.  In a multiprocessor system, it is possible not only to interleaved the execution of multiple processes but also to overlap them.

Producer-Consumer Problem –  The Producer Consumer problem also known as bounded buffer problem is classic example of multi-process synchronization problem.  The problem describes two processes the producer and the consumer who share a common fix size buffer used as a cube.  The producer job is generate data put it into a buffer and the same time the consumer is consuming the data.

Critical Section –  In a critical section multiple process work in a single data is known as critical section. So it’s change the state of the data. For More Information go to www.dpmishracom

15

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Unit – 3 CPU Scheduling Scheduling Concept–  CPU Scheduling is the process which allow one process to use the CPU while the execution of other process on the hold.  There are various type of scheduling o Long Term Scheduler o Short term o Medium term

Long Term Scheduler – It is also called a job Scheduler. A long-term scheduler determines which programs are admitted to the system for processing. It selects Processes from the queue and loads them into memory for Execution. Process loads into the memory for CPU Scheduling.

Short Term Scheduling –  Short term scheduler also known as disnature makes the decision of which process to execute next over the RAM.

Medium Term Scheduler –  MTS is the part of Swapping. It removes the process from the memory. The MTS is in charge and handling the swap out process.

Types Of CPU Scheduling Thereare 2 types of CPU Scheduling 1. Non Primitive 2. Primitive For More Information go to www.dpmishracom

16

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

Non-Primitive – Under non primitive scheduling one the CPU has been allotted to the process the process keeps the CPU until it Release or Terminate.

Primitive In this types of scheduling the task are usually assign with priority.

Performance Critaria– 1. CPU Utilization – To make out the best use of CPU and not to waste the CPU Cycle.

2. Turn Around – It is the amount the time taken to execute a particular process.

3. Throw Put – The total number of process completed per unit time.

4. Waiting Time – The sum of period spends waiting in the ready Queue.

5. Response Time – Amount of time is takes from when a request was submitted.

Scheduling Algorithms–  There are various types of Algorithm such as – 1. FCFS 2. SJF 3. PriorityScheduling 4. Round Robin

FCFS–  Jobs are executed on first come first serve.  It is a non-Primitive scheduling Algorithm.

For More Information go to www.dpmishracom

17

VBSPU BCA 3rd sem. Operating System

Keep Learning with us

Q. Process

Arrival Time Execution

Service Time

P0

0

5

0

P1

1

3

5

P2

2

8

8

P3

3

6

16

Giant Chart – P0 0

P1 5

P2

P3

8

16

22

Waiting Time – P0 = 0-0 =0 P1 = 5-1 =4 P2 = 8-2 =6 P3 = 16-3 =13 Average Waiting Time = 0+4+6+13 4 = 5.75 Ans…

SJF –  Stands for shortest job First. It is a non-primitive algorithm.  It is a best approach to minimise waiting time. Q. Process

Arrival Time Execution

Service Time

P0

0

5

0

P1

1

3

5

P2

2

8

8

For More Information go to www.dpmishracom

18

Keep Learning with us

P3

3

P1 0

6

P0

P3

3

VBSPU BCA 3rd sem. Operating System

16

P2

8

14

22

Waiting Time – P0 = 3-0 =3 P1 = 0 = 0 P2 = 14-2 =12 P3 = 8-3 = 5 Average waiting time – 3+0+12+5 5 =5

PriorityScheduling –  Priority scheduling Non-Primitive Algorithm each process is assign a priority.

 Processes with the same priority are executed on FCFS. Q. Process Arrival Time ExecutionPriorityService Time P0

0

5

1

0

P1

1

3

2

5

P2

2

8

1

8

P3

3

6

3

16

P3 0

P1 6

P0 9

Waiting time = P0 = 9-0 = 9 P1= 6-1 = 5

For More Information go to www.dpmishracom

P3 14

22

19

Keep Learning with us

VBSPU BCA 3rd sem. Operating System

P2 = 14-2 =12 P3 = 0 Average waiting time = 9+5+12+0 4 = 6.5 Ans…

Round Robin –  Round robin is the pre-empting process scheduling.  Each process is provide a fix time...


Similar Free PDFs