Submit Search
Module-2 presentation.ppt of embedded system
Download as PPT, PDF
0 likes
8 views
S
SonugowdaChinnu
Learning embedded system and implementing it on real time
Engineering
Read more
1 of 45
Download now
Download to read offline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
More Related Content
PPTX
ch03.pptx
SHIKHAARYA26
PPT
Chapter 3-Processes userd in operating sys.ppt
vvsp1
PPT
2.ch3 Process (1).ppt
salihazameer
PDF
Unit II - 1 - Operating System Process
cscarcas
PPT
Unit 2-ch3-Processes in Operating Systems
BskGec1
PPT
chapter 2 name:- operating System Processes
rudrasomani2612
PPT
CPU Process Synchronization (Chapter 3).pptx
routinecommitteecsep
PPTX
ch3.pptx
HuyNguyn660008
ch03.pptx
SHIKHAARYA26
Chapter 3-Processes userd in operating sys.ppt
vvsp1
2.ch3 Process (1).ppt
salihazameer
Unit II - 1 - Operating System Process
cscarcas
Unit 2-ch3-Processes in Operating Systems
BskGec1
chapter 2 name:- operating System Processes
rudrasomani2612
CPU Process Synchronization (Chapter 3).pptx
routinecommitteecsep
ch3.pptx
HuyNguyn660008
Similar to Module-2 presentation.ppt of embedded system
(20)
PPTX
ch3_LU6_LU7_Lecture_1691052564579.pptx
AKumaraGuru
PPTX
Processes
RezaSony
PPTX
ch3.pptx
ZoYaKazmi3
PDF
os-ch03.pdfEGERGQEGQERGQEGQERGQERGQERGQERG
227567
PPT
process management.ppt
ShubhamGoel184057
PPT
ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 c...
SanjeevKumarSinha13
PPT
ch3.ppt
csomab4u
PPT
Lecture_Process.ppt
RahulKumarYadav87
PPTX
cs8493 - operating systems unit 2
SIMONTHOMAS S
PPT
ch3 (1).ppt
AniketChavan493584
PPT
ch3.ppt
FernandezPineda2
PPT
ch3 s ppt
DhruvilSTATUS
PPT
ch3.ppt
Sami Mughal
PPT
Operating System
Indhu Periys
PPT
Processes
K Gowsic Gowsic
PPTX
Chapter 3 Processes (1)Operating systems.pptx
RoyHanzala
PPTX
Week03-Ch3-Process Concept.pptx.gfhgvjhg
alianwar88
PDF
3 processes
BaliThorat1
PPTX
14712-l4.pptx
KAVINKUMARVS1
PPT
Chapter 3: Processes
Shafaan Khaliq Bhatti
ch3_LU6_LU7_Lecture_1691052564579.pptx
AKumaraGuru
Processes
RezaSony
ch3.pptx
ZoYaKazmi3
os-ch03.pdfEGERGQEGQERGQEGQERGQERGQERGQERG
227567
process management.ppt
ShubhamGoel184057
ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 ch3 c...
SanjeevKumarSinha13
ch3.ppt
csomab4u
Lecture_Process.ppt
RahulKumarYadav87
cs8493 - operating systems unit 2
SIMONTHOMAS S
ch3 (1).ppt
AniketChavan493584
ch3.ppt
FernandezPineda2
ch3 s ppt
DhruvilSTATUS
ch3.ppt
Sami Mughal
Operating System
Indhu Periys
Processes
K Gowsic Gowsic
Chapter 3 Processes (1)Operating systems.pptx
RoyHanzala
Week03-Ch3-Process Concept.pptx.gfhgvjhg
alianwar88
3 processes
BaliThorat1
14712-l4.pptx
KAVINKUMARVS1
Chapter 3: Processes
Shafaan Khaliq Bhatti
Ad
Recently uploaded
(20)
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
IJCNCJournal
PDF
R24 SURVEYING LAB MANUAL for civil enggi
MNANDITHACIVILSTAFF
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
SonaliPatil325517
PDF
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
ijccsa
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
mojeeburahmanwardak
PPTX
Nature of X-rays, X- Ray Equipment, Fluoroscopy
DJERALDINAUXILLIAECE
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Nitin Shelake
PDF
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Niraj Aarya
PPTX
Fundamentals of Mechanical Engineering.pptx
MdMowdudAhmed
PDF
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Ramez Hosny
PPTX
Current and future trends in Computer Vision.pptx
Subramanyam Natarajan
PPT
Occupational Health and Safety Management System
Akshay Kant Mishra
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
Ashutosh Satapathy
PDF
Soil Improvement Techniques Note - Rabbi
rahmatideal000
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
ijaia
PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
johnmathew9417
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
pawarbhaktiit
PDF
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
KSRIHARISASANKA
PDF
737-MAX_SRG.pdf student reference guides
ssusere2119a1
PPTX
UNIT - 3 Total quality Management .pptx
gokuld13012005
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
IJCNCJournal
R24 SURVEYING LAB MANUAL for civil enggi
MNANDITHACIVILSTAFF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
SonaliPatil325517
Human-AI Collaboration: Balancing Agentic AI and Autonomy in Hybrid Systems
ijccsa
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
mojeeburahmanwardak
Nature of X-rays, X- Ray Equipment, Fluoroscopy
DJERALDINAUXILLIAECE
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Nitin Shelake
SMART SIGNAL TIMING FOR URBAN INTERSECTIONS USING REAL-TIME VEHICLE DETECTI...
Niraj Aarya
Fundamentals of Mechanical Engineering.pptx
MdMowdudAhmed
null (2) bgfbg bfgb bfgb fbfg bfbgf b.pdf
Ramez Hosny
Current and future trends in Computer Vision.pptx
Subramanyam Natarajan
Occupational Health and Safety Management System
Akshay Kant Mishra
Exploratory_Data_Analysis_Fundamentals.pdf
Ashutosh Satapathy
Soil Improvement Techniques Note - Rabbi
rahmatideal000
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
ijaia
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
johnmathew9417
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
pawarbhaktiit
Level 2 – IBM Data and AI Fundamentals (1)_v1.1.PDF
KSRIHARISASANKA
737-MAX_SRG.pdf student reference guides
ssusere2119a1
UNIT - 3 Total quality Management .pptx
gokuld13012005
Ad
Module-2 presentation.ppt of embedded system
1.
Silberschatz, Galvin and
Gagne ©2018 Operating System Concepts – 10th Edition Chapter 3: Processes
2.
3.2 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication IPC in Shared-Memory Systems IPC in Message-Passing Systems Examples of IPC Systems Communication in Client-Server Systems
3.
3.3 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Objectives Identify the separate components of a process and illustrate how they are represented and scheduled in an operating system. Describe how processes are created and terminated in an operating system, including developing programs using the appropriate system calls that perform these operations. Describe and contrast interprocess communication using shared memory and message passing. Design programs that uses pipes and POSIX shared memory to perform interprocess communication. Describe client-server communication using sockets and remote procedure calls. Design kernel modules that interact with the Linux operating system.
4.
3.4 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Concept (Cont.) Program is passive entity stored on disk (executable file); process is active Program becomes process when executable file loaded into memory Execution of program started via GUI mouse clicks, command line entry of its name, etc One program can be several processes Consider multiple users executing the same program
5.
3.5 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Concept An operating system executes a variety of programs that run as a process. Process – a program in execution; process execution must progress in sequential fashion Multiple parts The program code, also called text section (The text segment in a process structure primarily consists of the executable code of the program, including functions and instructions.) Current activity including program counter, processor registers Stack containing temporary data Function parameters, return addresses, local variables Data section containing global variables Heap containing memory dynamically allocated during run time Process in Memory
6.
3.6 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process in Memory
7.
3.7 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Memory Layout of a C Program
8.
3.8 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process State As a process executes, it changes state New: The process is being created Running: Instructions are being executed Waiting: The process is waiting for some event to occur Ready: The process is waiting to be assigned to a processor Terminated: The process has finished execution
9.
3.9 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Diagram of Process State
10.
3.10 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition There are several process states in operating system, they are: • New State: When a process is first created or is initialized by the operating system, it is in the new state. In this state, the process is being prepared to enter the ready state. • Ready State: When a process is ready to execute, it is in the ready state. In this state, the process is waiting for the CPU to be allocated to it so that it can start executing its instructions. A process can remain in the ready state for an indeterminate period, waiting for the CPU to become available. • Running State: When the CPU is allocated to a process, it enters the running state. In this state, the process executes its instructions and uses system resources such as memory, CPU, and I/O devices. Only one process can be in the running state at a time, and the operating system determines which process gets access to the CPU using scheduling algorithms. • Waiting/Blocked State: Sometimes, a process needs to wait for a particular event, such as user input or data from a disk drive. In such cases, the process enters the blocked state. In this state, the process is not using the CPU, but it is not ready to run either. The process remains in the blocked state until the event it is waiting for occurs.
11.
3.11 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition • Terminated State: The terminated state is reached when a process completes its execution or terminates by the operating system. In this state, the process no longer uses any system resources, and its memory space is deallocated. • Suspended State: When a process is temporarily removed from the main memory and is stored on the disk to free up memory, it is said to be in a suspended state. The process is not actively executing, and its memory space is saved on the disk. When the process is needed again, it is loaded back into the main memory and resumes execution.
12.
3.12 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Control Block (PCB) • A Process Control Block (PCB) is a data structure used by an operating system to store all the information about a process. • It's like a "notebook" for each process, containing details like the process's state, program counter, register values, memory allocation, and scheduling information. • The PCB is crucial for efficient process management, scheduling, and resource allocation.
13.
3.13 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Control Block (PCB) Information associated with each process (also called task control block) Process state – running, waiting, etc Program counter – location of instruction to next execute CPU registers – contents of all process- centric registers CPU scheduling information- priorities, scheduling queue pointers Memory-management information – memory allocated to the process Accounting information – CPU used, clock time elapsed since start, time limits I/O status information – I/O devices allocated to process, list of open files
14.
3.14 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Control Block (PCB) • A Process Control Block (PCB) is a data structure used by an operating system to store all the information about a process. • It's like a "notebook" for each process, containing details like the process's state, program counter, register values, memory allocation, and scheduling information. • The PCB is crucial for efficient process management, scheduling, and resource allocation.
15.
3.15 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Threads So far, process has a single thread of execution Consider having multiple program counters per process Multiple locations can execute at once Multiple threads of control -> threads Must then have storage for thread details, multiple program counters in PCB Explore in detail in Chapter 4
16.
3.16 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Representation in Linux Represented by the C structure task_struct pid t_pid; /* process identifier */ long state; /* state of the process */ unsigned int time_slice /* scheduling information */ struct task_struct *parent;/* this process’s parent */ struct list_head children; /* this process’s children */ struct files_struct *files;/* list of open files */ struct mm_struct *mm; /* address space of this process */
17.
3.17 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Scheduling Maximize CPU use, quickly switch processes onto CPU core Process scheduler selects among available processes for next execution on CPU core Maintains scheduling queues of processes Ready queue – set of all processes residing in main memory, ready and waiting to execute Wait queues – set of processes waiting for an event (i.e. I/O) Processes migrate among the various queues
18.
3.18 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Ready and Wait Queues
19.
3.19 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Representation of Process Scheduling
20.
3.20 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition CPU Switch From Process to Process A context switch occurs when the CPU switches from one process to another.
21.
3.21 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Context Switch When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch Context of a process represented in the PCB Context-switch time is overhead; the system does no useful work while switching The more complex the OS and the PCB the longer the context switch Time dependent on hardware support Some hardware provides multiple sets of registers per CPU multiple contexts loaded at once
22.
3.22 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Multitasking in Mobile Systems Some mobile systems (e.g., early version of iOS) allow only one process to run, others suspended Due to screen real estate, user interface limits iOS provides for a Single foreground process- controlled via user interface Multiple background processes– in memory, running, but not on the display, and with limits Limits include single, short task, receiving notification of events, specific long-running tasks like audio playback Android runs foreground and background, with fewer limits Background process uses a service to perform tasks Service can keep running even if background process is suspended Service has no user interface, small memory use
23.
3.23 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Operations on Processes System must provide mechanisms for: process creation process termination
24.
3.24 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Creation Parent process create children processes, which, in turn create other processes, forming a tree of processes Generally, process identified and managed via a process identifier (pid) Resource sharing options Parent and children share all resources Children share subset of parent’s resources Parent and child share no resources Execution options Parent and children execute concurrently Parent waits until children terminate
25.
3.25 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition A Tree of Processes in Linux
26.
3.26 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Creation (Cont.) Address space Child duplicate of parent Child has a program loaded into it UNIX examples fork() system call creates new process exec() system call used after a fork() to replace the process’ memory space with a new program Parent process calls wait() for the child to terminate
27.
3.27 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition C Program Forking Separate Process
28.
3.28 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Creating a Separate Process via Windows API
29.
3.29 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Termination Process executes last statement and then asks the operating system to delete it using the exit() system call. Returns status data from child to parent (via wait()) Process’ resources are deallocated by operating system Parent may terminate the execution of children processes using the abort() system call. Some reasons for doing so: Child has exceeded allocated resources Task assigned to child is no longer required The parent is exiting and the operating systems does not allow a child to continue if its parent terminates
30.
3.30 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Process Termination Some operating systems do not allow child to exists if its parent has terminated. If a process terminates, then all its children must also be terminated. cascading termination. All children, grandchildren, etc. are terminated. The termination is initiated by the operating system. The parent process may wait for termination of a child process by using the wait()system call. The call returns status information and the pid of the terminated process pid = wait(&status); If no parent waiting (did not invoke wait()) process is a zombie If parent terminated without invoking wait , process is an orphan
31.
3.31 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Android Process Importance Hierarchy Mobile operating systems often have to terminate processes to reclaim system resources such as memory. From most to least important: o Foreground process o Visible process o Service process o Background process o Empty process Android will begin terminating processes that are least important.
32.
3.32 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Multiprocess Architecture – Chrome Browser Many web browsers ran as single process (some still do) If one web site causes trouble, entire browser can hang or crash Google Chrome Browser is multiprocess with 3 different types of processes: Browser process manages user interface, disk and network I/O Renderer process renders web pages, deals with HTML, Javascript. A new renderer created for each website opened Runs in sandbox restricting disk and network I/O, minimizing effect of security exploits Plug-in process for each type of plug-in
33.
3.33 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Interprocess Communication Processes within a system may be independent or cooperating Cooperating process can affect or be affected by other processes, including sharing data Reasons for cooperating processes: Information sharing Computation speedup Modularity Convenience Cooperating processes need interprocess communication (IPC) Two models of IPC Shared memory Message passing
34.
3.34 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Communications Models (a) Shared memory. (b) Message passing.
35.
3.35 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Cooperating Processes Independent process cannot affect or be affected by the execution of another process Cooperating process can affect or be affected by the execution of another process Advantages of process cooperation Information sharing Computation speed-up Modularity Convenience
36.
3.36 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Producer-Consumer Problem Paradigm for cooperating processes, producer process produces information that is consumed by a consumer process unbounded-buffer places no practical limit on the size of the buffer bounded-buffer assumes that there is a fixed buffer size
37.
3.37 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Interprocess Communication – Shared Memory An area of memory shared among the processes that wish to communicate The communication is under the control of the users processes not the operating system. Major issues is to provide mechanism that will allow the user processes to synchronize their actions when they access shared memory. Synchronization is discussed in great details in Chapters 6 & 7.
38.
3.38 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Bounded-Buffer – Shared-Memory Solution Shared data #define BUFFER_SIZE 10 typedef struct { . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; Solution is correct, but can only use BUFFER_SIZE-1 elements
39.
3.39 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Producer Process – Shared Memory item next_produced; while (true) { /* produce an item in next produced */ while (((in + 1) % BUFFER_SIZE) == out) ; /* do nothing */ buffer[in] = next_produced; in = (in + 1) % BUFFER_SIZE; }
40.
3.40 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Consumer Process – Shared Memory item next_consumed; while (true) { while (in == out) ; /* do nothing */ next_consumed = buffer[out]; out = (out + 1) % BUFFER_SIZE; /* consume the item in next consumed */ }
41.
3.41 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Interprocess Communication – Message Passing Mechanism for processes to communicate and to synchronize their actions Message system – processes communicate with each other without resorting to shared variables IPC facility provides two operations: send(message) receive(message) The message size is either fixed or variable
42.
3.42 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Message Passing (Cont.) If processes P and Q wish to communicate, they need to: Establish a communication link between them Exchange messages via send/receive Implementation issues: How are links established? Can a link be associated with more than two processes? How many links can there be between every pair of communicating processes? What is the capacity of a link? Is the size of a message that the link can accommodate fixed or variable? Is a link unidirectional or bi-directional?
43.
3.43 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Message Passing (Cont.) Implementation of communication link Physical: Shared memory Hardware bus Network Logical: Direct or indirect Synchronous or asynchronous Automatic or explicit buffering
44.
3.44 Silberschatz, Galvin
and Gagne ©2018 Operating System Concepts – 10th Edition Direct Communication Processes must name each other explicitly: send (P, message) – send a message to process P receive(Q, message) – receive a message from process Q Properties of communication link Links are established automatically A link is associated with exactly one pair of communicating processes Between each pair there exists exactly one link The link may be unidirectional, but is usually bi-directional
45.
Silberschatz, Galvin and
Gagne ©2018 Operating System Concepts – 10th Edition End of Chapter 3
Download