System Calls

Garvit SinghGarvit Singh
2 min read

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

0
Subscribe to my newsletter

Read articles from Garvit Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Garvit Singh
Garvit Singh

๐Ÿ‘‹ Hi, I'm Garvit, an IT Undergraduate. I'm passionate about expanding my knowledge in the field of Computer Science. ๐Ÿ’ป Computer Science Skills and the topics I write blogs on โœ… Proficient in Linux. โœ… Git/GitHub for version control. โœ… Networking Fundamentals. โœ… Proficient in Java, C and Python. โœ… Object-Oriented Programming in Java. โœ… Data Structures & Algorithms in Java. โœ… MERN Stack Web Development. โœ… System Design. โœ… Bash scripting and automation. โœ… Python for Scripting, Mini Projects. โœ… Cyber Warfare & Ethical Hacking. โœ… Cloud Computing. โœ… Distributed Computing, Parallel Computing, Real Time Systems, Virtualization. โœ… DevOps - Docker, Kubernetes โœ… Operating Systems. โœ… Software Testing. โœ… Databases - SQL, NoSQL and more...