0% found this document useful (0 votes)
7 views100 pages

Operating Systems Overview and Concepts

Uploaded by

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

Operating Systems Overview and Concepts

Uploaded by

manoj.shinde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

MIT School of Computing

Department of Computer Science & Engineering

21BTIS501-Operating System

Class - T.Y. (SEM-I)

Unit
PLD- I

INTRODUCTION

AY 2024-2025 SEM-I

1
MIT School of Computing
Department of Computer Science & Engineering

Unit-I INTRODUCTION

● What Operating Systems, Computer-System Organization,


Computer-System Architecture, Operating-System Structure,
Operating-System Operations,
PLD Process Management, Memory
Management, Storage Management, Protection and Security,
Operating-System Service, User Operating-System Interface,
System Calls, Types of System Calls, System Programs,
Operating-System Design and Implementation, Operating-
System Structure, Virtual Machines

2
MIT School of Computing
Department of Computer Science & Engineering

Unit-II PROCESS MANAGEMENT

● Process Concept, Process Scheduling, Operations on


Processes, Interprocess Communication, 5 Examples of
PLD
IPC Systems, Multithreading Models, Threading Issues,
CPU Scheduling, Basic Concepts, Scheduling Criteria,
Scheduling Algorithms, Multiple-Processor Scheduling,
Thread Scheduling

3
MIT School of Computing
Department of Computer Science & Engineering

Unit-III
PROCESS SYNCHRONIZATION
AND DEADLOCKS
• Background, The Critical-Section Problem, Peterson's
Solution, Synchronization
PLD Hardware, Semaphores,
Classic Problems of Synchronization, Monitors,
Synchronization Example, Atomic Transactions,
Deadlocks, System Model, Deadlock Characterization,
Methods for Handling Deadlocks, Deadlock Prevention,
Deadlock Avoidance, Deadlock Detection, Recovery from
Deadlock

4
MIT School of Computing
Department of Computer Science & Engineering

Unit-IV MEMORY MANAGEMENT

● Background, Swapping, Contiguous Memory Allocation,


Paging, Structure of the Page Table, Segmentation,
PLD
Virtual Memory, Background, Demand Paging, Copy~on-
Write, Page Replacement, Allocation of Frames,
Thrashing

5
MIT School of Computing
Department of Computer Science & Engineering

Unit-V STORAGE MANAGEMENT

● File-System Interface, File Concept, Access Methods,


Directory Structure, File-System Mounting, File Sharing,
Protection, File-SystemPLD Implementation, File-System
Structure, File-System Implementation, Directory
Implementation, Allocation Methods, Free-Space
Management, Efficiency and Performance, Recovery, Mass-
Storage Structure, Disk Structure, Disk Scheduling, Swap-
Space Management
6
MIT School of Computing
Department of Computer Science & Engineering

OS Introduction
PLD

7
MIT School of Computing
Department of Computer Science & Engineering

What is an Operating System?


• Computer System = Hardware + Software
• Hardware  only understand machine code i.e 0 and 1).
• Software = Application Software + System Software(OS)
• An Operating System is a system Software that acts as
an interface between aPLDuser and the computer
hardware.
• Operating system is a collection or set of programs,
which manages all the resources of the computer system.
• It basically manages all the resources of the computer.
• Example: Unix, Window, Linux, Ms-Dos.

8
MIT School of Computing
Department of Computer Science & Engineering

Overview of Operating Systems

PLD

9
MIT School of Computing
Department of Computer Science & Engineering

Overview of Operating Systems


Divided into four components-
1] Hardware: Physical part of machine which provide basic
computing resources.
Eg: CPU, Memory, I/O Devices etc.
PLD

2]Operating System:
• It controls & co-ordinates use of hardware among various
application & user.
• It assign different jobs to the hardware part while running a
program.
3]Application Program: It defines the ways in which the system
resources are used to solve the computing problems of the users.
10
MIT School of Computing
Department of Computer Science & Engineering

Overview of Operating Systems


-Application are readymade packages ready to use.
-They utilize the hardware as well as software resources
and fulfills user requirement.
Eg: web browser, databasePLD
system, video games etc.

4]User: Users are people, machines, other computers.

11
MIT School of Computing
Department of Computer Science & Engineering

Characteristic of Operating System


• Scheduling allocate CPU to process
• Memory Management
• Security User access control
PLD to recourse & monitors
• Interaction with different software
• Device Management I/O controlling

• File Management to store, organize, and manage

files and directories


12
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Operating System


• Source of computing Input, processing and output
• User-Friendly Interface- GUI rather than command
line interface.
• Resource Sharing- Sharing PLD
S/W & H/W recourses
• No Coding Lines- GUI eliminated the process of
writing complex commands for doing small tasks.
• Data Protection- Username and Password, Biometric
Verification, Authentication & recourse allocation
• Multitasking- ability to execute multiple tasks at a
time
13
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Operating System

• Expensive-
• System Failure-
PLD
• Highly Complex language for programming
• Virus Threats halts the functioning and slows down.
• Fragmentation

14
MIT School of Computing
Department of Computer Science & Engineering

Types of Operating Systems

[Link] Operating System


[Link]-sharing Operating System:
[Link] Operating
PLD System:
[Link] Operating System:
[Link]-time Operating System:
[Link] Operating System:
[Link] Operating Systems:
15
MIT School of Computing
Department of Computer Science & Engineering

[Link] Operating System

PLD

16
MIT School of Computing
Department of Computer Science & Engineering

[Link] Operating System


• A system that allows multiple users to use it, without
direct communication between them.
• It achieves this by keeping all users in separate
‘batches’, meaning they PLD
can’t interact with each other
directly.
• This makes it ideal for applications where users need
to work on separate parts of a project, without
getting in the way of each other.
• Examples of Batch Operating Systems: Payroll
Systems, Bank Statements, etc.
17
MIT School of Computing
Department of Computer Science & Engineering

[Link] Operating System


Advantages of Batch Operating System
1. Multiple users can share the batch systems.
2. The idle time for the batch system is very less.
3. It is easy to manage large work
PLD repeatedly in batch systems.

Disadvantages of Batch Operating System


1. The operators should be well known with batch systems.
2. Batch systems are hard to debug.
3. The other jobs have to wait for an unknown time if any job fails.
4. It has a high turnaround time.
5. Failure of one job impacts the execution of other jobs
18
MIT School of Computing
Department of Computer Science & Engineering

2. Time-sharing Operating System:


• Each task is given some time to execute so that all the
tasks work smoothly.
• Each user gets the time of the CPU as they use a single
system.
• These systems are also known
PLD as Multitasking Systems.
• The task can be from a single user or different users also.
• The time that each task gets to execute is called
quantum.
• After this time interval is over OS switches over to the
next task.
• Examples of Time-Sharing OS UNIX, Linux, IBM
VM/CMS, Windows NT server, Windows 2000 server
19
MIT School of Computing
Department of Computer Science & Engineering

2. Time-sharing Operating System:

PLD

20
MIT School of Computing
Department of Computer Science & Engineering

2. Time-sharing Operating System:


Advantages of Time-Sharing OS
1. Each task gets an equal opportunity.
2. CPU idle time can be reduced.
3. PLD users.
Resource Sharing between multiple
4. Time-sharing allows users to work concurrently. Its reduce waiting
time.
5. Improved User Experience:
Disadvantages of Time-Sharing OS
1. It has difficulty with consistency.
2. A security and integrity problem with user programs and data.
3. High Overhead because need for scheduling, context switching.
21
MIT School of Computing
Department of Computer Science & Engineering

3. Distributed Operating System:

PLD

Key Characteristics of Centralized Systems


1. Single Point of Control:
2. Scalability Issues:
3. Single Point of Failure
4. No Fault Tolerance
5. No Coordination and Communication:
6. No Resource Sharing
7. Performance degrade with increased load. 22
MIT School of Computing
Department of Computer Science & Engineering

3. Distributed Operating System:


• A collection of autonomous computer systems that are
physically separated but are connected by a centralized
computer network that is equipped with distributed
system software. PLD
• The autonomous computers will communicate among
each system by sharing resources and files and
performing the tasks assigned to them.
• Distributed Operating Systems are of two types:
Client-Server Systems and Peer-to-Peer Systems.
• Examples of distributed operating systems Solaris,
Micros, DYNIX, Ubuntu, Linux 23
MIT School of Computing
Department of Computer Science & Engineering

3. Distributed Operating System:

PLD

24
MIT School of Computing
Department of Computer Science & Engineering

3. Distributed Operating System:


Advantages of Time-Sharing OS
1. Failure of one will not affect the other network
communication, as all systems are independent of each other.
2. Load on host computer reduces.
PLD
3. Since resources are being shared, computation is highly fast
and durable.
Disadvantages of Time-Sharing OS
1. Failure of the main network will stop the entire communication.
2. To establish distributed systems the language is used not well-
defined yet.
3. These types of systems are not readily available as they are
very expensive. 25
MIT School of Computing
Department of Computer Science & Engineering

Multiprocessing Operating System:

PLD

Single processor system


• Throughput is less
• More cost because require separate resources
• No Fault tolerant
• Performance degrade with increased load.
26
MIT School of Computing
Department of Computer Science & Engineering

Multiprocessing Operating System:

• It used to boost the performance of multiple


CPUs within a single computer system.
• Multiple CPUs are linked
PLD together so that a job
can be divided and executed more quickly.
• When a job is completed, the results from all
CPUs are compiled to provide the final
output.

27
MIT School of Computing
Department of Computer Science & Engineering

4. Network Operating System:

• An operating system that connects multiple


computers and devices on a local area network to
allow sharing of PLD files and resources by
connection and communication over a
network.
• Examples of Network Operating Systems
UNIX, Linux, Microsoft Windows Server 2008,
Microsoft Windows Server 2003, Novell
NetWare, Banyan's VINES, Artisoft's LANtastic,
Mac OS X, and BSD. 28
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Network Operating System

1. Centralized management –
2. Resource sharing –
3. Scalability PLD
4. Security –
5. Remote access –

29
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Network Operating System

1. Complexity –
2. Cost -
3. Security – PLD
4. Compatibility –
5. Maintenance –

30
MIT School of Computing
Department of Computer Science & Engineering

Embedded Operating Systems

1. Combination Of Software &


Hardware
2. Real-time Operating System
3. To Perform Specified Tasks
PLD 4. Reactive operation
5. Popular example are eCos,
mbed OS, VxWorks,
µC/OS-II, FreeRTOS

31
MIT School of Computing
Department of Computer Science & Engineering

Embedded Operating Systems


• Embedded Operating Systems is a specialized operating
system (OS) designed to perform a specific task for a device
that is not a computer.
• The main job of an embedded OS is to run the code that
allows the device to do its job.
PLD
• It makes the device's hardware accessible to software that is
running on top of the OS.
• It typically consists of a microcontroller or microprocessor,
memory, input/output interfaces.
• These systems are programmed to carry out specific tasks
and are often found in everyday devices such as appliances,
automobiles, medical devices, and industrial machines.
32
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Embedded Operating Systems


1. Cost:
2. Sizes:
3. Effectiveness: PLD
4. Real-time operation:
5. Improved product quality.
6. low power operation
7. Portable due to the small size

33
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Embedded Operating Systems


1. Limited resources:
2. Limited flexibility- Less adaptable
3. The difficulty of programming
PLD

4. Absence of standardisation:
5. Hardware dependence:

34
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Embedded Operating Systems


1. Limited resources:
2. Difficulty of programming:
3. Absence of standardisation:
PLD

4. Hard for maintenance

35
MIT School of Computing
Department of Computer Science & Engineering

Computer-System Structure
1. Simple Structure
2. Monolithic Structure
3. Layered Structure
4. Microkernel Structure PLD

36
MIT School of Computing
Department of Computer Science & Engineering

1. Simple Structure
• Used very beginning and old Structure
• Not having well designed structure
• EX- MS-DOS
• At BottomBIOS DD i.e HW
• DD accesshw
• PLD
Resident system program DD & HW
• At Top Application Pragram
Residencial system program & Access
HW.
• Interface & levels of functionality are
not separated.
• Used 8088 not support dual mode or not
having protection to hw.

37
MIT School of Computing
Department of Computer Science & Engineering

1. Simple Structure
• Not well design and structured.
• At bottom is ROM BIOS device driver
is nothing but the Hardware
PLD
layer.
• At top is application program is nothing
but the user interface.
• Application program directly access
hardware.
• Ex- MS-DOS
38
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Simple Structure:


[Link] to develop
[Link] application performance
PLD
Disadvantages of Simple Structure:

[Link] Secure
[Link] user application fails all os fails.
[Link] well design and structured.

39
MIT School of Computing
Department of Computer Science & Engineering

2. Monolithic Structure
• Followed by Unix OS
• 1st User
• 2nd  Shell, system call,
compiler, interpreter,
PLD system Library.
• 3rd  System call interface
to kernel.
• 5th  above HW & below
functionality.
• Everything packed in one
level hence called
monolithic structure.
• 5th  HW 40
MIT School of Computing
Department of Computer Science & Engineering

2. Monolithic Structure
• This operating system works in the kernel space in
the monolithic system.
• The monolithic kernel is quite fast as the services
such as memory management,
PLD file management,
process scheduling etc.
• A set of primitives or system calls implement all
operating system services such as process
management, concurrency, and memory
management.
• Example Linux, BSDs, Solaris, DOS, OpenVMS
41
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Monolithic Kernel


• Faster execution due to direct access to all the
services.
• Simple and easy to implement structure.
• Fewer lines of codesPLDneed to be written for a
monolithic kernel.
• In memory massively quicker
• Less code to write

42
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Monolithic Kernel


• If one component fails, the entire system crashes
• Slower development speed –
• Debugging is complex and difficult
PLD
• It’s difficult to add new functionalities

43
MIT School of Computing
Department of Computer Science & Engineering

3. Layered Structure
• Divide into Nor of
layers. i.e layer 0
HW…layer N  user
PLD interface.
• Broken down
functionality into
separate layer.
• Easy to implements
and design.
• Ex- Windows NT OS
44
MIT School of Computing
Department of Computer Science & Engineering

Layered Structure
• Layered Structure is a type of system structure in
which the different services of the operating
system are split into various
PLD
layers.
• Where each layer has a specific well-defined
task to perform.
• It was created to improve the pre-existing
structures like the Monolithic structure ( UNIX )
and the Simple structure ( MS-DOS ).
• Example – Windows NT operating system
45
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Layered Structure


• Modularity:
• Easy debugging:
• Easy update: PLD
• No direct access to hardware:
• Well design and define structure

46
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Layered Structure


• Complex and careful implementation:
• Slower in execution:
• Communication:(between adjacent layer)
PLD

47
MIT School of Computing
Department of Computer Science & Engineering

4. Microkernel Structure (Ex- Mac OS X)

• In monolithic kernel all


functionalities packed into
kernel make structure big.
• Micro  Small structure
PLD•
Two separate mode
• User mode essential function.
• Kernel mode  Non-essential
function.(Core functionalities)
• Main function:- provide
communication bet client and
services. Massage passing

48
MIT School of Computing
Department of Computer Science & Engineering

4. Microkernel Structure
• In microkernel, user services and kernel
services are kept in separate address space.
• OS is complex to design.
PLD
• Microkernel are smaller in size.
• Easier to add new functionalities.
• Failure of one component does not effect
the working of micro kernel.
• Example : Mac OS X.
49
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Microkernel Structure


• It allows the operating system to be
portable between platforms.
• Micro-Kernels arePLDsmaller, they can be
successfully tested.
• Failure of one component does not effect
the working of micro kernel.
• It is simple to maintain.
• Easier to add new functionalities.
50
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Microkernel Structure


• Complex to design Modular Structure
• If Kernel fails then then all system collapse
• Microkernel system is costly.
• Low performance  PLD Massage passing

51
MIT School of Computing
Department of Computer Science & Engineering

Computer-System Architecture

PLD

52
MIT School of Computing
Department of Computer Science & Engineering

Computer-System Architecture
• A computer system is basically a machine that
simplifies complicated tasks.
• It should maximize performance and reduce costs as
well as power consumption.
PLD
• The different components in the Computer System
Architecture are
1. Input Unit,
2. Output Unit,
3. Storage Unit,
4. Arithmetic Logic Unit,
5. Control Unit etc. 53
MIT School of Computing
Department of Computer Science & Engineering

Input Unit,
• The input unit provides data to the computer
system from the outside.
• So, basically it links the external environment
with the computer. PLD
• It takes data from the input devices, converts
it into machine language and then loads it into
the computer system.
• Keyboard, mouse etc. are the most commonly
used input devices.
54
MIT School of Computing
Department of Computer Science & Engineering

Output Unit
• The output unit provides the results of
computer process to the users i.e it links
the computer with the external
PLD
environment.
• Most of the output data is the form of
audio or video.
• The different output devices are monitors,
printers, speakers, headphones etc.
55
MIT School of Computing
Department of Computer Science & Engineering

Storage Unit
• It is traditionally divided into primary storage and
secondary storage.
• Primary storage is also known as the main memory
and is the memory directly accessible by the CPU.
• Secondary or external PLD storage is not directly

accessible by the CPU.


• The data from secondary storage needs to be
brought into the primary storage before the
CPU can use it.
• Secondary storage contains a large amount of data
permanently.
56
MIT School of Computing
Department of Computer Science & Engineering

Arithmetic Logic Unit


• All the calculations related to the computer
system are performed by the arithmetic logic
unit.
• It can perform operations
PLD like addition,
subtraction, multiplication, division etc.
• The control unit transfers data from storage
unit to arithmetic logic unit when calculations
need to be performed.
• The arithmetic logic unit and the control unit
together form the central processing unit.
57
MIT School of Computing
Department of Computer Science & Engineering

Control Unit etc.


• This unit controls all the other units of the
computer system and so is known as its central
nervous system.
• It transfers data throughout
PLD the computer as
required including from storage unit to central
processing unit and vice versa.
• The control unit also dictates how the memory,
input output devices, arithmetic logic unit etc.
should behave.
58
MIT School of Computing
Department of Computer Science & Engineering

Operating-System Operations

PLD

59
MIT School of Computing
Department of Computer Science & Engineering

Operating-System Operations

1. Process Management
2. Memory Management
3. Storage Management
PLD

4. Protection and Security

60
MIT School of Computing
Department of Computer Science & Engineering

Process Management
• A program in execution is called a process.
• The OS helps you to create, schedule, and
terminates the processes which is used by
PLD
CPU.
• Process management contains various tasks
like creation, scheduling, termination of
processes, and a deadlock handling.

61
MIT School of Computing
Department of Computer Science & Engineering

Process Management Activity

1. Creating and deleting both user and system processes


2. Suspending and resuming processes
PLD
3. Providing mechanisms for process synchronization
4. Providing mechanisms for process communication
5. Providing mechanisms for deadlock handling

62
MIT School of Computing
Department of Computer Science & Engineering

Memory Management

• Memory management is a method in the


operating system manage operations between
PLD
main memory and disk during process
execution.
• The main aim of memory management is to
achieve efficient utilization of memory.
63
MIT School of Computing
Department of Computer Science & Engineering

Why Memory Management is Required?


• Allocate and de-allocate memory before and
after process execution.
• To keep track of used memory space by
PLD
processes.
• To minimize fragmentation issues.
• To proper utilization of main memory.
• To maintain data integrity while executing of
process.

64
MIT School of Computing
Department of Computer Science & Engineering

Storage management
• Its provide mechanism to handle and
manage primary memory and secondary
memory while execution of process.
PLD
• Storage management keeps track of each and
every memory location, regardless of either it
is allocated to some process or it is free.

65
MIT School of Computing
Department of Computer Science & Engineering

Protection and Security


• Protection- is mechanism for controlling
access of processes or users to resources
defined by the OS Security.
PLD
• Security is the defense of the system against
internal and external attacks Huge range,
including denial-of-service, worms, viruses,
identity theft, theft of service.

66
MIT School of Computing
Department of Computer Science & Engineering

Services of Operating System


1. User Interface
2. Program Execution
3. File system manipulation
4. Input / Output Operations
PLD

5. Communication
6. Resource Allocation
7. Error Detection
8. Accounting
9. Security and protection
67
MIT School of Computing
Department of Computer Science & Engineering

1. User Interface
1. Command line interface
2. Graphical User Interface

PLD

• A CLI establishes the interaction between users and the


operating system through a text-based set of commands.
• (GUI) is a digital interface in which a UI with graphical
components such as icons, buttons, and menus.
68
MIT School of Computing
Department of Computer Science & Engineering

2. Program Execution
• OS manages how a program is going to be executed.
• Loads a program into memory.
PLD
• Executes the program.
• Handles program's execution.
• Provides a mechanism for process synchronization.
• Provides a mechanism for process communication.
• Provides a mechanism for deadlock handling. 69
MIT School of Computing
Department of Computer Science & Engineering

3. File system manipulation

• OS gives the permission to the program for


operation on file.
PLD
• To set permission to the file.
• Provide interface to create/delete files, and
directories.
• Provides an interface to create the backup of
file system. 70
MIT School of Computing
Department of Computer Science & Engineering

4. Input / Output Operations

PLD

71
MIT School of Computing
Department of Computer Science & Engineering

5. Communication
• The process communicate with each other in form of data
transfer among them.
• Some time this processes are for same system or some may be
for different processes.
• But through computer network communication is managed by
PLD
OS.
• The communication can be done through
1. Pipe
2. Shared Memory

72
MIT School of Computing
Department of Computer Science & Engineering

Resource Allocation
• Resource allocation means assigning computing
resources to processes and users.
• We have many resource types, such as CPU
(actually, CPU time),PLD
memory, networking, and
I/O devices.
• So, as the operating system controls these
resources, it naturally decides which processes
use them.
• During their lifecycle, a process will typically
require multiple computing resources.
73
MIT School of Computing
Department of Computer Science & Engineering

Error Detection
• It is service of OS must avoid a computer system
completely breaking down when an error happens.
• So, this service must catch errors and manage them,
keeping the entire system as functional as possible.
• It able to inform the user
PLD about the errors, showing
their codes, descriptions, and, if known, manners to fix
them.
• Ex-1.
• CPU errors,
• memory bad allocations or accesses,
• a component failure causing a
hardware error,
• or even an error caused by an I/O
device.
74
MIT School of Computing
Department of Computer Science & Engineering

8. Accounting
• Accounting consists of keeping track of the behavior of
both users and processes in the computing system.
• It obtained information and generate statistics about
the users of the computer system and the processes
PLD
running on it.

75
MIT School of Computing
Department of Computer Science & Engineering

Security and protection

PLD

Biometric Identification
Authentication

Authorization 76
MIT School of Computing
Department of Computer Science & Engineering

Introduction to System Calls


• To understand system calls, first one needs to
understand the difference between kernel mode and
user mode of a CPU. User Mode:
• User Laptop/PC Application
PLD • When the CPU is in user mode,
programs can’t access memory
and hardware directly.

Kernel Mode:
• While the CPU is in kernel
mode, programs can directly
access the memory as well as
hardware.
• Ex- Text editor
• Ex- Bank 77
MIT School of Computing
Department of Computer Science & Engineering

SYSTEM CALL:
• A system call is a Programmatical way computer
program request the service from kernel of OS.
• When a program in user mode requires access to
RAM or a hardware PLD resource, it must ask the
kernel to provide access to that resource. This is
done via something called a system call.
• When a program makes a system call, the mode
is switched from user mode to kernel mode.
This is called a context switch.
78
MIT School of Computing
Department of Computer Science & Engineering

SYSTEM CALL:

PLD

79
MIT School of Computing
Department of Computer Science & Engineering

Types of System Calls

PLD

[Link] Management-
[Link] Management
[Link] Maintenance
[Link]
[Link] Control
80
MIT School of Computing
Department of Computer Science & Engineering

Types of System Calls


• Used to direct the processes include creating, load,
Process Control
abort, end, execute, process, terminate the process, etc.

• Used to handle the files include creating files, delete


File Management
files, open, close, read, write, etc.
PLD
• Used to deal with devices include read, device, write,
Device Management
get device attributes, release device, etc.

• Used to maintain information, including getting system


Information
data, set time or date, get time or date, set system data,
Maintenance
etc.

• Used for communication, including create, delete


Communication communication connections, send, receive messages,
etc.
81
MIT School of Computing
Department of Computer Science & Engineering

Examples of Windows and Unix system calls


Process Windows Unix
• CreateProcess() Fork()
Process Control ExitProcess() Exit()
WaitForSingleObject() Wait()

• CreateFile() Open()
ReadFile() Read()
File Manipulation
WriteFile() PLD Write()
CloseHandle() Close()

• SetConsoleMode() Ioctl()
Device Management ReadConsole() Read()
WriteConsole() Write()

• GetCurrentProcessID() Getpid()
Information Maintenance SetTimer() Alarm()
Sleep() Sleep()

• CreatePipe() Pipe()
Communication CreateFileMapping() Shmget()
MapViewOfFile() Mmap()

• SetFileSecurity() Chmod()
Protection InitializeSecurityDescriptor() Umask()
82
SetSecurityDescriptorgroup() Chown()
MIT School of Computing
Department of Computer Science & Engineering

System Programming
• Activity of programming system
software.
• HWOSSystem_callsSP AP
• Program Development & Execution is
PLD done.
• SP provide interface bet UI & System
calls
• SP manage & control H/W &
Resources.
• Ex-
1. Operating system
2. CLI
3. Device driver
4. Compiler& Interpreter
5. Assembler
6. Loader 83
MIT School of Computing
Department of Computer Science & Engineering

System Programming
• System programming is the activity of programming
system software.
• User cannot access computer resources directly.
• System programs provide PLD
services to other software.
• To design for handling resources.
• Some examples of system software Operating systems,
device drivers, compilers, debuggers, web servers,
communication protocols and networking utilities.
• Platform for developing system software are- C, Go,
Rust, Swift and WebAssembly, Perl, and Ruby.
84
MIT School of Computing
Department of Computer Science & Engineering

Difference between System Programming and


Application programming
System Programming Application Programming
System Programming is Application program is designed
designed to provide platform to
PLDto perform any specific task or
other software. function.
To design for handling To designed for perform task
resources with respect to work.
Development language C, C++, Assemble
language, JavaScript, Java, C#, Python, Development language C, C++, VB.
Visual Basic, PHP, Perl, and Ruby.

Ex- Operating system, Ex-Microsoft office, Web


Assembler, Device driver browser
85
MIT School of Computing
Department of Computer Science & Engineering

Operating-System Design and Implementation


• The construction of OS that allows the user
programs to interact with the system HW.
• Its provides an atmosphere in which different
applications and programs
PLD can do useful work.
• There are many problems that can occur
while designing and implementing an
operating system.
• These are covered in operating system design
and implementation.
86
MIT School of Computing
Department of Computer Science & Engineering

Operating-System Design and Implementation

The problems that can occur while designing and


implementing an operating system.
1. Operating System Design
PLD
Goals & Specification
2. Operating System Mechanisms and Policies
3. Operating System Implementation

87
MIT School of Computing
Department of Computer Science & Engineering

1. Operating System Design Goals and Specification

• Complex to define all goals and specification.


• The design changes depending on the type of OS.
• Specification  Choice of HW & Types of OS
• User & System Requirements
PLD while designing OS.

User Goals System Goals


The system should be System should be easy
convenient, easy to use, to design, implement
reliable, safe and fast and maintain. Should
according to the users. be flexible, error free.
88
MIT School of Computing
Department of Computer Science & Engineering

2. Operating System Mechanisms and Policies


• No Specific way to design OS.
• Mechanismshows how to do something and
Policy shows what will be done.
• Ex- Car PLD

• Policies may change over time and this would


lead to changes in mechanism.
• So Separation of mechanism and policy is
good option.

89
MIT School of Computing
Department of Computer Science & Engineering

3. Operating System Implementation


• After Designing implementation starts.
• Traditionally OS written in Assemble
language but now aPLDday also used high level
languages as C/C++.
• Advantages of High level Language
1. Code can be written fast.
2. Easy to understand and implements.
3. Easy to port.
90
MIT School of Computing
Department of Computer Science & Engineering

VIRTUAL MACHINE
• Computer having hardware resources as
RAM,CPU, storage and its operated by
operating system i.e. windows.
• If we needs to learnPLD and use Linux it required
separate new computer system with hardware
resources and then on that Linux OS is required.
• In virtualization no need of separate system and
its hardware resources.
• It allow user to install Linux on the top of
Windows.
91
MIT School of Computing
Department of Computer Science & Engineering

VIRTUAL MACHINE

PLD

Computer System without Virtual Machine Computer System with Virtual Machine
92
MIT School of Computing
Department of Computer Science & Engineering

HYPERVISOR IN VIRTUAL MACHINE

PLD

Working of Virtual System 93


MIT School of Computing
Department of Computer Science & Engineering

HYPERVISOR IN VIRTUAL MACHINE


• Hypervisor in virtual machine is technology in which allow user
to hosting multiple virtual computer on physical computer.
• Virtual box allow user to take h/w resources from host, create
virtual CPU, virtual RAM and virtual storage.
• Ex- Virtual box PLD
 By Oracle
 Open Source
 Works for all OS
• Other example of Virtual box
Vmware, Parallels Desktop, Microsoft Hyper-V, Citrix
Hypervisor

94
MIT School of Computing
Department of Computer Science & Engineering

HYPERVISOR IN VIRTUAL MACHINE


Vmware, Parallels Desktop, Microsoft Hyper-V, Citrix
Hypervisor

PLD

95
MIT School of Computing
Department of Computer Science & Engineering

TYPE OF HYPERVISOR

PLD

96
MIT School of Computing
Department of Computer Science & Engineering

TYPE OF HYPERVISOR
• Type 1 hypervisor functions as a light operating
system that operates directly on the host's
hardware. PLD
• Type 2 hypervisor functions as a software layer
on top of an operating system, similar to other
computer programs.

97
MIT School of Computing
Department of Computer Science & Engineering

Advantages of Virtual Machine

1. Different operating systems are running


simultaneously.
2. Virtual machine are completely
PLD
isolated.
3. Efficiently use of H/W resources.
4. Any problem with VM doesn’t affected to host
machine.
5. High reliability.

98
MIT School of Computing
Department of Computer Science & Engineering

Disadvantages of Virtual Machine

1. High cost because needs more cloud services.


2. Compatibility issue
3. It require additional configuration
PLD and maintenance.

99
MIT School of Computing
Department of Computer Science & Engineering

QUESTION BANK
1. Explain Computer-System Organization with suitable diagram.
2. Enlist and explain different types of system software
3. Enlist and explain different types of Application software
4. Define OS and Explain Functions of Operating Systems.
5. What is virtual Machine and Explain it.
6. What is System Call? What are its different [Link]
7. Elaborate Operating System layered Architecture.
8. List and Explain different operation performed by operating system.
9. Differentiate between system software and Application Software
10. Draw neat diagram and explain in detail computer system Architecture
11. Explain operating system structures?
[Link] is Operating System? Describe operating system architecture with suitable example
13. Explain operating system Design issues.
14. Write difference between Monolithic kernel and Micro kernel.
15. Brief User and Operating System Interface in detail.
100

You might also like