Ios Assigment 1
Ios Assigment 1
Name: RIZIDEV.P
Assignment No: 1
Staff Sign:
Functions of Operating System
Operating System
An operating system (OS) is a program that acts as an interface between the system
hardware and the user. Moreover, it handles all the interactions between the software
and the hardware. All the working of a computer system depends on the OS at the base
level. Further, it performs all the functions like handling memory, processes, the
interaction between hardware and software, etc. Now, let us look at the functions of
operating system.
Operating System
Objectives of OS
1. Memory Management
2. Processor Management/Scheduling
Every software that runs on a computer, whether in the background or in the frontend,
is a process. Processor management is an execution unit in which a program operates.
The operating system determines the status of the processor and processes, selects a
job and its processor, allocates the processor to the process, and de-allocates the
processor after the process is completed.
When more than one process runs on the system the OS decides how and when a
process will use the CPU. Hence, the name is also CPU Scheduling. The OS:
• Allocates and deallocates processor to the processes.
• Keeps record of CPU status.
Certain algorithms used for CPU scheduling are as follows:
• Proper utilization of CPU. Since the proper utilization of the CPU is necessary.
Therefore, the OS makes sure that the CPU should be as busy as possible.
• Since every device should get a chance to use the processor. Hence, the OS makes
sure that the devices get fair processor time.
• Increasing the efficiency of the system.
3. Device Management
An operating system regulates device connection using drivers. The processes may
require devices for their use. This management is done by the OS. The OS:
4. File Management
The operating system manages resource allocation and de-allocation. It specifies which
process receives the file and for how long. It also keeps track of information, location,
uses, status, and so on. These groupings of resources are referred to as file systems.
The files on a system are stored in different directories. The OS:
5. Storage Management
1. Batch OS
In this system, the OS does not forward the jobs/tasks directly to the CPU. It works by
grouping together similar types of jobs under one category. Further, we name this
group as a ‘batch’. Hence, the name batch OS.
2. Time-Shared OS
When more than one task takes place on the system it is called time-shared OS. As
multiple tasks can run at the system at a time as per requirement. Hence, they all share
the CPU time one by one. Therefore, we also name it multitasking. The time that each
task gets is called quantum.
A fixed interval of time is decided for each task. When the first task executes for that
period of time, the second task executes, and so on.
3. Distributed OS
In this system, there is more than one CPU present. The OS distributes the tasks among
all the processors. The processors do not share any memory or clock time. OS handles
all communication between them through various communication lines.
4. Network OS
In these OS various systems are connected to a server. It allows the system to share
resources such as files, printers, applications, etc. Moreover, it gives the capability to
serve to manage these resources.
5. Real-Time OS (RTOS)
In these systems, the time interval for processing and responding to inputs is very
small. Therefore, due to this quality, these are used in real-time situations. For example
in missile systems, robots, etc.
When a program invokes a system call, the execution context switches from user to
kernel mode, allowing the system to access hardware and perform the required
operations safely. After the operation is completed, the control returns to user mode,
and the program continues its execution.
• Ensures that hardware resources are isolated from user space processes.
• Prevents direct access to the kernel or hardware memory.
• Allows application code to run ac
• ross different hardware architectures.
• This high-level overview explains how system calls work:
• 3. System Call Identified. The system uses an index to identify the system call
and address the corresponding kernel function.
• 5. System Prepares Return Values. After the kernel function completes its
operation, any return values or results are prepared for the user application.
• 6. Context Switch to User Space. The execution context is switched back from
kernel mode to user mode.
• 7. Resume Application. The application resumes its execution from where it left
off, now with the results or effects of the system call.
1. Process Control
System calls play an essential role in controlling system processes. They enable you to:
2. File Management
4. Information Maintenance
5. Communication
• Determining which processes or users get access to specific resources and who
can read, write, and execute resources.
• Facilitating user authentication procedures.
Process Control
Execute a new
Execute a new program in a CreateProcess() or
exec() program in a new
process. ShellExecute()
process.
File Management
Move or rename a
rename() Rename a file. MoveFile()
file.
Directory Management
Create a new
mkdir() Create a new directory. CreateDirectory()
directory.
Remove an existing
rmdir() Remove a directory. RemoveDirectory()
directory.
Device Management
Reserve, commit, or
Increase/decrease the VirtualAlloc() or
brk() or sbrk() free a region of
program's data space. VirtualFree()
memory.
Map a file into the
Map files or devices into
mmap() MapViewOfFile() application's address
memory.
space.
Information
Maintenance
Communication Calls
Accept a new
Accept a new connection
accept() accept() connection on a
on a socket.
socket.
Initiate a connection on a Initiate a connection
connect() connect()
socket. on a socket.
Conclusion:
Operating systems are essential software components that provide a range of
functions crucial for the efficient operation of computer systems. They manage
hardware and software resources, provide user interfaces, enforce security
measures, and handle error situations. System calls serve as interfaces between
user-level processes and the operating system kernel, enabling applications to
request services such as file manipulation, process management, and device
communication. Understanding these functions and interfaces is fundamental for
developing and managing computer systems effectively.