SlideShare a Scribd company logo
1 of 25
SUBMITTED TO
Mrs .Monika Mehra
(ECE-HOD)
SUBMITTED BY
GAGANDEEP
1514002
 INDIAN SERVICE MACHINE (Abbreviated as ISM) is the
company name that our founder felt appropriate, following the
lines of IBM (International Business Machine), ambitiously to
grow to the level.
 ISM was established in the year 1994 as a small scale industry
to assemble and resale PC’s and service PC’s, immediately
diversified to offer training based on PC Technologies.
 Over the period ISM felt native training clients on Embedded
Systems, having identified their strength in Embedded System
design and development; ISM acquired expertise on this domain
and collaborated with Embedded industry to offer an industry
relevant Embedded Systems training programs.
 Introduction of Embedded system & IOT
 8-bit microcontroller (8051)
 Minor project based on (8051)
 ARM 7/cortex m-3 (32-bit microcontrollers)
 ARM Protocols
 IPC In Linux
•An embedded system is some combination of computer
hardware and software, either fixed in capability or
programmable, that is specifically designed for a
particular function
What makes Embedded systems
different?
•Real time operation
• Size
• Cost
• Time
• Reliability
• Safety
• Energy
 Microcontroller is a VLSI chip which consist of a CPU
 CPU is a device Which executes instruction
Block diagram
Hardware used:-
• 8051 Microcontroller
• RFID Reader
• GSM Module
• LCD interface
Software used:-
•Kiel μVision IDE
• Uart protocol( flash-
magic)
General assembly
• A RFID tags used to indentified the unique ID
number
•The controller then matches the unique
code to the Central Database. Stipulated
price of the toll will be deducted from his
account..
•Then an SMS will be sent to the owner
using the GSM module about how much
money has been debited from his account.
APPLICATIONS
•Thus it can be installed inside the car from where it is not visible.
•As the cars need to be at a specified position for the system to scan the number plate
which is not required in RFID based system.
•Security is an added advantage
Block diagram of ARM based microcontroller
Important Protocols of ARM
•I2C
•Features of I2C
Only two bus lines are required; a serial data line (SDA) and a serial clock line (SCL)
•Each device connected to the bus is software addressable by a unique address and simple
master/slave relationships exist at all times;
•masters can operate as master-transmitters or as master-receivers
•It’s a true multi-master bus including collision detection and arbitration to prevent data
corruption if two or more masters simultaneously initiate data transfer
•Serial, 8-bit oriented, bi-directional data transfers can be made at up to 100 kbit/s in the
Standard-mode, up to 400 kbit/s in the Fast-mode, or up to 3.4 Mbit/s in the High-speed
mode.
•On-chip filtering rejects spikes on the bus data line to preserve data integrity
•The number of ICs that can be connected to the same bus is limited only by a maximum
bus capacitance of 400 pF
Control area network (CAN)
•The CAN Bus is an automotive bus developed by Robert Bosch
•CAN is a serial bus protocol to connect individual systems and
sensors as an alternative to conventional multi-wire looms.
•The Controller Area Network (CAN) is a serial communication way,
which efficiently supports distributed real-time control with a very
high level of security.
•It allows automotive components to
communicate on a dual-wire
networked data bus up to 1Mbps
•CAN is based on the “broadcast
communication mechanism”, which
is based on a message-oriented
transmission protocol.
SPI---Serial Peripheral Interface
•The Serial Peripheral Interface (SPI) bus was
developed by Motorola to provide full-duplex
synchronous serial communication between
master and slave devices.
•SPI can be clocked up to 10 MHz.
•The SPI busis commonly used for
communication with Flash memory,
•sensors, real-time clocks (RTCs),
analog-to-digital converters, and more
•SPI
Modes in SPI
•The frame of the data exchange is described by two
parameters, the clock polarity (CPOL) and the clock phase
(CPHA).
•This diagram shows the four possible states for these
parameters and the corresponding mode in SPI
Introducation of Embedded Linux
•Linux is a 100% free operating system
• Linus Torvalds. who was then a student at the
University of Helsinki in Finland, developed
Linux in 1991
•Implementation of IPC using Pipes, FIFO,
Message Queue for IPC, System calls related to
pipes, FIFO’s & Message Queues, Using ipcs,
ipcrm, Sample program
Inter Process Communication
•Files
•Pipes
• Message Queue
• Shared Memory
• Semaphores
• Signals
• Sockets
Files System Call
Create File =int creat (const char * pathname, int flags)
int open (const char * pathname, int flags)
Flags : O_RDONLY, O_WRONLY, O_RDWRO_CREAT , O_APPEND,
O_NONBLOCK,
ssize_t write = int (fd, void *buf, size_t count)
lseek System Call = off_t lseek ( int fd, off_t offset, int where)
Where : SEEK_SET, SEEK_CUR, SEEK_END
Pipes
•We use the term pipe when we connected a data flow from one process
•to another.
•In linux we familiar with a pipe “ | ” which is used to linking shell
system call used to create pipes
int open( const char *path, O_RDONLY |O_NONBLOCK);
int read( pid, buffer , size);
int write(pid, buffer , size);
pid ----- Descriptor returned by open()
buffer ----- Character buffer
size ----- Size of buffer
Message Queue
Features of Message Queue
•Easy and efficient .
•Used between related and unrelated process.
•Provide sending block of data.
•Blocking & Synchronization problems are
..avoid.
System Calls related to Message Queue
int msgget (key_t key,int msgflag); key ------- An arbitrary number
Msgflag--------- IPC_PRIVATE
IPC_CREAT
int msgsnd (int msqid,const void*msg_ptr,size_t msg_szint msgflag);
int msgrcv (int msqid,void *msg_ptr,size_t msg_sz,long int mtype,int
msgflag) ;
Sockets
Why do we need sockets?
•Provides an abstraction for interprocess
communication
Function:-
Initiate and accept a connection
Define an “end- point” for communication
Send and receive data
Terminate a connection gracefully
Types of sockets
Stream socket :(connection- oriented socket)
– It provides reliable, connected networking service
– Error free; no out- of- order packets (uses TCP)
– applications: telnet/ ssh, http, …
Continue…
• Datagram socket :( connectionless socket)
– It provides unreliable, best- effort
networking service
– Packets may be lost; may arrive out
of order (uses UDP)
– applications: streaming audio/
video (real-player), …
Client Server
System call
Make socket sock = socket( AF_ INET, SOCK_ STREAM, 0);
Setup structure
(
memset(& sin, 0, sizeof( sin));
sin. sin_ family = AF_ INET;
sin. sin_ addr. s_ addr = htonl( INADDR_ ANY);
sin. sin_ port = htons( port);
);
Bind if (bind( sock, (struct sockaddr *) &sin, sizeof( sin)) < 0)
return -1;
return sock;
sock = accept ( listen_ socket, (struct sockaddr *) &sin, &sin_ len);
return sock;
socket()
bind()
listen()
accept()
read()
write()
read()
close()
Socket()
connect()
write()
read()
close()
TCP Client
TCP Server
Well-known port
blocks until connection from client
process request
Connection establishment
Functionallty
Ppt on six month training on embedded system & IOT

More Related Content

What's hot

Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded System
Roshan Mani
 
Embedded Systems Training Report
Embedded Systems Training ReportEmbedded Systems Training Report
Embedded Systems Training Report
Akhil Garg
 

What's hot (20)

PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
BATTERY LESS PHONE
BATTERY LESS PHONE BATTERY LESS PHONE
BATTERY LESS PHONE
 
Home automation
Home automationHome automation
Home automation
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
IoT home automation project
IoT home automation projectIoT home automation project
IoT home automation project
 
Iot based energy management system
Iot based energy management systemIot based energy management system
Iot based energy management system
 
Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu Wi-Fi Esp8266 nodemcu
Wi-Fi Esp8266 nodemcu
 
Training Report on Embedded System
Training Report on Embedded SystemTraining Report on Embedded System
Training Report on Embedded System
 
Project Report on Embedded Systems
Project Report on Embedded Systems Project Report on Embedded Systems
Project Report on Embedded Systems
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Smart sensors and their Application
Smart sensors and their ApplicationSmart sensors and their Application
Smart sensors and their Application
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
Embedded Systems Training Report
Embedded Systems Training ReportEmbedded Systems Training Report
Embedded Systems Training Report
 
Home automation using IOT
Home automation using IOTHome automation using IOT
Home automation using IOT
 
Smart home Environment using iot
Smart home Environment using iotSmart home Environment using iot
Smart home Environment using iot
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
 
What is Arduino ?
What is Arduino ?What is Arduino ?
What is Arduino ?
 
Home automation- An Iot application
Home automation- An Iot applicationHome automation- An Iot application
Home automation- An Iot application
 
IoT sensor devices
IoT sensor devicesIoT sensor devices
IoT sensor devices
 

Similar to Ppt on six month training on embedded system & IOT

Cdot Max ng architecture working models
Cdot Max ng  architecture working modelsCdot Max ng  architecture working models
Cdot Max ng architecture working models
RahmanScholar
 
Ramprasad-CV_3+yrs
Ramprasad-CV_3+yrsRamprasad-CV_3+yrs
Ramprasad-CV_3+yrs
Ramprasad B
 

Similar to Ppt on six month training on embedded system & IOT (20)

RTOS based Confidential Area Security System
RTOS based Confidential Area Security SystemRTOS based Confidential Area Security System
RTOS based Confidential Area Security System
 
Embedded systems الانظمة المدمجة
Embedded systems  الانظمة المدمجة Embedded systems  الانظمة المدمجة
Embedded systems الانظمة المدمجة
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
Low cost embedded system
Low cost embedded systemLow cost embedded system
Low cost embedded system
 
Training report on embedded sys_AVR
Training report on embedded sys_AVRTraining report on embedded sys_AVR
Training report on embedded sys_AVR
 
Brain wave controlled robot
Brain wave controlled robotBrain wave controlled robot
Brain wave controlled robot
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
Ijetr042175
Ijetr042175Ijetr042175
Ijetr042175
 
Summer training embedded system and its scope
Summer training  embedded system and its scopeSummer training  embedded system and its scope
Summer training embedded system and its scope
 
Smart logic
Smart logicSmart logic
Smart logic
 
Ens
EnsEns
Ens
 
Cdot Max ng architecture working models
Cdot Max ng  architecture working modelsCdot Max ng  architecture working models
Cdot Max ng architecture working models
 
Core of the ES
Core of the ESCore of the ES
Core of the ES
 
Asic implementation of i2 c master bus
Asic implementation of i2 c master busAsic implementation of i2 c master bus
Asic implementation of i2 c master bus
 
Presentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharmaPresentation on embedded system by abhishek sharma
Presentation on embedded system by abhishek sharma
 
Ramprasad-CV_3+yrs
Ramprasad-CV_3+yrsRamprasad-CV_3+yrs
Ramprasad-CV_3+yrs
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
Ip interfaces by faststream technologies
Ip interfaces by faststream technologiesIp interfaces by faststream technologies
Ip interfaces by faststream technologies
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV  Designing Embedded System with 8051...
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT IV Designing Embedded System with 8051...
 
Project_updated
Project_updatedProject_updated
Project_updated
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 

Ppt on six month training on embedded system & IOT

  • 1. SUBMITTED TO Mrs .Monika Mehra (ECE-HOD) SUBMITTED BY GAGANDEEP 1514002
  • 2.  INDIAN SERVICE MACHINE (Abbreviated as ISM) is the company name that our founder felt appropriate, following the lines of IBM (International Business Machine), ambitiously to grow to the level.  ISM was established in the year 1994 as a small scale industry to assemble and resale PC’s and service PC’s, immediately diversified to offer training based on PC Technologies.  Over the period ISM felt native training clients on Embedded Systems, having identified their strength in Embedded System design and development; ISM acquired expertise on this domain and collaborated with Embedded industry to offer an industry relevant Embedded Systems training programs.
  • 3.  Introduction of Embedded system & IOT  8-bit microcontroller (8051)  Minor project based on (8051)  ARM 7/cortex m-3 (32-bit microcontrollers)  ARM Protocols  IPC In Linux
  • 4. •An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular function What makes Embedded systems different? •Real time operation • Size • Cost • Time • Reliability • Safety • Energy
  • 5.
  • 6.  Microcontroller is a VLSI chip which consist of a CPU  CPU is a device Which executes instruction
  • 7. Block diagram Hardware used:- • 8051 Microcontroller • RFID Reader • GSM Module • LCD interface Software used:- •Kiel μVision IDE • Uart protocol( flash- magic)
  • 8. General assembly • A RFID tags used to indentified the unique ID number •The controller then matches the unique code to the Central Database. Stipulated price of the toll will be deducted from his account.. •Then an SMS will be sent to the owner using the GSM module about how much money has been debited from his account. APPLICATIONS •Thus it can be installed inside the car from where it is not visible. •As the cars need to be at a specified position for the system to scan the number plate which is not required in RFID based system. •Security is an added advantage
  • 9. Block diagram of ARM based microcontroller
  • 10. Important Protocols of ARM •I2C •Features of I2C Only two bus lines are required; a serial data line (SDA) and a serial clock line (SCL) •Each device connected to the bus is software addressable by a unique address and simple master/slave relationships exist at all times; •masters can operate as master-transmitters or as master-receivers •It’s a true multi-master bus including collision detection and arbitration to prevent data corruption if two or more masters simultaneously initiate data transfer •Serial, 8-bit oriented, bi-directional data transfers can be made at up to 100 kbit/s in the Standard-mode, up to 400 kbit/s in the Fast-mode, or up to 3.4 Mbit/s in the High-speed mode. •On-chip filtering rejects spikes on the bus data line to preserve data integrity •The number of ICs that can be connected to the same bus is limited only by a maximum bus capacitance of 400 pF
  • 11. Control area network (CAN) •The CAN Bus is an automotive bus developed by Robert Bosch •CAN is a serial bus protocol to connect individual systems and sensors as an alternative to conventional multi-wire looms. •The Controller Area Network (CAN) is a serial communication way, which efficiently supports distributed real-time control with a very high level of security.
  • 12. •It allows automotive components to communicate on a dual-wire networked data bus up to 1Mbps •CAN is based on the “broadcast communication mechanism”, which is based on a message-oriented transmission protocol.
  • 13. SPI---Serial Peripheral Interface •The Serial Peripheral Interface (SPI) bus was developed by Motorola to provide full-duplex synchronous serial communication between master and slave devices. •SPI can be clocked up to 10 MHz. •The SPI busis commonly used for communication with Flash memory, •sensors, real-time clocks (RTCs), analog-to-digital converters, and more •SPI
  • 14. Modes in SPI •The frame of the data exchange is described by two parameters, the clock polarity (CPOL) and the clock phase (CPHA). •This diagram shows the four possible states for these parameters and the corresponding mode in SPI
  • 15. Introducation of Embedded Linux •Linux is a 100% free operating system • Linus Torvalds. who was then a student at the University of Helsinki in Finland, developed Linux in 1991 •Implementation of IPC using Pipes, FIFO, Message Queue for IPC, System calls related to pipes, FIFO’s & Message Queues, Using ipcs, ipcrm, Sample program
  • 16. Inter Process Communication •Files •Pipes • Message Queue • Shared Memory • Semaphores • Signals • Sockets
  • 17. Files System Call Create File =int creat (const char * pathname, int flags) int open (const char * pathname, int flags) Flags : O_RDONLY, O_WRONLY, O_RDWRO_CREAT , O_APPEND, O_NONBLOCK, ssize_t write = int (fd, void *buf, size_t count) lseek System Call = off_t lseek ( int fd, off_t offset, int where) Where : SEEK_SET, SEEK_CUR, SEEK_END
  • 18. Pipes •We use the term pipe when we connected a data flow from one process •to another. •In linux we familiar with a pipe “ | ” which is used to linking shell system call used to create pipes int open( const char *path, O_RDONLY |O_NONBLOCK); int read( pid, buffer , size); int write(pid, buffer , size); pid ----- Descriptor returned by open() buffer ----- Character buffer size ----- Size of buffer
  • 19. Message Queue Features of Message Queue •Easy and efficient . •Used between related and unrelated process. •Provide sending block of data. •Blocking & Synchronization problems are ..avoid. System Calls related to Message Queue int msgget (key_t key,int msgflag); key ------- An arbitrary number Msgflag--------- IPC_PRIVATE IPC_CREAT int msgsnd (int msqid,const void*msg_ptr,size_t msg_szint msgflag); int msgrcv (int msqid,void *msg_ptr,size_t msg_sz,long int mtype,int msgflag) ;
  • 20. Sockets Why do we need sockets? •Provides an abstraction for interprocess communication
  • 21. Function:- Initiate and accept a connection Define an “end- point” for communication Send and receive data Terminate a connection gracefully Types of sockets Stream socket :(connection- oriented socket) – It provides reliable, connected networking service – Error free; no out- of- order packets (uses TCP) – applications: telnet/ ssh, http, … Continue…
  • 22. • Datagram socket :( connectionless socket) – It provides unreliable, best- effort networking service – Packets may be lost; may arrive out of order (uses UDP) – applications: streaming audio/ video (real-player), … Client Server
  • 23. System call Make socket sock = socket( AF_ INET, SOCK_ STREAM, 0); Setup structure ( memset(& sin, 0, sizeof( sin)); sin. sin_ family = AF_ INET; sin. sin_ addr. s_ addr = htonl( INADDR_ ANY); sin. sin_ port = htons( port); ); Bind if (bind( sock, (struct sockaddr *) &sin, sizeof( sin)) < 0) return -1; return sock; sock = accept ( listen_ socket, (struct sockaddr *) &sin, &sin_ len); return sock;
  • 24. socket() bind() listen() accept() read() write() read() close() Socket() connect() write() read() close() TCP Client TCP Server Well-known port blocks until connection from client process request Connection establishment Functionallty

Editor's Notes

  1. Gagandeep