System calls
सिस्टम कॉलऑपरेटिंग सिस्टम द्वारा प्रदान किए गए इंटरफेस हैं जो user-level processes को कर्नेल से सेवाओं का अनुरोध करने की अनुमति देते हैं।
हम कह सकते है की सिस्टम कॉल्स, API’s है जो ऑपरेटिंग सिस्टम द्वारा प्रदान की जाती है, जिनकी सहायता से user -level ऍप्लिकेशन्स कर्नेल से interact कर सके।
उदाहरण – fork(), exec(), wait(), exit()
Process Management:
fork()
: Creates a new process by duplicating the calling process.exec()
: Replaces the current process image with a new process image.wait()
: Makes a process wait until its child processes terminate.exit()
: Terminates a process.
File Management:
open()
: Opens a file and returns a file descriptor.read()
: Reads data from a file.write()
: Writes data to a file.close()
: Closes a file descriptor.
Device Management:
ioctl()
: Performs device-specific input/output operations.read()
: Reads from a device.write()
: Writes to a device.
Information Maintenance:
getpid()
: Returns the process ID of the calling process.getuid()
: Returns the user ID of the calling process.gettimeofday()
: Gets the current time.
Communication:
pipe()
: Creates a unidirectional data channel that can be used for inter-process communication.shmget()
: Allocates a shared memory segment.mmap()
: Maps files or devices into memory.
Memory Management
brk()
: Changes the location of the program break, which defines the end of the process’s data segment.mmap()
: Maps files or devices into memory, also used for allocating memory