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...

PRACTICE QUESTIONS

1. Which of the following is NOT a Unix system call?


(a) open()

(b) malloc()

(c) execve()

(d) getpid()

answer---(B)

2. Which of the following system calls is used to create a new process?


(a) fork()

(b) execve()

(c) waitpid()

(d) getpid()

answer---(A)


3. Which of the following system calls is used to read data from a file?


(a) open()

(b) read()

(c) write()

(d) close()

answer---(B)

4. Which of the following system calls is used to write data to a file?


(a) open()

(b) read()

(c) write()

(d) close()

answer---(C)

5. Which of the following system calls is used to terminate a process?


(a) fork()

(b) execve()

(c) waitpid()

(d) kill()

answer---(D)

6. Which of the following system calls is used to get the PID of the current process?


(a) fork()

(b) execve()

(c) waitpid()

(d) getpid()

answer---(D)

7. Which of the following system calls is used to get the current system time?


(a) time()

(b) getpid()

(c) waitpid()

(d) kill()

answer---(A)

8. Which of the following system calls is used to change the current working directory?


(a) chdir()

(b) time()

(c) waitpid()

(d) kill()

answer---(A)

9. Which of the following system calls is used to access a file descriptor?


(a) open()

(b) read()

(c) write()

(d) close()

answer---(A)

10. Which of the following system calls is used to close a file descriptor?


(a) open()

(b) read()

(c) write()

(d) close()

answer---(D)

11. Which of the following system calls is used to create a pipe?


(a) pipe()

(b) open()

(c) write()

(d) close()

answer---(A)

12. Which of the following system calls is used to read from a pipe?


(a) pipe()

(b) open()

(c) read()

(d) close()

answer---(C)

13. Which of the following system calls is used to write to a pipe?


(a) pipe()

(b) open()

(c) write()

(d) close()

answer---(C)

14. Which of the following system calls is used to create a semaphore?


(a) semop()

(b) pipe()

(c) open()

(d) close()

answer---(A)

15. Which of the following system calls is used to wait on a semaphore?


(a) semop()

(b) pipe()

(c) open()

(d) close()

answer---(A)

16. Which of the following system calls is used to signal a semaphore?


(a) semop()

(b) pipe()

(c) open()

(d) close()

answer---(A)

17. Which of the following system calls is used to create a message queue?


(a) msgctl()

(b) semop()

(c) pipe()

(d) open()

answer---(A)

18. Which of the following system calls is used to send a message to a message queue?


(a) msgsnd()

(b) msgctl()

(c) semop()

(d) pipe()

answer---(A)

19. Which of the following system calls is used to receive a message from a message queue?


(a) msgrcv()

(b) msgsnd()

(c) msgctl()

(d) semop()

answer---(A)

20. Which of the following system calls is used to get the current user ID?


(a) getuid()

(b) msgrcv()

(c) msgsnd()

(d) msgctl()

answer---(A)

Comments

Popular Posts