Operating System-Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

What is an Operating System?

➢ An Operating System is the interface between the computer hardware and the end-user.
➢ Processing of data, running applications, file management and handling the memory is
all managed by the computer OS.
➢ Examples: Windows, Mac, Android, Chrome etc.

Functions:

➢ It helps with memory management. It keeps a track of the files being saved in the Main
memory and the primary memory of the computer device
➢ Whenever a computer is turned on, the Operating system automatically starts to work.
Thus, the booting and rebooting process of a computer device is also an important
function of the OS
➢ It provides a user interface
➢ Managing of basic peripheral devices is done by the operating system
➢ Using the password protection option of an operating system, the data in the device can
be kept secure
➢ It coordinates with the software and the user
➢ Easy navigation and organisation of files and programs are managed by the OS
➢ If any kind of error or bug is found during the program is detected using the operating
system

Components:

1. Process Management
2. File Management
3. Network Management
4. Main Memory Management
5. Secondary Storage Management
6. I/O Device Management
7. Security Management
8. Command Interpreter System

Concurrent Execution:
➢ It is execution of the multiple instruction sequences at the same time.
➢ It happens in the operating system when there are several process threads running in
parallel.
➢ The running process threads always communicate with each other through shared
memory or message passing.
➢ Adv: Running of multiple applications, Better resource utilization, Better performance,
Better average response time
➢ Dis adv:
o It is required to protect multiple applications from one another.
o It is required to coordinate multiple applications through additional
mechanisms.
o Sometimes running too many applications concurrently leads to severely
degraded performance.

Multiprocessing:

➢ Multiprocessing is a system that has two or more than one processor.


➢ In this, CPUs are added for increasing computing speed of the system.
➢ Because of Multiprocessing, there are many processes that are executed
simultaneously.
➢ Classified into two categories: Symmetric Multiprocessing, Asymmetric
Multiprocessing.
➢ Max. efficiency

Multi programming:

➢ Multi-programming is more than one process running at a time.


➢ It increases CPU utilization by organizing jobs (code and data) so that the CPU always
has one to execute.
➢ The motive is to keep multiple jobs in main memory. If one job gets occupied with
Input/output, CPU can be assigned to other job.
➢ Less efficiency
➢ In this, one process can be executed at a time.

TYPES OF OPERATING SYSTEM:

➢ Single Tasking: can only run one program at a time


➢ Multi-tasking: allows more than one program to be running in concurrency
➢ Single-user: have no facilities to distinguish users, but may allow multiple programs to
run one after the other
➢ Multi user: allows access by multiple users of a computer
➢ Distributed: manages a group of distinct, networked computers and makes them appear
to be a single computer, as all computations are located on different networked
computers. Failure of one system does not affect the other systems connected in the
network.
➢ Time-Sharing Operating System: Multiple people at various terminals can use a program
at the same time. The main motive is to minimize the response time.
➢ Network Operating System: They have one main server which is connected to other
client servers. It is a secure operating system for working with multiple users.
➢ Batch Operating System:
o There is no direct communication between the computer and the OS
o There is an intermediate, the Operator, which needs to distribute the work into
batches and sort similar jobs
o Multiple users can use it
o Can easily manager a large amount of work
➢ Real-Time Operating System
o It has a data processing system
o The processing time is very small between the user’s command and the output
o Used in fields where the response needs to be quick and rapid
PROCESS
➢ A process is the instance of a computer program that is being executed by one or many
threads.
➢ It contains the program code and its activity.
➢ It is a program during execution

FILE
➢ A file can be defined as a data structure which stores the sequence of records.
➢ Attributes: Name, Identifier, Type, Location, Size, Protection, Time and Date

FRAGMENTATION
➢ Fragmentation is an unwanted problem in the operating system in which the processes
are loaded and unloaded from memory, and free memory space is fragmented.
➢ Processes can't be assigned to memory blocks due to their small size, and the memory
blocks stay unused.
➢ As programs are loaded and deleted from memory, they generate free space or a hole in
the memory. These small blocks cannot be allotted to new arriving processes, resulting
in inefficient memory use.
➢ The conditions of fragmentation depend on the memory allocation system.
➢ As the process is loaded and unloaded from memory, these areas are fragmented into
small pieces of memory that cannot be allocated to incoming processes. It is
called fragmentation.
➢ TYPES:
o Internal Fragmentation: When a process is allocated to a memory block, and if
the process is smaller than the amount of memory requested, a free space is
created in the given memory block. Due to this, the free space of the memory
block is unused, which causes internal fragmentation.

o External Fragmentation: External fragmentation happens when a dynamic


memory allocation method allocates some memory but leaves a small amount of
memory unusable. The quantity of available memory is substantially reduced if
there is too much external fragmentation.

PCB
➢ Process Control Block is a data structure that contains information of the process
related to it.
➢ Also known as a task control block.
➢ Structure: The process control stores many data items that are needed for efficient
process management.
1. Process State: This specifies the process state i.e. new, ready, running, waiting or
terminated.
2. Process Number: This shows the number of the particular process.
3. Program Counter:This contains the address of the next instruction that needs to be
executed in the process.
4. Registers:This specifies the registers that are used by the process.
5. List of Open Files: These are the different files that are associated with the process
6. CPU Scheduling Information: The process priority, pointers to scheduling queues
etc. is the CPU scheduling information that is contained in the PCB. This may also
include any other scheduling parameters.
7. Memory Management Information: The memory management information includes
the page tables or the segment tables depending on the memory system used. It also
contains the value of the base registers, limit registers etc.
8. I/O Status Information: This information includes the list of I/O devices used by the
process, the list of files etc.
9. Accounting information: The time limits, account numbers, amount of CPU used,
process numbers etc. are all a part of the PCB accounting information.
10. Location of the Process Control Block
The process control block is kept in a memory area that is protected from the normal
user access. This is done because it contains important process information. Some
of the operating systems place the PCB at the beginning of the kernel stack for the
process as it is a safe location.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy