├── Tasks.docx ├── WindowsTutorial.docx ├── FirstProcessCallSecondProcess ├── CppProc.gif ├── readme.md ├── Second │ ├── Second.cpp │ ├── Second.vcxproj.filters │ └── Second.vcxproj ├── First │ ├── First.vcxproj.filters │ ├── First.cpp │ └── First.vcxproj └── FirstProcessCallSecondProcess.sln ├── ProcessOS ├── ProcessGROUP │ ├── Thread1.cpp │ ├── Thread4.cpp │ ├── Thread3.cpp │ ├── Process2.cpp │ ├── Thread5.cpp │ ├── Process4.cpp │ ├── Thread2.cpp │ ├── PROCESS_INFORMATION.cpp │ ├── Second.cpp │ ├── Process6.cpp │ ├── Process1.cpp │ ├── Process3.cpp │ ├── Process5.cpp │ ├── Process7.cpp │ ├── First.cpp │ ├── ProcessGROUP.vcxproj.filters │ └── ProcessGROUP.vcxproj ├── ProcessOS.sln └── README.md ├── ProcessThreadSync ├── EventProcess-Thread │ ├── EventProcess.cpp │ └── Second.cpp ├── EventThreads.cpp └── Event121212.cpp ├── EventMutexSemaphore ├── EventMutexSemaphore │ ├── Mutex.cpp │ ├── Semaphore.cpp │ ├── Event.cpp │ ├── EventMutexSemaphore.vcxproj.filters │ └── EventMutexSemaphore.vcxproj └── EventMutexSemaphore.sln ├── ForLook ├── README.md ├── filePointer │ ├── Source.cpp │ ├── filePointer.vcxproj.filters │ └── filePointer.vcxproj ├── directory_0 │ ├── directory_0.vcxproj.filters │ ├── Source.cpp │ └── directory_0.vcxproj ├── directory_1 │ ├── directory_1.vcxproj.filters │ ├── Source.cpp │ └── directory_1.vcxproj ├── directory_2 │ ├── directory_2.vcxproj.filters │ ├── Source.cpp │ └── directory_2.vcxproj ├── timeOfFile │ ├── timeOfFile.vcxproj.filters │ ├── Source.cpp │ └── timeOfFile.vcxproj ├── folderManipulation │ ├── folderManipulation.vcxproj.filters │ ├── Source.cpp │ └── folderManipulation.vcxproj └── ForLook.sln ├── Masiv10Symbol ├── Masiv10Symbol │ ├── Source.cpp │ ├── Masiv10Symbol.vcxproj.filters │ └── Masiv10Symbol.vcxproj ├── ASCII │ ├── Source.cpp │ ├── ASCII.vcxproj.filters │ └── ASCII.vcxproj ├── ReadWrite │ ├── Source.cpp │ ├── ReadWrite.vcxproj.filters │ └── ReadWrite.vcxproj └── First Step.sln ├── 03_03_17 ├── Reversing │ ├── Source.cpp │ ├── Reversing.vcxproj.filters │ └── Reversing.vcxproj └── 03_03_17.sln ├── 24_02_17 ├── CreateFileUpper │ ├── CreateFileUpper.vcxproj.filters │ ├── Source.cpp │ └── CreateFileUpper.vcxproj └── 24_02_17.sln ├── Read15number ├── Read15number │ ├── Read15number.vcxproj.filters │ ├── Source.cpp │ └── Read15number.vcxproj └── Read15number.sln ├── .gitattributes ├── README.md ├── Dekker-s algorithm └── Readme.md └── .gitignore /Tasks.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VanHakobyan/OperatingSystemWithCPP/HEAD/Tasks.docx -------------------------------------------------------------------------------- /WindowsTutorial.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VanHakobyan/OperatingSystemWithCPP/HEAD/WindowsTutorial.docx -------------------------------------------------------------------------------- /FirstProcessCallSecondProcess/CppProc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VanHakobyan/OperatingSystemWithCPP/HEAD/FirstProcessCallSecondProcess/CppProc.gif -------------------------------------------------------------------------------- /FirstProcessCallSecondProcess/readme.md: -------------------------------------------------------------------------------- 1 |

2 |
3 | ### C++ Source code look at :hourglass:
4 |
5 | * [Process1](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process1.cpp)
6 | * [Process2](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process2.cpp)
7 | * [Process3](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process3.cpp)
8 | * [Process4](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process4.cpp)
9 | * [Process5](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process5.cpp)
10 | * [Process6](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process6.cpp)
11 | * [Process7](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Process7.cpp)
12 | * [First](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/First.cpp)
13 | * [Second](https://github.com/VanHakobyan/OperatingSystemWithCPP/blob/master/ProcessOS/ProcessGROUP/Second.cpp)
14 |
2 |
3 |
2 |
3 |
variables
12 | wants_to_enter : array of 2 booleans
13 | turn : integer
14 |
15 | wants_to_enter[0] ← false
16 | wants_to_enter[1] ← false
17 | turn ← 0 // or 1
18 | p0:
25 | wants_to_enter[0] ← true
26 | while wants_to_enter[1] {
27 | if turn ≠ 0 {
28 | wants_to_enter[0] ← false
29 | while turn ≠ 0 {
30 | // busy wait
31 | }
32 | wants_to_enter[0] ← true
33 | }
34 | }
35 |
36 | // critical section
37 | ...
38 | turn ← 1
39 | wants_to_enter[0] ← false
40 | // remainder section
41 | p1:
46 | wants_to_enter[1] ← true
47 | while wants_to_enter[0] {
48 | if turn ≠ 1 {
49 | wants_to_enter[1] ← false
50 | while turn ≠ 1 {
51 | // busy wait
52 | }
53 | wants_to_enter[1] ← true
54 | }
55 | }
56 |
57 | // critical section
58 | ...
59 | turn ← 0
60 | wants_to_enter[1] ← false
61 | // remainder section
62 |