0% found this document useful (0 votes)
4 views25 pages

System Call and Operations - Unit 1-Session3

The document outlines the course structure and outcomes for an Operating Systems course, detailing the skills students will acquire, such as applying semaphores for synchronization and analyzing scheduling algorithms. It covers various topics including operating system services, system calls, and types of system calls related to process control, file management, and device management. Additionally, it lists required textbooks and references for further study.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views25 pages

System Call and Operations - Unit 1-Session3

The document outlines the course structure and outcomes for an Operating Systems course, detailing the skills students will acquire, such as applying semaphores for synchronization and analyzing scheduling algorithms. It covers various topics including operating system services, system calls, and types of system calls related to process control, file management, and device management. Additionally, it lists required textbooks and references for further study.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

23ITT401

Operating System
Concepts
Dr.S.Ponni @ sathya, ASP/IT
Mrs.T.Sumathi, AP(SS)/IT
Course Outcome
Blooms Taxonomy
At the end of the course, the students will be able to:
Level
Apply Semaphores and monitors for classical real
1 world synchronization scenarios using operating Apply
system concepts

Analyze various process management scheduling


2 Analyze
algorithms for concurrently executing process.

Classify various scheduling algorithms in operating


3 Apply
systems for device management

Identify the various memory management techniques


4 Apply
to improve the utilization of the CPU.

23ITT401-Operating System concepts


Module I
Introduction: Operating system overview-objectives and
functions, Evolution of Operating System - Computer System
Organization Operating System Structure and Operations-
System Calls, System Programs, OS Generation and System Boot.
Computing Environments: Virtualization - Process Concept:
Process Scheduling: Scheduling Queues-Schedulers-Context
Switch– Operations on Processes – Inter-process
Communication - Threads: Multi-Threading Models – Threading
Issues.
CPU Scheduling: Scheduling Criteria – Scheduling Algorithms:
FCFS, SJF, Priority, Round Robin– Multiple-Processor
Scheduling. Synchronization: Critical Section Problem.
Synchronization Hardware – Mutex - Locks-Semaphores –
Classic Problems of Synchronization.

23ITT401-Operating System concepts


UNIT I Overview of Operating
System

CO1: Apply Semaphores and monitors for classical


real world synchronization scenarios using operating
system concepts
LO1: Describe about Overview of Operating System
SO4: Explain the Operating-System Services and
system call working process.

23ITT401-Operating System concepts


A View of Operating System
Services

23ITT401-Operating System concepts


Operating System Services
• One set of operating-system services provides functions that are helpful to the
user:
• User interface - Almost all operating systems have a user interface
(UI)
• Varies between Command-Line (CLI), Graphics User Interface (GUI),
Batch
• Program execution - The system must be able to load a program
into memory and to run that program, end execution, either
normally or abnormally (indicating error)
• I/O operations - A running program may require I/O, which may
involve a file or an I/O device
• File-system manipulation - The file system is of particular
interest. Obviously, programs need to read and write files and
directories, create and delete them, search them, list file
Information, permission management.

23ITT401-Operating System concepts


Operating System Services (Cont)
• Communications – Processes may exchange
information, on the same computer or between
computers over a network
• Communications may be via shared memory or through
message passing (packets moved by the OS)
• Error detection – OS needs to be constantly aware of
possible errors
• May occur in the CPU and memory hardware, in I/O devices, in
user program
• For each type of error, OS should take the appropriate action to
ensure correct and consistent computing
• Debugging facilities can greatly enhance the user’s and
programmer’s abilities to efficiently use the system

23ITT401-Operating System concepts


Operating System Services (Cont)
• Another set of OS functions exists for ensuring the efficient operation of
the system itself via resource sharing

• Resource allocation - When multiple users or multiple jobs running


concurrently, resources must be allocated to each of them

• Many types of resources - Some (such as CPU cycles, main


memory, and file storage) may have special allocation code,
others (such as I/O devices) may have general request and
release code

• Accounting - To keep track of which users use how much and what
kinds of computer resources

23ITT401-Operating System concepts


• Protection and security - The owners of information stored in a
multiuser or networked computer system may want to control use of that
information, concurrent processes should not interfere with each other

• Protection involves ensuring that all access to system resources is


controlled

• Security of the system from outsiders requires user authentication,


extends to defending external I/O devices from invalid access
attempts

• If a system is to be protected and secure, precautions must be


instituted throughout it. A chain is only as strong as its weakest link.

23ITT401-Operating System concepts


System Calls
• System Calls provide an interface to the services made
available by an operating system.
• Typically written in a high-level language (C or C++)
• Mostly accessed by programs via a high-level Application
Program Interface (API) rather than direct system call
use
• Three most common APIs
Win32 API for Windows,
 POSIX API for POSIX-based systems (including virtually
all versions of UNIX, Linux, and Mac OS X)
Java API for the Java virtual machine (JVM)

23ITT401-Operating System concepts


Example of System Calls
• System call sequence to copy the contents of one file to another file

23ITT401-Operating System concepts


Example of Standard API
• Consider the ReadFile() function in the Win32 API—a function for reading
from a file

• A description of the parameters passed to ReadFile()


• HANDLE file—the file to be read
• LPVOID buffer—a buffer where the data will be read into and written
from
• DWORD bytesToRead—the number of bytes to be read into the buffer
• LPDWORD bytesRead—the number of bytes read during the last read
• LPOVERLAPPED ovl—indicates if overlapped I/O is being used

23ITT401-Operating System concepts


System Call Implementation
• Typically, a number associated with each system call
• System-call interface maintains a table indexed according
to these numbers
• The system call interface invokes intended system call in OS
kernel and returns status of the system call and any return
values
• The caller need know nothing about how the system call is
implemented
• Just needs to obey API and understand what OS will do as a
result call
• Most details of OS interface hidden from programmer by
API
• Managed by run-time support library (set of functions
built into libraries included with compiler)

23ITT401-Operating System concepts


API – System Call – OS Relationship

23ITT401-Operating System concepts


Standard C Library Example
• C program invoking printf() library call, which
calls write() system call

23ITT401-Operating System concepts


System Call Parameter Passing
• Often, more information is required than simply identity
of desired system call
• Exact type and amount of information vary according to OS and
call
• Three general methods used to pass parameters to the
OS
• Simplest: pass the parameters in registers
• In some cases, may be more parameters than registers
• Parameters stored in a block, or table, in memory, and address of
block passed as a parameter in a register
• This approach taken by Linux and Solaris
• Parameters placed, or pushed, onto the stack by the program and
popped off the stack by the operating system
• Block and stack methods do not limit the number or length of
parameters being passed

23ITT401-Operating System concepts


Parameter Passing via Table

23ITT401-Operating System concepts


Types of System Calls
• Process control
• File management
• Device management
• Information maintenance
• Communications
• Protection

23ITT401-Operating System concepts


Types of System Calls
• Process control
• create process, terminate process
• end, abort
• load, execute
• get process attributes, set process attributes
• wait for time
• wait event, signal event
• allocate and free memory
• Dump memory if error
• Debugger for determining bugs, single step
execution
• Locks for managing access to shared data between
processes
Types of System Calls (Cont.)
• File management
• create file, delete file
• open, close file
• read, write, reposition
• get and set file attributes
• Device management
• request device, release device
• read, write, reposition
• get device attributes, set device attributes
• logically attach or detach devices
Types of System Calls (Cont.)
• Information maintenance
• get time or date, set time or date
• get system data, set system data
• get and set process, file, or device attributes
• Communications
• create, delete communication connection
• send, receive messages if message passing
model to host name or process name
• From client to server
• Shared-memory model create and gain access
to memory regions
• transfer status information
• attach and detach remote devices
Types of System Calls (Cont.)

• Protection
• Control access to resources
• Get and set permissions
• Allow and deny user access
Examples of Windows and Unix System Calls

23ITT401-Operating System concepts


Text & Reference Books

Text Book(s):
1. Silberschatz, Galvin, and Gagne, “Operating System Concepts”,
9th Edition, Wiley India Edition, New Delhi 2018.
REFERENCES:
R1. Andrew S. Tanenbaum, “Modern Operating Systems”, 4th
Edition, Pearson Education/PHI, New Delhi 2014
R2. Gary Nutt, “Operating Systems”, 3rd Edition, Pearson
Education, New Delhi, 2009.
R3. Harvey M. Deital, “Operating Systems”, 3rd Edition, Pearson
Education, New Delhi, 2009.

23ITT401-Operating System concepts


Thank You

23ITT401-Operating System concepts

You might also like