Operating System & Compiler
(Programming for Problem Solving BTPS-
101-18
Prepared By
Dr. Dinesh Gupta
Assistant Professor
Department of Computer Science & Engineering
IKG Punjab Technical University, Kapurthala
Operating System
An Operating system (OS) is a system software which acts as an
interface between the end user and computer hardware. Every
computer must have at least one OS to host other applications.
Kernel & Shell
Kernel is the central/core component of a computer operating system.
The key job performed by the kernel is to the manage the
communication between the software and the hardware. While the
Kernel is the innermost part of an operating system, a shell is the
outermost component responsible for interpretation of commands.
Types of Kernel
Monolithic
A monolithic kernel is a single code or block of the program. It provides all
the required services offered by the operating system. It is a simplistic
design which creates a distinct communication layer between the
hardware and software.
Microkernels
Microkernel manages all system resources. In this type of kernel, services
are implemented in different address space. The user services are stored
in user address space, and kernel services are stored under kernel address
space. So, it helps to reduce the size of both the kernel and operating
system.
Functions of Operating System
Types of Operating Systems
• Batch Operating System
• Multiprogramming Batch Operating System
• Multitasking/Time Sharing OS
• Multiprocessing OS
• Real Time OS
• Distributed OS
• Network OS
• Mobile OS
Compiler
A compiler is a computer program which helps you transform source
code written in a high-level language into low-level machine language.
It translates the code without changing the meaning of the code. The
compiler also makes the end code efficient which is optimized for
execution time and memory space.
Types of Compilers
Single Pass Compiler: In single pass Compiler source code directly
transforms into machine code.
• Two Pass Compiler: Two pass Compiler is divided into two sections,
Front end: It maps legal code into Intermediate Representation (IR).
Back end: It maps IR onto the target machine
Steps in Compiling
Thank You