Skip to main content

Featured

HISTORY OF UNIX

1.Origins at Bell Labs (1969): -Key Figures: Ken Thompson, Dennis Ritchie, and others at Bell Labs. -Motivation: Develop a multitasking, multi-user operating system for the PDP-7 minicomputer. -PDP-7 Assembly Language: Initial version of Unix written in assembly language. -Name Origin: A play on the name "Multics," the earlier project it aimed to replace. 2.First Edition (1971): -Language Shift: Transition to C programming language for better portability. -Basic Features: Simple kernel, file hierarchies, pipelines, and hierarchical file system. 3.Portability and C Language (1973-1974): -C Programming Language: Complete rewrite of Unix in C, making it more portable. -Software Portability: Unix could be easily adapted to different hardware architectures. 4.Berkeley Software Distribution (BSD) (1977-1995): -Berkeley Contribution: BSD versions added virtual memory, TCP/IP networking, and the vi editor. -Networking Emphasis: BSD Unix became a leading platform for networking resear...

TYPES OF SYSTEM CALLS

System calls can be categorized into several types based on the functionalities they provide. Here are some common types of system calls:

1.Process Control System Calls:

   -Examples:

     -fork(): Create a new process by duplicating the calling process.

     -execve(): Replace the current process image with a new one.

     -exit(): Terminate the calling process.

     -wait(), waitpid(): Wait for child processes to terminate.

2.File Management System Calls:

   -Examples:

     -open(): Open a file or create a new one.

     -read(): Read data from an open file descriptor.

     -write(): Write data to an open file descriptor.

     -close(): Close an open file descriptor.

     -lseek(): Move the read/write file offset.


3.Device Management System Calls:

   -Examples:

     -ioctl(): Perform I/O control operations on devices.

     -read(),write(): Used for device I/O.


4.Information Maintenance System Calls:

   -Examples:

     -getpid(): Get the process ID of the calling process.

     -getuid(), getgid(): Get user and group IDs of the calling process.

     -times(): Get process and system times.


5.Memory Management System Calls:

   -Examples:

     -brk(), sbrk(): Change the data segment size of a process.

     -mmap(), munmap(): Map or unmap files or devices into memory.


6.Communication System Calls:

   -Examples:

     -pipe(): Create an inter-process communication (IPC) pipe.

     -msgsnd(),msgrcv(): Send and receive messages between processes (message queues).

     -socket(): Create a new communication endpoint for networking.


7.Synchronization System Calls:

   -Examples:

     -sem_init(), sem_wait(), sem_post(): Initialize and perform operations on semaphores.

     -mutex_init(), mutex_lock(), mutex_unlock(): Initialize and perform operations on mutexes.


8.Network Communication System Calls:

   -Examples:

     -socket(), bind(), connect(): Create and manage network sockets.

     -send(), recv(): Send and receive data over a network.


9.Security System Calls:

   -Examples:

     -chmod(),chown(): Change file permissions and ownership.

     -setuid(),setgid(): Change user and group IDs for a process.


10. Time System Calls:

    -Examples:

      -time(): Get the current time in seconds.

      -gettimeofday(): Get current time with microsecond precision.

      -alarm(): Set an alarm signal to be delivered after a specified time.


These categories represent the diverse functionalities that system calls provide to user-level processes. The specific system calls available can vary between operating systems, and each system call is identified by a unique number or identifier. Developers use these system calls to perform various tasks and interact with the underlying operating system kernel.

Comments

Popular Posts