sliver__

4.7 Operating-System Examples 본문

CS/운영체제

4.7 Operating-System Examples

sliver__ 2023. 11. 13. 22:11
728x90

Linux Threads

 

Linux does not distinguish between processes and threads. In fact, Linux uses the term task — rather than process or thread — when referring to a flow of control within a program.

When clone() is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.

Some of the flags passed when clone()is invoked.

https://man7.org/linux/man-pages/man2/clone.2.html

 

clone(2) - Linux manual page

clone(2) — Linux manual page clone(2) System Calls Manual clone(2) NAME         top clone, __clone2, clone3 - create a child process LIBRARY         top Standard C library (libc, -lc) SYNOPSIS         top /* Prototype for the glibc wrapper fu

man7.org

 

The varying level of sharing is possible because of the way a task is repre- sented in the Linux kernel. A unique kernel data structure (specifically, struct task struct) exists for each task in the system. This data structure, instead of storing data for the task, contains pointers to other data structures where these data are stored.

 

728x90

'CS > 운영체제' 카테고리의 다른 글

5.2 Scheduling Criteria  (0) 2023.11.18
5.1 Basic Concept of CPU Scheduling  (0) 2023.11.18
4.6 Threading Issues  (0) 2023.11.13
4.5 Implicit Threading  (0) 2023.11.13
4.4 Thread Libraries  (1) 2023.11.09
Comments