Unit 1
Unit 1
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.
An Operating System does the following activities for memory management −
1. Keeps track of primary memory, i.e., what part of it is in use by whom,
what part is not in use.
2. In multiprogramming, the OS decides which process will get memory when
and how much.
3. Allocates the memory when a process requests it to do so.
4. De-allocates the memory when a process no longer needs it or has been
terminated.
Processor Management
In a 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 −
1. Keeps track of processor and status of process. The program
responsible for this task is known as traffic controller.
2. Allocates the processor (CPU) to a process.
3. De-allocates the 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 −
1. Keep track of all devices. Program responsible for this task is known as the
I/O controller.
2. Decides which process gets the device when and for how much time.
3. Allocates the device in an efficient way.
4. 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 −
1. Keep track of information, location, uses, status etc. The collective
facilities are often known as file systems.
2. Decides who gets the resources.
3. Allocates the resources.
4. De-allocates the resources.
Security
The OS helps to protect computer from unauthorized access and malicious
software. It manages user accounts and permissions to control what users can do
on the system.
System Call
A system call is a programmatic way in which a computer program requests a
service from the kernel of the operating system it is executed on. A system call is a
way for programs to interact with the operating system. A computer program
makes a system call when it makes a request to the operating system’s kernel.
System call provides the services of the operating system to the user programs via
Application Program Interface (API). It provides an interface between a process and
an operating system to allow user-level processes to request services of the
operating system. System calls are the only entry points into the kernel system. All
programs needing resources must use system calls.
Shell
The shell is a program that provides the user with an interface to use the operating
system’s functions through some commands. A shell script is a program that is used
to perform specific tasks. Shell scripts are mostly used to avoid repetitive work. You
can write a script to automate a set of instructions to be executed one after the
other, instead of typing in the commands one after the other n number of times.
Some Shell Commands:
ls : For listing file
pwd : for view present work directory
cd /.. : change directory backward
cd ./root : go to root directory
touch filename.extension : create new file
rm filename : delete file
mkdir foldername : create folder
cp filename directory_for_pasting : copy the file
adduser username : for adding user
passwd username : change the password
Note: This are Linux based commands
UNIX
Unix is an Operating System that is truly the base of all Operating Systems like
Ubuntu, Solaris, POSIX, etc. It was developed in the 1970s by Ken Thompson,
Dennis Ritchie, and others in the AT&T Laboratories. UNIX is a family of
multitasking, multiuser computer operating systems developed in the mid-1960s at
Bell Labs. It was originally developed for mini computers and has since been ported
to various hardware platforms. UNIX has a reputation for stability, security, and
scalability, making it a popular choice for enterprise-level computing.
Features
Multiuser support
Multitasking
Shell scripting
Security
Portability
Communication
Linux
Linux is an open-source Unix-like operating system kernel that serves as the
foundation for numerous distributions catering to diverse computing needs. Known
for its stability, security, and reliability, Linux is a preferred choice for servers,
embedded systems, and desktops. Some popular distribution of Linux are: Kali
Linux, Ubuntu, Fedora, Mint etc.
Features
Open-source
Security
Stability
Multitasking and Multi-user
Hardware Compatibility
Command-Line Interface (CLI)
Graphical User Interface (GUI)
Customizability
Handheld OS
A handheld operating system (OS) is software that manages the resources and
programs on a small, portable device like a smartphone, tablet, personal digital
assistant (PDA), or gaming console. Some of the popular handheld OS are:- Android,
iOS, Palm OS etc.