Unit-3_ECS_Notes
Unit-3_ECS_Notes
1. Security: –
The operating system uses password protection to protect user data and
similar other techniques. it also prevents unauthorized access to programs and user
data.
3. Job accounting–
Operating system Keeps track of time and resources used by various
tasks and users, this information can be used to track resource usage for a
particular user or group of user.
4. Error detecting aids –
Operating system constantly monitors the system to detect errors and
avoid the malfunctioning of computer system.
5. Coordination between other software and users –
Operating systems also coordinate and assign interpreters, compilers,
assemblers and other software to the various users of the computer
systems.
6. Memory Management –
The operating system manages the Primary Memory or Main
Memory. Main memory is made up of a large array of bytes or words where
each byte or word is assigned a certain address. Main memory is a fast storage
and it can be accessed directly by the CPU. For a program to be executed, it
should be first loaded in the main memory An Operating System performs the
following activities for memory management:
It keeps tracks of primary memory, i.e., which bytes of memory
are used by which user program. The memory addresses that have already been
allocated and the memory addresses of the memory that has not yet been used.
In multi programming, the OS decides the order in which process are granted
access to memory, and for how long. It Allocates the memory to a process
when the process requests it and deallocates the memory when the process has
terminated or is performing an I/O operation.
7. Processor Management –
In a multi programming environment, the OS decides the order in
which processes have access to the processor, and how much
processing time each process has. This function of OS is called
process scheduling. An Operating System performs the following
activities for processor management.
Keeps tracks of the status of processes. The program which perform
this task is known as traffic controller. Allocates the CPU that is
processor to a process. De-allocates processor when a process is no
more required.
8. Device Management –
An OS manages device communication via their respective drivers.
It performs the following activities for device management. Keeps
tracks of all devices connected to system. designates a program
responsible for every device known as the Input/Output controller.
Decides which process gets access to a certain device and for how
long.
Allocates devices in an effective and efficient way. Deallocates
devices when they are no longer required.
9. File Management –
A file system is organized into directories for efficient or
easy navigation and usage. These directories may contain other
directories and other files. An Operating System carries out the
following file management activities. It keeps track of where
information is stored, user access settings and status of every file
and more… These facilities are collectively known as the file
system.
Such operating systems do not have well defined structure and are small, simple
and limited systems. The interfaces and levels of functionality are not well
separated. MS-DOS is an example of such operating system. In MS-DOS
application programs are able to access the basic I/O routines. These types of
operating system cause the entire system to crash if one of the user programs
fails.
Diagram of the structure of MS-DOS is shown below.
Layered structure:
An OS can be broken into pieces and retain much more control on
system. In this structure the OS is broken into number of layers
(levels). The bottom layer (layer 0) is the hardware and the topmost
layer (layer N) is the user interface. These layers are so designed that
each layer uses the functions of the lower level layers only. This
simplifies the debugging process as if lower level layers are debugged
and an error occurs during debugging then the error must be on that
layer only as the lower level layers have already been debugged.
The main disadvantage of this structure is that at each layer, the data
needs to be modified and passed on which adds overhead to the system.
Moreover careful planning of the layers is necessary as a layer can use only
lower level layers. UNIX is an example of this structure.
Micro-kernel:
Definition
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software
and users Memory Management
Processor Management
Device 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.
These are two terms that get confused with one another in practice,and even
get used as equivalents. All free software is open-source, but not all open-
source software is free.
Open source is considered to have more flexible rules than free software, since
it allows companies and developers to impose certain usage restrictions and
licenses in order to protect the code’s integrity. On the other hand, free
software, strictly speaking, must literally adhere to the four points of freedom,
according to Richard Stallman:
• There is freedom to execute the code however one wishes and for
whatever purpose one wishes.
• The source code can be known and modified in its entirety.
• The code can be distributed freely (either without cost, or with a charge).
• Modifications to the code can also be freely distributed (with or without
cost).
Examplesofopensourceprograms
Some widely used programs, platforms, and languages which are considered open
source are:
An Operating System provides services to both the users and to the programs.
• Program execution
• I/O operations
• File System manipulation
• Communication
• Error Detection
• Resource Allocation
• Protectio
n Program
execution
I/O Operation
• I/O operation means read or write operation with any file or any specific
I/O device.
• Operating system provides the access to the required I/O device when
required.
Communication
Error handling
Errors can occur anytime and anywhere. An error may occur in CPU, in I/O
devices or in the memory hardware. Following are the major activities of an
operating system with respect to error handling −
Resource Management
In addition to servers, Linux is widely used in home computers, since there are
a great number of free programs for it (for text and image processing,
spreadsheets, publishing, etc.). Over the years, many different versions of
Linux have become available for distribution, most of which are free for the
user (such as Ubuntu, Fedora and Mint, to name a few). See the additional
reading material for more information on Linux.
MAC OS X
Apple’s Mac computers have their own operating system, OS X. Most of the
programs that are available for PCs are also available for Macs running under
OS X, but these two types of computers cannot use the exact same programs:
for example, you cannot install the Mac version of the Microsoft Office suite
on a Windows computer. You can install other operating systems on Mac
computers, but the OS X is only available for computers made by Apple.
Apple’s lighter portable devices (iPads, iPhones) use a light version of the
same operating system, called iOS.
Mac computers are popular because OS X is considered fast, easy to learn and
very stable and Apple’s devices are considered well-designed—though rather
expensive. See the additional reading material for more information on OS X.
ANDROID
Android is an operating system designed for phones and other mobile devices.
Android is not available for desktop computers, but in mobile devices it is
extremely popular: more than a half of all mobile devices in the world run on
Android.
USER INTERFACES
A user interface (UI) refers to the part of an operating system, program, or
device that allows a user to enter and receive information. A text-based user
interface (see the image to the left) displays text, and its commands are
usually typed on a command line using a keyboard. With a graphical user
interface (see the right-hand image), the functions are carried out by clicking
or moving buttons, icons and menus by means of a pointing device.
A system call is a mechanism that provides the interface between a process and
the operating system. It is a programmatic method in which a computer
program requests a service from the kernel of the OS.
System call offers the services of the operating system to the user programs via
API (Application Programming Interface). System calls are the only entry
points for the kernel system.
For example, if we need to write a program code to read data from one file,
copy that data into another file. The first information that the program requires
is the name of the two files, the input and output files.
In an interactive system, this type of program execution requires some system
calls by OS.
Step 2) After that, the system call is executed in the kernel-mode on a priority
basis.
Step 3) Once system call execution is over, control returns to the user mode.,
• Process Control
• File Management
• Device Management
• Information Maintenance
• Communications
Process Control
memory File
Management
File management system calls handle file manipulation jobs like creating
a file, reading, and writing, etc.
Functions:
• Create a file
• Delete file
• Open and close file
• Read, write, and reposition
• Get and set file attributes
Device Management
Device management does the job of device manipulation like reading from
device buffers, writing into device buffers, etc.
Functions
attributes Information
Maintenance
It handles information and its transfer between the OS and the user
program. Functions:
attributes Communication:
communications. Functions:
Here are general common rules for passing parameters to the System Call:
In some systems, a process needs to wait for another process to complete its
execution. This type of situation occurs when a parent process creates a child
process, and the execution of the parent process remains suspended until its
child process executes.
fork()
Processes use this system call to create processes that are a copy of themselves.
With the help of this system Call parent process creates a child process, and
the execution of the parent process will be suspended till the child process
executes.
exec()
This system call runs when an executable file in the context of an already
running process that replaces the older executable file. However, the original
process identifier remains as a new process is not built, but stack, data, head,
data, etc. are replaced by the new process.
kill():
exit():
The exit() system call is used to terminate program execution. Specially in the
multi-threaded environment, this call defines that the thread execution is
complete. The OS reclaims resources that were used by the process after the
use of exit() system call.
2. Status Information –
3. File Modification –
For modifying contents of files we use this. For Files stored on disks
or other storage devices we used different types of editors. For
searching contents of files or perform transformations of files we
use special commands.
4. Programming-Language support –
For common programming languages we use Compilers,
Assemblers, Debuggers and interpreters which are already
provided to user. It provides all support to users. We can run any
programming languages. All languages of importance are already
provided.
6.Communications –
Virtual connections among processes, users and computer
systems are provided by programs. User can send messages to
other user on their screen, User can send e-
mail, browsing on web pages, remote login, transformation of files
from one user to another.
Some examples of system programs in O.S. are –
• Windows 10
• Mac OS X
• Ubuntu
• Linux
• Unix
• Android
• Anti-virus
• Disk formatting
• Computer language translator
Database ManagementSystems
Data Models
Introduction to Database Management Systems (DBMS)
Relational Database Management Systems (RDBMS)
Structured Query Language (SQL)
Database Transactions
Data Centers
Cloud Services
Data Model:
Hierarchical Model: Data is organized in a tree-like structure, where each child record
hasonly one parent.
Network Model: Similar to the hierarchical model but allows each record to have
multipleparents, creating a more flexible data structure.
Relational Model: Data is stored in tables, with relationships between tables defined by
foreign keys. This is the most widely used model in RDBMS.
Object-oriented Model: Incorporates object-based data modeling, allowing stored data
toinclude not just values but also methods for processing or manipulating those values.
Introduction to Database Management Systems (DBMS):
A Database Management System (DBMS) is specialized software that enables the
creation,management, and use of databases.
It serves as an interface between databases and end-users or application programs,
ensuring that data is consistently organized and remains easily accessible.
DBMSs are crucial for handling vast amounts of data efficiently.
They support various operations such as
Data storage,
Retrieval,
Updating, and
Management, facilitating the organization's data management practices.
Functions of a DBMS
Data Storage: DBMS stores data in a structured format, using tables, schemas, and
databases to organize data efficiently.
Data Retrieval: Allows users to retrieve data efficiently through queries, making it
accessible for analysis or processing.
Data Update: Supports adding new data, modifying existing data, and deleting
outdateddata, ensuring the database remains current.
Data Administration: Offers tools for backup and recovery, security management, and
performance monitoring to maintain data integrity and availability.
Benefits of Using a DBMS
Table-based Structure: Data is stored in tables, making data management and querying
efficient.
Data Manipulation: Utilizes Structured Ǫuery Language (SǪL) for data manipulation
andquerying.
Data Integrity: Ensures data accuracy and consistency through integrity constraints like
primary keys and foreign keys.
ACID Transactions: Supports transactions that are Atomic, Consistent, Isolated, and
Durable to ensure data reliability.
Advantages of RDBMS
Flexibility: Ability to handle a wide range of data types and complex queries.
Scalability: Can scale to handle large amounts of data and concurrent users
efficiently.
Security: Provides robust data security features, including access controls and
encryption.
Maintenance: Easier to maintain due to its structured format and widespread support
tools.
Examples of RDBMS:
Definition of SǪL
Structured Ǫuery Language (SǪL) is a standard programming language specifically
designed for managing and manipulating relational databases.
It allows for the querying, updating, and management of data in RDBMS.
Data Ǫuerying: Retrieving data from a database using the SELECT statement, filtering
results with conditions.
Data Manipulation: Inserting (INSERT), updating (UPDATE), and deleting (DELETE)
recordsin a database.
Data Definition: Creating (CREATE), altering (ALTER), and dropping (DROP)
databaseobjects like tables and views.
Data Control: Managing access to the database and its objects through permissions
(GRANT and REVOKE).
Advantages of SQL
Standardization: SǪL is widely accepted and used, making skills transferable across
different database systems.
User-Friendly Syntax: SǪL syntax is readable and similar to natural language, making
iteasier to learn and use.
Powerful and Versatile: Capable of handling complex queries and database
transactions,making it suitable for a wide range of data management tasks.
Database Transaction
A database transaction is a sequence of one or more database operations performed as a
single, atomic unit of work.
Each transaction is meant to ensure data integrity and consistency.
Transactions are crucial for maintaining the integrity and consistency of the database.
They ensure that even in the case of errors or failures, the data remains accurate and
reliable.
Data Centers
A data center is a facility composed of networked computers and storage used to
organize,process, store, and disseminate large amounts of data.
Data centers are critical assets for enterprises and cloud service providers.
Components of Data Centers
Enterprise Data Centers: Owned and operated by companies and located on their
premises.
Colocation Data Centers: Where companies can rent space for servers and other
computing hardware.
Cloud Data Centers: Operated by cloud service providers offering cloud services over
theinternet.
Importance of Data Centers:
Data centers are the backbone of IT operations, supporting business applications, data
storage, management, and dissemination.
They play a crucial role in disaster recovery, data backup, and ensuring data availability.
Cloud Services
Cloud services refer to a wide range of services delivered on demand to companies and
customers over the internet.
These services are designed to
Provide easy
affordable access to applications and resources, without the need for internal
infrastructure or hardware.
Types of Cloud Services:
Infrastructure as a Service (IaaS): Provides virtualized computing resources over the
internet, including virtual machines, storage, and networks.
Platform as a Service (PaaS): Offers hardware and software tools over the internet,
typically for application development.
Software as a Service (SaaS): Delivers software applications over the internet, on a
subscription basis, accessible through a web browser.
Public Cloud: Services are delivered over the public internet and shared across
organizations.
Private Cloud: Services are maintained on a private network, offering more control and
security.
Hybrid Cloud: Combines public and private clouds, allowing data and applications to
beshared between them.
Atomicity:
Consistency:
Data Integrity: Consistency ensures that the data in the database follows predefined
rules and constraints. These rules may include referential integrity constraints, data
type constraints, and other business rules.
Constraint Enforcement: The DBMS enforces consistency through constraint
checking mechanisms. Before allowing a transaction to commit, the system verifies
that the transaction's changes will not violate any integrity constraints.
Transactional Isolation: Consistency also involves ensuring that transactions
execute in isolation from each other, preventing interference or conflicts between
concurrent transactions that could lead to inconsistencies.
Isolation:
Durability:
Summary of OS:
Summary of DBMS: