0% found this document useful (0 votes)
6 views6 pages

Expt 3_COS_008

The document outlines an experiment for a Computer Operating System course at K. J. Somaiya College of Engineering, focusing on system calls and their role in process management. It details the aim, objectives, and theoretical background of system calls, including their types and functions. The document also includes implementation details for a program involving process creation and file operations using system calls.

Uploaded by

jossilwhatsapp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Expt 3_COS_008

The document outlines an experiment for a Computer Operating System course at K. J. Somaiya College of Engineering, focusing on system calls and their role in process management. It details the aim, objectives, and theoretical background of system calls, including their types and functions. The document also includes implementation details for a program involving process creation and file operations using system calls.

Uploaded by

jossilwhatsapp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

K. J.

Somaiya College of Engineering, Mumbai-77


(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Course Name: Computer Operating System (Elective) Semester: VII


Date of Performance: 22 /8/ 2024 Batch No: A1
Faculty Name: Prof Nilesh Lakade Roll No: 16010221008
Faculty Sign & Date: Grade/Marks: / 25

Expt No: 3
Title: To study system calls.

Aim and Objective of the Experiment:


 To understand the working Process based system calls.

COs to be achieved:
CO 1: Explain the fundamental concepts of operating system

Theory:

System Calls Provide the Interface between a process and the OS.
System calls are usually made when a process in user mode requires access to a resource.
Then it requests the kernel to provide the resource via a system call.
System calls are required in the following situations −
1) If a file system requires the creation or deletion of files.
2) Reading and writing from files also require a system call.
3) Creation and management of new processes.
4) Network connections also require system calls. This includes sending and receiving packets.
5) Access to a hardware devices such as a printer, scanner etc. requires a system call.

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Description of the application to be implemented:

Implementation details/Circuit Diagram/ Block Diagram:

Program for System Call:


1. Write a Program for creating process using System call (E.g fork()) Create a child
process. Display the details about that process using getpid and getppid functions. In a child
process, Open the file using file system calls and read the contents and display.

(printout of code / screen shot)

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Post Lab Subjective/Objective type Questions:


1. Describe System Call Interface.

The system call interface is a fundamental mechanism that allows user applications to interact with
the operating system. It provides a controlled means for programs to request services from the
kernel, such as file operations, process management, and inter-process communication. When a user
application needs to perform an operation that requires higher privileges, such as reading from a file
or allocating memory, it makes a system call to request the operating system's assistance. The
system call interface acts as a bridge between user space and kernel space. Applications use a set of
predefined system call functions, which are implemented by the operating system. These system
calls are typically invoked via library functions that handle the details of switching from user mode
to kernel mode, ensuring that the application’s request is processed securely and efficiently. The
operating system then performs the requested operation on behalf of the application and returns the
result. This interface is crucial for maintaining system stability and security, as it enforces
boundaries between user applications and the core system components. By providing a controlled
and monitored way for applications to access hardware and system resources, the system call
interface helps prevent unauthorized access and potential system crashes.

2. List the types of System Calls?

System calls can be categorized into several types based on the services they provide to applications.
File management system calls handle operations related to files and directories, such as opening,
reading, writing, and closing files. Examples include `open()`, `read()`, `write()`, and `close()`.
These calls allow applications to interact with the file system and perform tasks like creating or
modifying files.
Process management system calls are concerned with creating, terminating, and controlling
processes. They include `fork()`, which creates a new process, `exec()`, which replaces the process
image with a new program, and `wait()`, which allows a process to wait for its child processes to
complete. These calls are essential for managing the execution of programs and coordinating
between different processes.
Memory management system calls are used to allocate and manage memory resources. Examples
include `mmap()`, which maps files or devices into memory, and `brk()`, which adjusts the end of
the data segment of a process. These calls help applications request and manage memory
dynamically.
Device management system calls allow applications to interact with hardware devices. These calls
include `ioctl()`, which is used to configure device parameters, and various calls for reading and
writing device data. They enable communication between user applications and hardware
peripherals.
Information management system calls provide information about system resources and process
status. Examples include `getpid()`, which retrieves the process ID, and `stat()`, which provides file
status information. These calls help applications obtain necessary details about the system
environment and resources.
Overall, these types of system calls form the core interface through which user applications request
and manage system resources and services.

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:
K. J. Somaiya College of Engineering, Mumbai-77
(A Constituent College of Somaiya Vidyavihar University)
Department of Electronics Engineering

Conclusion:

Thus, we have understood the working Process based system calls.

Signature of faculty in-charge with Date:

Computer Operating System Semester: VII Academic Year: 2024-25


Roll No:

You might also like