System Calls

Operating Systems Part 3

ยท

2 min read

System Calls

System Calls

A programmatic way to shift from user mode to kernel mode.

For files. Open(), Read(), Write(), Close(), Create file etc.

For hardware. Read, Write, Reposition, ioctl, fcntl.

Information

get Pid, attributes, get System time and data.

Process Control

Load, Execute, abort, Fork(imp), Wait, Signal, Allocate etc.

Communication

Pipe(), Create/delete Connections, Shmget().

Protection & Security

chmod etc.

Fork System Call

  • Used to create a child process, which is a clone of the parent process, with a different ID.
  • Fork() returns 0 for child, +1 for parent, -1 if child couldn't be created.
  • The child process is executed parrallely and concurrently with the parent process.
  • Total number of processes = 2^n, where n is the number of times fork() has been invoked.
  • Total number of child processes = 2^n - 1, where n is the number of times fork() has been invoked.

Conclusion

You can read other articles written by me through these links.

Operating System Series
1. Introduction & Types of OS
2. Process States & Lifecycle
3. System Calls
4. User Mode vs Kernel Mode
5. CPU Process Scheduling
6. Process Synchronization
7. Deadlocks
8. Memory Management
9. Disk Management & Scheduling
10. File System in OS
11. Protection & Security

System Design Series
Introduction To Parallel Computing
Deep Dive Into Virtualization
Insights Into Distributed Computing

Cloud Computing Series
1. Cloud Service Models
2. Cloud Deployment Models
3. Cloud Security
4. Cloud Architecture
5. Cloud Storage
6. Networking In The Cloud
7. Cloud Cost Management
8. DevOps In Cloud & CI/CD
9. Serverless Computing
10. Container Orchestration
11. Cloud Migration
12. Cloud Monitoring & Management
13. Edge Computing In Cloud
14. Machine Learning In Cloud

Computer Networking Series
1. Computer Networking Fundamentals
2. OSI Model
3. TCP/IP Model : Application Layer
4. TCP/IP Model : Transport Layer
5. TCP/IP Model : Network Layer
6. TCP/IP Model : Data Link Layer

Version Control Series
1. Complete Guide to Git Commands
2. Create & Merge Pull Requests
3. Making Open Source Contributions

Linux
Complete Guide to Linux Commands

Thanks For Reading! ๐Ÿ’™
Garvit Singh

ย