6
Sean Barker Processes 1 Memory I/O Processor Processes, scheduling, synchronization Allocation, protection, virtual memory Disk management, filesystems, networking Hardware OS Services Sean Barker Process Control Block (PCB) 2 Process State PC CPU registers CPU scheduling info List of open files ...

Process Control Block (PCB)

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Process Control Block (PCB)

Sean Barker

Processes

1

Memory

I/O

Processor Processes, scheduling, synchronization

Allocation, protection, virtual memory

Disk management, filesystems, networking

Hardware OS Services

Sean Barker

Process Control Block (PCB)

2

Process Control Block (PCB)

Process State

PC

CPU registers

CPU scheduling info

List of open files

...

Page 2: Process Control Block (PCB)

Sean Barker

Context Switching

3

Sean Barker

Process Execution States

4

Process State

Page 3: Process Control Block (PCB)

Sean Barker

CPU Scheduling

5

Processes

CPU

Sean Barker

CPU and I/O Bursts

6

Process Behavior Long CPU burst

Short CPU burst Waiting for I/O

CPU-bound process

I/O-bound process

Page 4: Process Control Block (PCB)

Sean Barker

Multilevel Feedback Queues

7

Sean Barker

CPU Scheduling Summary

First Come First Serve (FCFS)

Shortest Job First (SJF)

Shortest Remaining Time First (SRTF)

Round-Robin (RR)

Multilevel Feedback Queues (MLFQ)

... more advanced schedulers ...

8

Page 5: Process Control Block (PCB)

Sean Barker

Threads

9

Sean Barker

Multithreaded Processes

10

Page 6: Process Control Block (PCB)

Sean Barker

Thread APIs

11

POSIX Threads (pthreads): pthread_create(&tid, NULL, my_fun, &param); // thread runs my_fun

Windows Threads:ThreadHandle = CreateThread(NULL, 0, MyFun, &Param, 0, &ThreadID);

Java Threads:Thread t = new Thread(new MyRunnable(param));t.start(); // start the thread running MyRunnable.run()

Sean Barker

User-Level Threads

12