Department of Computer Science and Technology, UTU 2014

Size: px
Start display at page:

Download "Department of Computer Science and Technology, UTU 2014"

Transcription

1 Short Questions Unix Internals Unit 1 : Introduction and Overview of UNIX 1. What were the goals of Multics System? 2. List out the levels in which UNIX system architecture is divided. 3. Which system calls are used by the process to interact with file subsystem? 4. What are device drivers? 5. What are Block I/O devices and Raw I/O devices? 6. What is process? 7. What are the responsibilities of process control subsystem of UNIX operating system? 8. List out the system calls used for controlling the processes. 9. What is swapper process? 10. What is the significance of inode? 11. What are file table and user file descriptor table? 12. What is logical device number? 13. List out various structures of file system. 14. What is the importance of Boot block structure of file system? 15. What does the super block describes? 16. What is the use of root inode of file system? 17. What is PID? 18. What is the Process 0? 19. When does Process 0 become swapper process? 20. List out the regions of the process loaded in the memory by the kernel. Also provide their significance. 21. What is u area? 22. What is context of a process? 23. When does a process put itself in sleeping state? 24. When the kernel allows context switching? 25. What is the significance of Kernel Data Structures? Long Questions 1. Write a note on Features of UNIX operating system. 2. Explain various types of services provided by the UNIX operating system. 3. Explain in detail Architecture of UNIX operating system along with detailed diagram. 4. Write a note of overview of file subsystem. 5. Explain file system layout in detail. 6. Explain several parts of executable file that is created after compilation of the source code. 7. Write a note on process states and transition with diagram. Mr. Hardik Vyas Page 1

2 Fill in the blanks 1. & have developed UNIX operating system at AT&T Bell laboratory. 2. The set of and the internal algorithms form the body of the kernel. 3. The execution of user process on UNIX systems is divided into and levels. 4. System call is use to change the owner of the file. 5. Raw I/O devices are also called I/O devices. 6. System call overlay the image of program onto the running process. 7. Internally files are represented with the help of. 8. is the global kernel data structure of file system. 9. The conversion between file system address and disk address is done by. 10. The process that invoked the fork system call is the, and the newly created process is the 11. Process 1 is also known as 12. A special register called indicates the current stack depth. 13. is a directed graph whose nodes represent the states a process can enter and whose edges represent the events that cause a process to move from one state to another. Multiple Choice Questions 1. What are ed and vi? a. Editor b. Kernel c. System Call d. none 2. Which of the following is known as the core component of the UNIX operating system? a. System call b. Editor c. Hardware d. Kernel 3. Which of the following system call change the permission of the file? a. chown b. chmod c. stat d. exec 4. Fork system call is used for a. to divide the process. b. to execute the process. c. to create the process. d. to finish execution of process. 5. Which of the following allocates CPU to the process? Mr. Hardik Vyas Page 2

3 a. Scheduler module b. Fork system call c. Swapper process d. Exec system call 6. Which of the following can directly interact with the hardware? a. User b. Shell c. kernel d. System call 7. Kernel data structure which is allocated per process is a. inode table b. File table c. Index node d. User file descriptor table 8. Which block of file system starts at the end of inode list and contains file data and administrative data? a. Data block b. Boot block c. Super block d. inode list 9. Which of the following process data structure contains a per process region table, whose entries point to entries in a region table? a. User area b. Process table c. Region table d. u area Short Questions:- Unit 2 : Buffer Cache 1. What is Buffer? 2. What is Buffer cache? 3. Why does kernel need the buffer cache? 4. What is buffer header contains? 5. When the kernel loses control over a buffer? 6. What is the difference between delayed write and asynchronous write? 7. During which of the asynchronous I/O operations the kernel can invoke block release algorithm from an interrupt handler. 8. How kernel identify buffer uniquely in the buffer header? 9. What is delayed-write? 10. List the scenario of accessing block and its buffer is on hash. 11. List the scenario of accessing block and its buffer is not on hash. Mr. Hardik Vyas Page 3

4 12. How kernel retrieves free buffer from the free list? 13. What happened to buffer when it assigned to any process? 14. What happened to buffer after process finish using it? 15. What does directory entry consist of? 16. What are the content of inode block? 17. Which low level algorithm is used to convert path name to an inode? 18. Two files can have same inode, justify. 19. Which system call is used to obtain the attributes of a particular file? 20. What do you mean by file descriptors? 21. Define inode. 22. How long can a filename be in UNIX? 23. List system call that uses file descriptor as argument. 24. Why to check err no variable immediately after executing system call, if fails? 25. What is the significant of flag O_CREAT in open system call? 26. Write a system call to create a file with permission What is atomic operation? 28. List parameters that are in in-core inode not in disk inode. 29. Why superblock maintain partial list of free inode and disk block? 30. Why inode start from 1 not from 0? Long Questions:- 1. Explain conditions that describe status of the buffer. 2. Explain the structure of buffer pool. 3. Describes the scenarios followed by kernel in getblk to allocate a buffer for disk block. 4. Explain getblk algorithm. 5. Explain algorithm for releasing a buffer. 6. Write a note of algorithm for reading from the disk block. 7. Explain algorithm for writing a disk block. 8. Write a note on pros and cons of buffer cache. 9. What are the content of inode? 10. Describe structure of UNIX file system. 11. Describes the content of super block. 12. Explain working of command fsck. 13. How inode is assigned to a new file? 14. How data block is assigned to a file? 15. Explain data structure associated with the open files maintain by the kernel. 16. Why inode table s inode (in-core inode) doesn t maintain offset for reading or writing content of file? 17. In which situation value of in-core inode reference count is more than one? 18. In which situation file table reference count value is more than one? 19. Explain the structure of regular files. 20. Explain namei algorithm. Mr. Hardik Vyas Page 4

5 21. Explain getblk algorithm. 22. What is a link? Explain the types of links. How are links created? 23. Explain the following system call 24. i. open ii. fcntl iii. link iv. stat v. write vi. read vii. close Fill in the blanks:- 1. The kernel must write the buffer contents to disk before reassigning the buffer; this condition is known as. 2. System call allocates the buffer until the umount system call is called. 3. When doing write, the kernel starts the disk operation immediately but does not wait for its completion. 4. Function is used by the kernel at the time of search block in the queue. 5. The buffer header uses and field to uniquely identify the buffer in buffer pull. 6. The kernel arrange free list of buffer using algorithm. 7. The kernel arranges all the buffers in the pull in data structure, so that it can be searched efficiently. 8. Directory entry consist of and. 9. An comprises multiple action that are either performed in their entirely or not at all. 10. system call used to move file offset pointer to a specified point. 11. Use flag to create a file with open system call. 12. Open file descriptor 0 represent, 1 represent and 2 represent. 13. system call is used to delete files. 14. The standard library function 15. system call is used to read i-node entry using filename. 16. algorithm is for buffer allocation. 17. maintain partial free list of buffer. 18. block known as manager of file system. 19. block contains bootstrap program. 20. The lower lever algorithm is used to assign inode to a file. 21. system call is used to change file permission. 22. Directory files have at-least links. (Zero, One, Two, Three) 23. The interact with the hardware and the interact with the user. Multiple Choice Questions:- 1. Which of the following list of buffers is maintained by the kernel to preserve least recently used order of buffers? a. Busy list b. Locked list c. Free list d. Delay list 2. The free list is maintain as a. Doubly Linked List Mr. Hardik Vyas Page 5

6 b. Circular Linked List c. Doubly linked circular list d. Singly linked list 3. During which of the write operation, kernel starts the disk operation immediately but does not wait for its completion? a. Delayed write b. Synchronous write c. Asynchronous write d. None 4. What system call read a byte at a time from the standard input? a. read(0,buff,0); b. read(1,buff,1); c. read(2,buff,1); d. read(0,buff,1); 5. Which of the following information does not stored in inode? a. File size b. File name c. File owner d. File group 6. Directory entry consist of a. File type, file name and file size b. File type, file name and i-node c. File type and i-node d. File name and i-node 7. Which of the following file descriptor represent standard output? a. 0 b. 1 c. 2 d. None of above 8. Which system call is used to read content of the file? a. get() b. fread() c. getch() d. read() 9. When kernel retrieves block, its buffer is found in hash queue and is free, which of the following sequence occurred. (multiple choice) a. the buffer removed from hash queue b. the buffer marked as busy c. the buffer removed from the free list d. the buffer added into hash queue 10. When kernel retrieves block, its buffer is not available in hash queue, which of the following sequence occurred a. Process waits for buffer is available in hash queue b. A free block is allocated from the head of free list c. A free block is allocated from the tail of free list d. None of above 11. UNIX stores list of free blocks in a. Inode block Mr. Hardik Vyas Page 6

7 b. Super block c. Data block d. Both b and c 12. List of free inodes are maintained in a. Boot block b. Super block c. Inode block d. Data block 13. Type field of i-node stored zero means a. inode is allocated b. inode is free c. inode is locked d. inode is corrupted 14. Which of the following is not stored in superblock? a. Size of file system b. Size of inode table c. List of free blocks d. List of allocated i-nodes 15. Which of the following is stored in in-core inode but not in disk i-node? a. File size b. File permission and type c. Link cout d. Reference count 16. Which of the following is maintained by file table? a. a pointer to in-core inode table b. the offset of next read or write in the file c. access rights (r/w) allowed to the opening process. d. reference count e. all of above 17. Use of dup(int fd) system call is a. Create duplicate file b. Copy a file descriptor into the first free slot of the user file descriptor table c. Copy a file content d. Copy a file table entry in file table maintained by kernel 18. Which of the following system call is used to creat a new file? a. open() b. creat() c. both open() and creat() can be used d. none of above 19. Which of the following system call is used to delete a file? a. delete() b. close() c. unlink() d. link() 20. A process may query status of a file by using system call. a. open() b. read() c. status() d. stat()/fstat() Mr. Hardik Vyas Page 7

8 Short Questions:- Unit 3 : File System 1. List out various Buffer allocation algorithms. 2. Which algorithm converts a user-level path name to an inode? 3. List out various lower level file system algorithms. 4. What is inodes? 5. List out fields of disk inodes. 6. What is the significance of Number of link field of disk inode? 7. List out various file types supported by the UNIX file system. 8. When the contents of an inode changes? 9. What is the difference between in-core inode and buffer header? 10. Give the formula to compute the byte offset of the inode in the block. 11. Why the process that goes to sleep waiting for a free inode never wake up? 12. Which are the two extensions to the classic inode structure? 13. What are directories in UNIX operating system? 14. What is the significance of. (dot) and.. (dot dot) file names in the directory? 15. What mkfs program does? 16. What is the meaning of read permission on directory? 17. What do write permission on directory signify? 18. Which permission the user must have to search the directory? 19. List out the fields of super block. 20. Give the syntax for open system call. 21. Which are the first three user file descriptors? 22. What is the significance of count parameter in read system call? 23. What is the use of lseek system call? 24. What is the significance of modes parameter of Creat system call? 25. What is the difference between chdir and chroot? 26. What is the significance of stat and fstat system call? 27. Which information is returned by stat system call? 28. What is the use of dup system call? 29. What is the importance of options parameter in mount system call? 30. Which system call removes a directory entry for a file? Long Questions:- 1. Explain various fields of disk inodes. 2. Write a note on fields of in-core copy of an inode. 3. Explain an algorithm for allocation of In-core inodes. 4. Explain an algorithm for releasing an inode. 5. Write an algorithm to convert Byte Offset to Block Number in File System. 6. Explain in detail structure of regular file. Mr. Hardik Vyas Page 8

9 7. Explain an algorithm to Conversion of a Path Name to an inode. 8. Write a note on super block. 9. Explain ialloc algorithm to assign new inodes. 10. Explain algorithm to free an inode. 11. Explain Race Condition in Assigning inodes. 12. Write a note on algorithm for allocating disk block. 13. Explain open and close system call in detail. 14. Explain read and write system call. 15. Write a program for reader and a writer process. 16. Explain system call used for adjusting the position of file I/O. 17. Explain the system call used for creating a file. 18. Write a note on the system call that is used to create special file. 19. Write a note on pipes. 20. Write a note on mounting and unmounting file systems. 21. Explain in detail the field in entry of the mount table. 22. Explain link and unlink system call. 23. Explain file system consistency and race conditions during the use of unlink system call. 24. Write a note on file system abstraction and file maintenance. Fill in the blank:- 1. & algorithm assign and free inodes for the files respectively. 2. & algorithm allocate and free disk blocks for files respectively. 3. defines the set of users who have access rights to a file. 4. A field of in-core copy of an inode, indicating the number of instances of the file that are active. 5. An inode is active when a process allocates it, such as when a file. 6. The is set during execution of a system call to prevent other processes from accessing the mode while it is in use. 7. In algorithm is the kernel attempts to take an inode from the free list but finds the free list empty, it reports an error. 8. When the kernel releases an inode, it its in-core reference count. 9. Algorithm converts a file byte offset into physical disk block. 10. is a file whose data is a sequence of entries, each consisting of an inode number and the name of a file contained in the directory. 11. is a null terminated character string divided into separate components by the slash ("/") character. 12. The file name.. (dot dot) in the directory gives the inode for. 13. The algorithm parses the path name one component at a time, converting each component into an inode based on its name and the directory being searched, and eventually returns the mode of the input path name. 14. The current directory of the first process in the system, process 0, is the directory. Mr. Hardik Vyas Page 9

10 15. The current directory is stored in the process, and the system root mode is stored in a. 16. A process can execute the system call to change its notion of the file system root. 17. An inode is free if its type field is. 18. A file type field indicates that the disk mode is assigned. 19. The file system contains an array that is used to cache the numbers of free disk blocks in the file system. 20. The utility program organizes the data blocks of a file system in a linked list, such that each link of the list is a disk block that contains an array of free disk block numbers, and one array entry is the number of the next block of the linked list. 21. The open system call returns an integer' called the. 22. system call is used to change the directory. 23. system call is used to change the access permission of the file. 24. The system call connects the file system in a specified section of a disk to the existing file system hierarchy. 25. The system call disconnects a file system from the hierarchy. 26. The system call that links a file to a new name in the file system directory structure, creating a new directory entry for an existing inode is. Multiple Choice Questions:- 1. Which of the following is not buffer allocation algorithm? a. alloc b. brelse c. getblk d. breada 2. Which of the following is buffer allocation algorithm? a. alloc b. free c. ialloc d. breada 3. Which of the following is lower level file system algorithm? a. bread b. bwrite c. breada d. free 4. An inode is on the free list only if its reference count is a. -1 b. 0 c. 1 d Except which of the following system call, an inode is allocated and released. a. open() Mr. Hardik Vyas Page 10

11 b. close() c. alloc() d. free() 6. The file name. (dot) in the directory gives the inode for a. Current directory b. Parent directory c. Root directory d. Child directory 7. Write permission allows a process to create new directory entries or remove old ones with the help of system call except which of the following. a. creat b. mknod c. link d. open 8. Which of the following algorithm parses the path name one component at a time, converting each component into an inode? a. bmap b. namei c. iget d. iput 9. To change the directory which of the following system call is used? a. chddir() b. chdir() c. cd() d. cddir() 10. Which of the following utility program organizes the data blocks of a file system in linked list? a. md b. mkdir c. mkfs d. mdfs 11. Which of the following system call manipulate an inode? a. open() b. close() c. write() d. stat() 12. Which of the following system call does not manipulate an inode? a. chdir() b. chroot() c. write() d. chown() 13. Which of the following file operation does not use the file descriptor returned by open system call? a. Reading Mr. Hardik Vyas Page 11

12 b. Writing c. Creating d. seeking 14. The user file descriptor standard error is indicated by a. -1 b. 0 c. 1 d The reference parameter value 2 of lseek() system call indicates a. Beginning of file b. End of file c. Beyond the end of file d. At current position 16. Which of the following system call creates special files? a. mknod() b. creat() c. open() d. mkdir() 17. Which of the following system call is used to change the owner of the file? a. chmod() b. chroot() c. chown() d. chgrp() 18. Which of the following system call copies the file descriptor into the first free slot of the user file descriptor table? a. copy() b. fcopy() c. fdup() d. dup() 19. Which of the following system call removes the directory entry of the file? a. rm() b. rmdir() c. unlink() d. unlnk() Mr. Hardik Vyas Page 12

13 Short Questions :- Unit 4 : Process Management 1. What is the life time of the process? 2. What is Zombie state? 3. List out various states of the process. 4. What is user mode and kernel mode? 5. Which are the kernel data structures that describe process states? 6. What is the significance of UID field in process table data structure of kernel? 7. What is the use of PID field of process table? 8. What is the importance of Limit Field of u area data structure? 9. What is shared memory? 10. What is virtual address space? 11. What is region? 12. What is pregion for process? 13. Which is the value that permission field of pregion contains? 14. What are pages? 15. What is the significance of page table? 16. What does context of the process contains? 17. What is the importance of system-level context of the process? 18. What is the use of PS register in register context of the process? 19. What is program counter? 20. What does stack pointer contains? 21. What is the use of general-purpose register? 22. What is the significance of kernel stack of system-level context of process? 23. List out various system calls used to manage process. 24. What is the significance of exit system call? 25. What does kernel do for creating user-level context for child process? 26. What is the significance of exec system call? 27. What does magic number contains? 28. What is sticky bit? 29. What is shell? 30. Which operation is performed by shell for executing any command? 31. What is bootstrap? 32. What is init process? 33. What is the PID of init process? 34. What is the significance of daemons process? Mr. Hardik Vyas Page 13

14 Long Questions :- 1. Explain various process states with diagram. 2. Write a note on Process states and transitions. 3. Write a note on State transition model of the process. 4. Explain various fields that are present in process table data structure of kernel. 5. Explain in details fields of u area data structure of kernel. 6. Write a note on Processes and regions. 7. Explain Mapping of Logical to Physical Page Numbers. 8. Write a note on layout of the kernel. 9. Write a note on u area. 10. Explain the components contained by register context of process. 11. Write a note on components of system-level context of process. 12. Write a note on Components of the Context of a Process. 13. Write a note on process creation. 14. Explain the sequence of operations performed by kernel for the fork system call. 15. Explain fork algorithm. 16. Explain algorithm for exit system call. 17. Explain the system call used to invoke other programs in UNIX. 18. Explain the logical format of executable file generated by assembler or loader. 19. Explain the cases when kernel removes the entries for sticky bit text regions. 20. Write a note on shell. 21. What operations does shell perform to execute ls -l I wc? 22. Write a note on bootstrap sequence. 23. Explain an algorithm for booting the system. 24. Explain an algorithm for init. Fill in the blanks :- 1. The process executed the exit system call and is in the state. 2. The process enters the state model in the state when the parent process executes the fork system call and eventually moves into a state where it is ready to run. 3. When the process scheduler picks the process to execute, then the process enters the state, where it executes fork system call. When the process completes the system call, it may move to state, where it executes in user mode. 4. The field of process table data structure of kernel identifies the process state. 5. The process table contains fields that must always be accessible to the, but the u area contains fields that need to be accessible only to the process. 6. The table records the files the process has open. 7. A field of u area data structure masks mode settings on files the process creates. 8. A field of u area restricts the size of a process and the size of a file it can write. 9. A is a contiguous area of the virtual address space of a process that can be treated as a distinct object to be shared or protected. Mr. Hardik Vyas Page 14

15 10. The System V kernel divides the virtual address space of a process into logical. 11. Entries may exist in the process table, the u area, or in a separately allocated area of memory, dependent on the implementation. 12. The memory management hardware divides physical memory into a set of equal-sized blocks called. 13. The region table entry contains a pointer to a table of physical page numbers called a. 14. The system allows address references via the kernel register triples only when in mode. 15. A process can access its u area when it executes in mode but not when it executes in mode. 16. The only way for a user to create a new process in the UNIX operating system is to invoke the system call. 17. After the fork system call is executed, the two processes have identical copies of their user-level context except for the return value. 18. Processes on a UNIX system terminate by executing the system call. 19. Processes and exist throughout the lifetime of a system. 20. The process is a process dispatcher, spawning processes that allow users to log in to the system, among others. 21. The init process spawns processes to monitor the terminal lines configured on a system. Multiple Choice Questions :- 1. When process executed exit system call then it comes to a. Zombie state b. Ready state c. Sleeping state d. Wakeup state 2. When parent process execute the fork system call, the process comes to a. Ready state b. Zombie state c. Created state d. Running state 3. When the system clock interrupts the process, it comes to a. User running state b. Kernel running state c. Ready state d. Running state 4. Which of the following u area field record the time the process (and its descendants) spent executing in user mode and in kernel mode? a. Pointer b. Terminal c. Error d. Timer 5. Data address is used for access to Mr. Hardik Vyas Page 15

16 a. Global data variable b. instructions or subroutine calls c. data structures local to a subroutine d. Virtual address 6. Which of the following kernel data structure contains information about the regions allocated to the process? a. Process table b. U area c. User descriptor table d. Region table 7. Which of the following is not the value of permission field of pregion? a. Read-only b. Read-write c. Read-execute d. Write-only 8. Which of the following is not present in user-level context of process? a. Process text b. Process data c. User stack d. permission 9. Which of the following system call allows a process to allocate more memory dynamically? a. creat() b. brk() c. new() d. fork() 10. Which of the following system call is used to invoke other programs? a. exec() b. creat() c. fork() d. new() 11. Which of the following is not the system call to manage the process? a. fork() b. exec() c. creat() d. open() 12. Which of the following are the tasks that are performed by daemon process? a. administration and control of networks b. Execution of time-dependent activities c. line printer spooling d. All of the above. Mr. Hardik Vyas Page 16

17 Unit 5 : Inter-process Communication Short Questions :- 1. What is the drawback on pipe? 2. List out various types of pipes? 3. What is the use of pipe? 4. What is signal? 5. List out cases for handles the signals. 6. What is the significance of function parameter in signal system call? 7. What is the use of setpgrp system call? 8. What is the purpose of kill system call? 9. Give the formula to find index into the table of data structures from the descriptor for IPC mechanism. 10. List out the system calls that are used for messages. 11. What is the purpose of msgsnd system call? 12. What is the significance of msgget system call? 13. List out system call used to manage shared memory. 14. What is semaphore? 15. Which are the elements that a semaphore consists of in UNIX System V? 16. Which system call of semaphore is used to create and gain access to a set of semaphores? 17. What is the purpose of IPC_NOWAIT flag in semop system call? 18. What is the significance of SEM_UNDO flag in semop system call? 19. What is socket? 20. List out the parts of kernel structure. 21. What is the importance of protocol layer of kernel structure? 22. What is device layer of kernel structure? 23. What is the use of socket system call? 24. What is the purpose of connect and listen system call? 25. What is shutdown system call? 26. What is return by getsockname system call? Long Questions :- 1. Write a note of signals in System V UNIX. 2. Explain an algorithm for recognizing signals. 3. Explain Signal system call. 4. Write a note on anomaly with signals. 5. Write a note on common properties of System V IPC mechanism. 6. Explain message queue in detail. 7. Explain message system call used to send and receive messages. 8. Write a note on msgget and msgctl system calls. 9. Explain an algorithm for msgsnd. 10. Explain an algorithm for receiving a message. Mr. Hardik Vyas Page 17

18 11. Write a note on shared memory. 12. Explain the system calls used to attach and detach the region to the virtual address space. 13. Explain algorithm for attaching shared memory. 14. Explain semaphore in detail. 15. Explain various system calls of semaphore. 16. Explain an algorithm for semaphore operations. 17. Explain Socket model. 18. Explain socket and bind system call. Fill in the blanks :- 1. Mechanisms allow arbitrary processes to exchange data and synchronize execution. 2. Signals inform processes of the occurrence of asynchronous events. 3. The kernel uses the process to identify groups of related processes that should receive a common signal for certain events. 4. The system call initializes the process group number of a process and sets it equal to the value of its process ID. 5. The system call is use to send signals to the process. 6. If pid is a integer, the kernel sends the signal to the process with process ID pid. 7. If pid is, the kernel sends the signal to all processes in the sender's process group. 8. If pid is, the kernel sends the signal to all processes whose real user ID equals the effective user ID of the sender. 9. If pid is a integer but not 1, the kernel sends the signal to all processes in the process group equal to the absolute value of pid. 10. System call returns a message descriptor that designates a message queue for use in other system calls. 11. System call has options to set and return parameters associated with a message. 12. System call sends the message. 13. System call is used to receive the message. 14. In msgsnd system call, is the descriptor of a message queue typically returned by a msgget call. 15. Processes can communicate directly with each other by sharing parts of their virtual address space and then reading and writing the data stored in the. 16. The system call creates a new region of shared memory or returns an existing one. 17. The system call logically attaches a region to the virtual address space of a process. 18. The system call detaches a region from the virtual address space of a process. 19. The system call manipulates various parameters associated with shared memory. 20. The parameter of shmctl system call is the address of a user-level data structure that contains the status information of the shared memory table entry when querying or setting its status. 21. The system calls allow processes to synchronize execution by doing a set of operations atomically on a set of semaphores. 22. The system call of semaphore is used to create and gain access to a set of semaphores. 23. The layer of kernel structure provides the interface between the system calls and the lower Mr. Hardik Vyas Page 18

19 layers. 24. The system call receives incoming requests for a connection to a server process. 25. & system calls transmit data over a connected socket. Multiple Choice Questions :- 1. Which of the following inform processes of the occurrence of asynchronous events? a. Signals b. Pipe c. Semaphore d. message 2. Which of the following system call is used to initializes process group number? a. setgroup() b. setpgrp() c. setprocgrp() d. setpgrp() 3. Which of the following system call is used to send signal to the process? a. send() b. sendsignal() c. kill() d. killsignal() 4. Which of the following value of pid signify that the kernel has send the signal to all the processes with process ID pid? a. Negative b. Zero c. Positive d. Non-zero 5. Which of the following value of pid signify that the kernel has send the signal to all the processes whose real user ID equals the effective user ID of the sender? e. -ve f. 0 g. +ve a Which of the following system call is used to receive the message? a. msgget() b. msgctl() c. msgsnd() d. msgrcv() 7. Which of the following parameter of msgsnd system call specifies the action the kernel should take if it runs out of internal buffer space? a. msgqid b. msg c. count d. flag Mr. Hardik Vyas Page 19

20 8. Which of the following parameter of msgrcv system call specifies the size of the data array in msg? a. msg b. maxcount c. type d. flag 9. Which of the following system call of shared memory, create a new region of shared memory? a. shmget() b. shmcreat() c. shmat() d. shmdt() 10. Which if the following parameter of shmctl system call is the address of a user-level data structure that contains the status information of the shared memory table entry when querying or setting its status? a. id b. cmd c. shmstatbuf d. statbuf 11. Which of the following system call allow processes to synchronize execution by doing a set of operations atomically on a set of semaphores? a. creat() b. semaphore() c. message() d. shmat() 12. Which of the following system calls is used to manipulate the values of semaphore? a. semget() b. semctl() c. semop() d. semval() 13. Which of the following is not the layer of kernel structure? a. Socket b. Protocol c. Device d. hardware 14. Which of the following system call is used to requests that the kernel make a connection to an existing socket? a. listen() b. socket() c. bind() d. connect() 15. Which of the following system call return the name of the socket? a. getsockname() b. getsckname() Mr. Hardik Vyas Page 20

21 c. retsckname() d. None Unit 6 : Input Output Management Short Questions :- 1. What is device driver? 2. What is stream? 3. What is the significance of device interface? 4. Which are the types of devices supported by UNIX system? 5. What is major and minor number? 6. What is the difference between system calls for devices and regular files? 7. Which information is maintained by the data structures of the driver? 8. What does c specifies in CTW-W--W--? 9. What is the purpose of control and status register? 10. What is DMA? 11. What is strategy interface? 12. What is the significance of command parameter in ioctl system call? 13. What does b indicates in br ? 14. What is the function of terminal driver? 15. What is clist? 16. Which mode is important for screen oriented applications? Long Questions :- 1. Write a note on device interface. 2. Explain stages at which device configuration can be specified. 3. Explain an algorithm for opening a device. 4. Explain an algorithm for closing a device. 5. Write a note on ioctl system call. 6. Write a note on interrupt handlers. 7. Explain device driver in detail. 8. Explain various functions of line discipline module. 9. Write a note on the operations performed by kernel on linked list. 10. Explain an algorithm for writing data to a terminal. 11. Write a note on terminal driver. 12. Explain an algorithm for reading a terminal. 13. Explain select system call. 14. Explain an algorithm for Logging In. Fill in the blanks :- 1. The command, for instance, reads kernel data structures from physical memory to report process statistics. Mr. Hardik Vyas Page 21

22 2. & types of devices are supported by UNIX system. 3. The system call provides an interface that allows processes to control character devices. 4. is the procedure by which administrators specify parameters that are installation dependent. 5. The & system calls of a device file funnel through the two device switch tables, according to the file type. 6. Administrators set up device special files with the command. 7. The number indicates a device type that corresponds to the appropriate entry in the block or character device switch tables. 8. The number indicates a unit of the device. 9. Special files do not have to be created every time the system is booted; they need be changed only if the configuration changes, such as when adding devices to an installation. 10. The kernel saves the process context using algorithm before entering the device-specific open routine. 11. The kernel uses the to transmit data between the buffer cache and a device. 12. A & program directly deals with the disk. 13. In mode, the line discipline converts raw data sequences typed at the keyboard to a canonical form before sending the data to a receiving process. 14. In mode, the line discipline passes data between processes and the terminal without such conversions. 15. The command deletes the word at the current cursor position. 16. The BSD system has a system call that allows device polling. 17. The terminal is the terminal on which a user logs into the system, and it controls processes that the user initiates from the terminal. Multiple Choice Questions :- 1. Which of the following system call provides an interface that allows processes to control character device, but it is not applicable to regular files? a. ioctl() b. open() c. close() d. read() 2. Which of the following is not the system calls of character special files that pass through the respective procedures in the character device switch table? a. read() b. open() c. write() d. ioctl() 3. Which of the following is a command used by administrator to set up device special files? a. mknod b. dev c. makdev Mr. Hardik Vyas Page 22

23 d. None 4. Which of the following is the system call is a generalization of the terminal-specific stty and gtty system calls available in earlier versions of the UNIX system? a. open() b. close() c. ioctl() d. setterm() 5. Which of the following is screen oriented applications? a. Vi b. Dw c. Bash d. None Mr. Hardik Vyas Page 23

Babu Madhav Institute of Information Technology, UTU

Babu Madhav Institute of Information Technology, UTU 5 Years Integrated M.Sc.(IT) Semester 6 Question Bank 060010601 UNIX Internals Unit 1: Introduction and Overview of UNIX Answer following in short 1. What is system call? 2. Who are principal designer

More information

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions

Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions Noorul Islam College Of Engineering, Kumaracoil MCA Degree Model Examination (October 2007) 5 th Semester MC1642 UNIX Internals 2 mark Questions 1. What are the different parts of UNIX system? i. Programs

More information

Logical disks. Bach 2.2.1

Logical disks. Bach 2.2.1 Logical disks Bach 2.2.1 Physical disk is divided into partitions or logical disks Logical disk linear sequence of fixed size, randomly accessible, blocks disk device driver maps underlying physical storage

More information

ADVANCED OPERATING SYSTEMS

ADVANCED OPERATING SYSTEMS ADVANCED OPERATING SYSTEMS UNIT 2 FILE AND DIRECTORY I/O BY MR.PRASAD SAWANT Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS Chichwad Prof.Prasad Sawant,Assitiant Professor,Dept. Of CS PCCCS Chichwad

More information

PROCESS STATES AND TRANSITIONS:

PROCESS STATES AND TRANSITIONS: The kernel contains a process table with an entry that describes the state of every active process in the system. The u area contains additional information that controls the operation of a process. The

More information

INTERNAL REPRESENTATION OF FILES:

INTERNAL REPRESENTATION OF FILES: INTERNAL REPRESENTATION OF FILES: Every file on a UNIX system has a unique inode. The inode contains the information necessary for a process to access a file, such as file ownership, access rights, file

More information

CS2028 -UNIX INTERNALS

CS2028 -UNIX INTERNALS DHANALAKSHMI SRINIVASAN INSTITUTE OF RESEARCH AND TECHNOLOGY,SIRUVACHUR-621113. CS2028 -UNIX INTERNALS PART B UNIT 1 1. Explain briefly details about History of UNIX operating system? In 1965, Bell Telephone

More information

PROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R

PROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R PROCESS CONTROL: This will describe the use and implementation of the system calls that control the process context. The fork system call creates a new process, the exit call terminates process execution,

More information

Overview. Over the next four weeks, we will look at these topics: Building Blocks. Advanced Authentication Issues.

Overview. Over the next four weeks, we will look at these topics: Building Blocks. Advanced Authentication Issues. Overview Over the next four weeks, we will look at these topics: Building Blocks Advanced Authentication Issues Security Overview Storage and its abstraction Virtualization and appliances Data Replication

More information

ROEVER ENGINEERING COLLEGE Elambalur,Perambalur DEPARTMENT OF CSE UI UNIT-I

ROEVER ENGINEERING COLLEGE Elambalur,Perambalur DEPARTMENT OF CSE UI UNIT-I ROEVER ENGINEERING COLLEGE Elambalur,Perambalur-621212 DEPARTMENT OF CSE UI UNIT-I 1. Explain the details about UNIX system Architecture (12) UNIX System Architecture: Three Level of the system are User:

More information

COP 4604 UNIX System Programming IPC. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University

COP 4604 UNIX System Programming IPC. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University COP 4604 UNIX System Programming IPC Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University Interprocess Communication Interprocess communication (IPC) provides two major functions/services:

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / ODD SEMESTER

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR / ODD SEMESTER KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR 2011-2012 / ODD SEMESTER Question Bank Subject Code/Name: CS1005-Unix Internals Year / Sem: IV / VII UNIT I- GENERAL

More information

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel CIS 657 Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler (2%

More information

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent? Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler

More information

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year

St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad DEPARTMENT OF INFORMATION TECHNOLOGY Academic year St. MARTIN S ENGINEERING COLLEGE Dhulapally,Secunderabad-000 DEPARTMENT OF INFORMATION TECHNOLOGY Academic year 0-0 QUESTION BANK Course Name : LINUX PROGRAMMING Course Code : A0 Class : III B. Tech I

More information

SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI SHRI ANGALAMMAN COLLEGE OF ENGINEERING AND TECHNOLOGY (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI 621 105 DEPARTMENT OF COMPUTER SCIENCE AND ENGG. Cs 1005- UNIX INTERNALS UNIT

More information

UNIT I Linux Utilities

UNIT I Linux Utilities UNIT I Linux Utilities 1. a) How does Linux differ from Unix? Discuss the features of Linux. 5M b) Explain various text processing utilities, with a suitable example for each. 5M 2. a) Explain briefly

More information

1.Define signal? NOV DEC 2011 MAY JUNE 2011

1.Define signal? NOV DEC 2011 MAY JUNE 2011 SEM/ YEAR : VI / III CS2028 UNIX INTERNALS UNIT IV THE STRUCTURE OF PROCESSES PART A 1.Define signal? NOV DEC 2011 MAY JUNE 2011 A signal is an asynchronous event which is delivered to a process. 2. Define

More information

Building blocks for Unix power tools

Building blocks for Unix power tools for Unix power tools Now that we have given a good overview of a lot of the better Unix tools, I want to take some time to talk about our toolset for building Unix programs. The most important of these

More information

UNIX Kernel. UNIX History

UNIX Kernel. UNIX History UNIX History UNIX Kernel 1965-1969 Bell Labs participates in the Multics project. 1969 Ken Thomson develops the first UNIX version in assembly for an DEC PDP-7 1973 Dennis Ritchie helps to rewrite UNIX

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : LINUX PROGRAMMING Course Code : ACS010 Class : III

More information

(MCQZ-CS604 Operating Systems)

(MCQZ-CS604 Operating Systems) command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process

More information

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Latest Solved from Mid term Papers Resource Person Hina 1-The problem with priority scheduling algorithm is. Deadlock Starvation (Page# 84) Aging

More information

Inter-Process Communication: Message Passing. Thomas Plagemann. Big Picture. message passing communication?

Inter-Process Communication: Message Passing. Thomas Plagemann. Big Picture. message passing communication? Inter-Process Communication: Message Passing Thomas Plagemann With slides from Pål Halvorsen, Kai Li, and Andrew S. Tanenbaum monitors sleep and wakeup critical regions Big Picture race conditions shared

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)

More information

Interprocess Communication. Originally multiple approaches Today more standard some differences between distributions still exist

Interprocess Communication. Originally multiple approaches Today more standard some differences between distributions still exist Interprocess Communication Originally multiple approaches Today more standard some differences between distributions still exist Pipes Oldest form of IPC provided by all distros Limitations Historically

More information

CS 385 Operating Systems Fall 2011 Homework Assignment 5 Process Synchronization and Communications

CS 385 Operating Systems Fall 2011 Homework Assignment 5 Process Synchronization and Communications CS 385 Operating Systems Fall 2011 Homework Assignment 5 Process Synchronization and Communications Due: Friday December 2 at 8:00 P.M. via Blackboard Overall Assignment Man Pages For this assignment,

More information

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS

ENGR 3950U / CSCI 3020U Midterm Exam SOLUTIONS, Fall 2012 SOLUTIONS SOLUTIONS ENGR 3950U / CSCI 3020U (Operating Systems) Midterm Exam October 23, 2012, Duration: 80 Minutes (10 pages, 12 questions, 100 Marks) Instructor: Dr. Kamran Sartipi Question 1 (Computer Systgem)

More information

Unix System Architecture, File System, and Shell Commands

Unix System Architecture, File System, and Shell Commands Unix System Architecture, File System, and Shell Commands Prof. (Dr.) K.R. Chowdhary, Director COE Email: kr.chowdhary@iitj.ac.in webpage: http://www.krchowdhary.com JIET College of Engineering August

More information

Process. Program Vs. process. During execution, the process may be in one of the following states

Process. Program Vs. process. During execution, the process may be in one of the following states What is a process? What is process scheduling? What are the common operations on processes? How to conduct process-level communication? How to conduct client-server communication? Process is a program

More information

Module A: The FreeBSD System

Module A: The FreeBSD System Module A: The FreeBSD System History Design Principles Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication A.1 History First developed

More information

Module A: The FreeBSD System

Module A: The FreeBSD System Module A: The FreeBSD System History Design Principles Programmer Interface User Interface Process Management Memory Management File System I/O System Interprocess Communication A.1 History First developed

More information

Virtual File System. Don Porter CSE 306

Virtual File System. Don Porter CSE 306 Virtual File System Don Porter CSE 306 History Early OSes provided a single file system In general, system was pretty tailored to target hardware In the early 80s, people became interested in supporting

More information

Embedded System Curriculum

Embedded System Curriculum Embedded System Curriculum ADVANCED C PROGRAMMING AND DATA STRUCTURE (Duration: 25 hrs) Introduction to 'C' Objectives of C, Applications of C, Relational and logical operators, Bit wise operators, The

More information

Virtual File System. Don Porter CSE 506

Virtual File System. Don Porter CSE 506 Virtual File System Don Porter CSE 506 History ò Early OSes provided a single file system ò In general, system was pretty tailored to target hardware ò In the early 80s, people became interested in supporting

More information

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated?

Processes. Process Management Chapter 3. When does a process gets created? When does a process gets terminated? Processes Process Management Chapter 3 1 A process is a program in a state of execution (created but not terminated) Program is a passive entity one on your disk (survivor.class, kelly.out, ) Process is

More information

Appendix A: FreeBSD. Operating System Concepts 9 th Edition

Appendix A: FreeBSD. Operating System Concepts 9 th Edition Appendix A: FreeBSD Operating System Concepts 9 th Edition Silberschatz, Galvin and Gagne 2013 Module A: The FreeBSD System UNIX History Design Principles Programmer Interface User Interface Process Management

More information

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year

Dr. Rafiq Zakaria Campus. Maulana Azad College of Arts, Science & Commerce, Aurangabad. Department of Computer Science. Academic Year Dr. Rafiq Zakaria Campus Maulana Azad College of Arts, Science & Commerce, Aurangabad Department of Computer Science Academic Year 2015-16 MCQs on Operating System Sem.-II 1.What is operating system? a)

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files ... and systems programming C basic syntax functions arrays structs

More information

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs.

CSC209: Software tools. Unix files and directories permissions utilities/commands Shell programming quoting wild cards files. Compiler vs. CSC209 Review CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files... and systems programming C basic syntax functions arrays structs

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

Software Development & Education Center

Software Development & Education Center Software Development & Education Center Embedded Linux & RTOS With ARM 9 µc Embedded Linux and RTOS with ARM9 µc Introduction The course is designed for those who want to pursue Linux based Embedded Systems.

More information

File Systems. What do we need to know?

File Systems. What do we need to know? File Systems Chapter 4 1 What do we need to know? How are files viewed on different OS s? What is a file system from the programmer s viewpoint? You mostly know this, but we ll review the main points.

More information

Advanced Programming in the UNIX Environment W. Richard Stevens

Advanced Programming in the UNIX Environment W. Richard Stevens Advanced Programming in the UNIX Environment W. Richard Stevens ADDISON-WESLEY PUBLISHING COMPANY Reading, Massachusetts Menlo Park, California New York Don Mills, Ontario Wokingham, England Amsterdam

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : LINUX PROGRAMMING Course Code : A70511 (R15) Class

More information

(In columns, of course.)

(In columns, of course.) CPS 310 first midterm exam, 10/9/2013 Your name please: Part 1. Fun with forks (a) What is the output generated by this program? In fact the output is not uniquely defined, i.e., it is not always the same.

More information

CS 361 Computer Systems Fall 2017 Homework Assignment 4 - Inter-Process Communications & I/O

CS 361 Computer Systems Fall 2017 Homework Assignment 4 - Inter-Process Communications & I/O CS 361 Computer Systems Fall 2017 Homework Assignment 4 - Inter-Process Communications & I/O Overall Assignment For this assignment, you are to write three programs that will work together using inter-process

More information

3.1 Introduction. Computers perform operations concurrently

3.1 Introduction. Computers perform operations concurrently PROCESS CONCEPTS 1 3.1 Introduction Computers perform operations concurrently For example, compiling a program, sending a file to a printer, rendering a Web page, playing music and receiving e-mail Processes

More information

Chap 4, 5: Process. Dongkun Shin, SKKU

Chap 4, 5: Process. Dongkun Shin, SKKU Chap 4, 5: Process 1 Process Concept Job A bundle of program and data to be executed An entity before submission for execution Process (= running program) An entity that is registered to kernel for execution

More information

Introduction to Unix. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Introduction to Unix. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Introduction to Unix Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is an OS? OS is a resource manager Sharing Protection Fairness Performance

More information

Department of Computer Science and Technology

Department of Computer Science and Technology M.Sc. (CA) (2 nd Semester) 040020202 : UNIX Internals and Shell Programming Teaching Schedule Objective: To acquaint the students with the basic internal structure & operations of UNIX operating system,

More information

CSPP System V IPC 1. System V IPC. Unix Systems Programming CSPP 51081

CSPP System V IPC 1. System V IPC. Unix Systems Programming CSPP 51081 System V IPC 1 System V IPC System V IPC 2 System V IPC Overview System V IPC 3 System V InterProcess Communication (IPC) Provides three mechanisms for sharing data between processes message queues (similar

More information

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve? What is an Operating System? A Whirlwind Tour of Operating Systems Trusted software interposed between the hardware and application/utilities to improve efficiency and usability Most computing systems

More information

4. System Functions and Subroutines

4. System Functions and Subroutines Chapter 4 4. System s and Subroutines This chapter describes extensions to Fortran 77 that are related to the IRIX compiler and operating system. Library s summarizes the Fortran run-time library functions.

More information

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D) MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications

More information

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Architectural Support for Operating Systems. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Architectural Support for Operating Systems Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Basic structure of OS Basic computer

More information

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad -500 043 COMPUTER SCIENCE AND ENGINEERING TUTORIAL QUESTION BANK Course Name : LINUX PROGRAMMING Course Code : A70511 Class : IV B.

More information

UNIX Memory Management Interview Questions and Answers

UNIX Memory Management Interview Questions and Answers UNIX Memory Management Interview Questions and Answers 1. What is the difference between Swapping and Paging? Swapping: Whole process is moved from the swap device to the main memory for execution. Process

More information

UNIT I Linux Utilities and Working with Bash

UNIT I Linux Utilities and Working with Bash Subject with Code :(16MC814)Course& Branch: MCA Year & Sem: II-MCA& I-Sem UNIT I Linux Utilities and Working with Bash 1. a) How does Linux differ from Unix? Discuss the features of Linux.6M b) Explain

More information

Process Management 1

Process Management 1 Process Management 1 Goals of this Lecture Help you learn about: Creating new processes Programmatically redirecting stdin, stdout, and stderr (Appendix) communication between processes via pipes Why?

More information

5/8/2012. Creating and Changing Directories Chapter 7

5/8/2012. Creating and Changing Directories Chapter 7 Creating and Changing Directories Chapter 7 Types of files File systems concepts Using directories to create order. Managing files in directories. Using pathnames to manage files in directories. Managing

More information

Process Management! Goals of this Lecture!

Process Management! Goals of this Lecture! Process Management! 1 Goals of this Lecture! Help you learn about:" Creating new processes" Programmatically redirecting stdin, stdout, and stderr" (Appendix) communication between processes via pipes"

More information

The UNIX Time- Sharing System

The UNIX Time- Sharing System The UNIX Time- Sharing System Dennis M. Ritchie and Ken Thompson Bell Laboratories Communications of the ACM July 1974, Volume 17, Number 7 UNIX overview Unix is a general-purpose, multi-user, interactive

More information

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems

Processes. OS Structure. OS Structure. Modes of Execution. Typical Functions of an OS Kernel. Non-Kernel OS. COMP755 Advanced Operating Systems OS Structure Processes COMP755 Advanced Operating Systems An OS has many parts. The Kernel is the core of the OS. It controls the execution of the system. Many OS features run outside of the kernel, such

More information

Lecture 19: File System Implementation. Mythili Vutukuru IIT Bombay

Lecture 19: File System Implementation. Mythili Vutukuru IIT Bombay Lecture 19: File System Implementation Mythili Vutukuru IIT Bombay File System An organization of files and directories on disk OS has one or more file systems Two main aspects of file systems Data structures

More information

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey

Process Concepts. CSC400 - Operating Systems. 3. Process Concepts. J. Sumey CSC400 - Operating Systems 3. Process Concepts J. Sumey Overview Concurrency Processes & Process States Process Accounting Interrupts & Interrupt Processing Interprocess Communication CSC400 - Process

More information

CSC209 Review. Yeah! We made it!

CSC209 Review. Yeah! We made it! CSC209 Review Yeah! We made it! 1 CSC209: Software tools Unix files and directories permissions utilities/commands Shell programming quoting wild cards files 2 ... and C programming... C basic syntax functions

More information

Processes COMPSCI 386

Processes COMPSCI 386 Processes COMPSCI 386 Elements of a Process A process is a program in execution. Distinct processes may be created from the same program, but they are separate execution sequences. call stack heap STACK

More information

Linux System Administration

Linux System Administration System Processes Objective At the conclusion of this module, the student will be able to: Describe and define a process Identify a process ID, the parent process and the child process Learn the PID for

More information

Universidad Carlos III de Madrid Computer Science and Engineering Department Operating Systems Course

Universidad Carlos III de Madrid Computer Science and Engineering Department Operating Systems Course Exercise 1 (20 points). Autotest. Answer the quiz questions in the following table. Write the correct answer with its corresponding letter. For each 3 wrong answer, one correct answer will be subtracted

More information

Operating Systems. II. Processes

Operating Systems. II. Processes Operating Systems II. Processes Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Concepts Definitions and basic concepts Process

More information

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering) A. Multiple Choice Questions (60 questions) Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering) Unit-I 1. What is operating system? a) collection of programs that manages hardware

More information

UNIX File System. UNIX File System. The UNIX file system has a hierarchical tree structure with the top in root.

UNIX File System. UNIX File System. The UNIX file system has a hierarchical tree structure with the top in root. UNIX File System UNIX File System The UNIX file system has a hierarchical tree structure with the top in root. Files are located with the aid of directories. Directories can contain both file and directory

More information

read(2) There can be several cases where read returns less than the number of bytes requested:

read(2) There can be several cases where read returns less than the number of bytes requested: read(2) There can be several cases where read returns less than the number of bytes requested: EOF reached before requested number of bytes have been read Reading from a terminal device, one line read

More information

UNIT I INTRODUCTION TO UNIX & FILE SYSTEM

UNIT I INTRODUCTION TO UNIX & FILE SYSTEM INTRODUCTION TO UNIX & FILE SYSTEM Part A 1. What is UNIX? UNIX(Uniplexed Information Computing System) it is an operating system was developed in Early 1970 at Bell Labs. It was initially a character

More information

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2.

PROCESS CONCEPTS. Process Concept Relationship to a Program What is a Process? Process Lifecycle Process Management Inter-Process Communication 2. [03] PROCESSES 1. 1 OUTLINE Process Concept Relationship to a Program What is a Process? Process Lifecycle Creation Termination Blocking Process Management Process Control Blocks Context Switching Threads

More information

UNIT III- INTER PROCESS COMMUNICATIONS Part A

UNIT III- INTER PROCESS COMMUNICATIONS Part A UNIT III- INTER PROCESS COMMUNICATIONS Part A 1 What are the different communications supported by UNIX? Inter process communication and network communication 2 What do you mean by Inter process communication?

More information

Process Time. Steven M. Bellovin January 25,

Process Time. Steven M. Bellovin January 25, Multiprogramming Computers don t really run multiple programs simultaneously; it just appears that way Each process runs to completion, but intermixed with other processes Process 1 6 ticks Process 2 Process

More information

Processes. Dr. Yingwu Zhu

Processes. Dr. Yingwu Zhu Processes Dr. Yingwu Zhu Process Growing Memory Stack expands automatically Data area (heap) can grow via a system call that requests more memory - malloc() in c/c++ Entering the kernel (mode) Hardware

More information

autodie - Replace functions with ones that succeed or die with lexical scope # Recommended: implies 'use autodie qw(:default)'

autodie - Replace functions with ones that succeed or die with lexical scope # Recommended: implies 'use autodie qw(:default)' NAME autodie - Replace functions with ones that succeed or die with lexical scope SYNOPSIS # Recommended: implies 'use autodie qw(:default)' use autodie qw(:all); # Recommended more: defaults and system/exec.

More information

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 03 Lecture 12 Create, Execute, and Exit from a Process

More information

The UNIX File System

The UNIX File System The UNIX File System Magnus Johansson (May 2007) 1 UNIX file system A file system is created with mkfs. It defines a number of parameters for the system as depicted in figure 1. These paremeters include

More information

RCU. ò Dozens of supported file systems. ò Independent layer from backing storage. ò And, of course, networked file system support

RCU. ò Dozens of supported file systems. ò Independent layer from backing storage. ò And, of course, networked file system support Logical Diagram Virtual File System Don Porter CSE 506 Binary Formats RCU Memory Management File System Memory Allocators System Calls Device Drivers Networking Threads User Today s Lecture Kernel Sync

More information

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK UNIT 1 CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF MCA QUESTION BANK SUBJECT: NETWORK PROGRAMMING/MC9241 YEAR/ SEM: II /I V 1 CCET UNIT 1 1. What are the steps involved in obtaining a shared

More information

UNIX Files. How UNIX Sees and Uses Files

UNIX Files. How UNIX Sees and Uses Files UNIX Files How UNIX Sees and Uses Files I/O: UNIX approach The basic model of the UNIX I/O system is a sequence of bytes that can be accessed either randomly or sequentially. The UNIX kernel uses a single

More information

Lecture 17. Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture17/ $ cp r /home/hwang/cs375/lecture17/*.

Lecture 17. Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture17/ $ cp r /home/hwang/cs375/lecture17/*. Lecture 17 Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture17/ $ cp r /home/hwang/cs375/lecture17/*. Both subdirectories have makefiles that will make all the programs. The "unnamed"

More information

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU

B. V. Patel Institute of Business Management, Computer &Information Technology, UTU BCA-3 rd Semester 030010304-Fundamentals Of Operating Systems Unit: 1 Introduction Short Answer Questions : 1. State two ways of process communication. 2. State any two uses of operating system according

More information

CL020 - Advanced Linux and UNIX Programming

CL020 - Advanced Linux and UNIX Programming Corder Enterprises International Building World Class MIS Teams, for you! CL020 - Advanced Linux and UNIX Programming Course Description: In-depth training for software developers on Linux and UNIX system

More information

Processes. CS3026 Operating Systems Lecture 05

Processes. CS3026 Operating Systems Lecture 05 Processes CS3026 Operating Systems Lecture 05 Dispatcher Admit Ready Queue Dispatch Processor Release Timeout or Yield Event Occurs Blocked Queue Event Wait Implementation: Using one Ready and one Blocked

More information

Secure Software Programming and Vulnerability Analysis

Secure Software Programming and Vulnerability Analysis Secure Software Programming and Vulnerability Analysis Christopher Kruegel chris@auto.tuwien.ac.at http://www.auto.tuwien.ac.at/~chris Race Conditions Secure Software Programming 2 Overview Parallel execution

More information

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories Chapter Two Exploring the UNIX File System and File Security Lesson A Understanding Files and Directories 2 Objectives Discuss and explain the UNIX file system Define a UNIX file system partition Use the

More information

Mon Sep 17, 2007 Lecture 3: Process Management

Mon Sep 17, 2007 Lecture 3: Process Management Mon Sep 17, 2007 Lecture 3: Process Management September 19, 2007 1 Review OS mediates between hardware and user software QUIZ: Q: Name three layers of a computer system where the OS is one of these layers.

More information

CS 3733 Operating Systems

CS 3733 Operating Systems What will be covered in MidtermI? CS 3733 Operating Systems Instructor: Dr. Tongping Liu Department Computer Science The University of Texas at San Antonio Basics of C programming language Processes, program

More information

Files and Directories

Files and Directories Files and Directories Stat functions Given pathname, stat function returns structure of information about file fstat function obtains information about the file that is already open lstat same as stat

More information

The UNIX File System

The UNIX File System The UNIX File System Magnus Johansson May 9, 2007 1 UNIX file system A file system is created with mkfs. It defines a number of parameters for the system, such as: bootblock - contains a primary boot program

More information

System Programming. Introduction to Unix

System Programming. Introduction to Unix Content : by Dr. B. Boufama School of Computer Science University of Windsor Instructor: Dr. A. Habed adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 3 Introduction

More information

Layers in a UNIX System. Create a new process. Processes in UNIX. fildescriptors streams pipe(2) labinstructions

Layers in a UNIX System. Create a new process. Processes in UNIX. fildescriptors streams pipe(2) labinstructions Process Management Operating Systems Spring 2005 Layers in a UNIX System interface Library interface System call interface Lab Assistant Magnus Johansson magnusj@it.uu.se room 1442 postbox 54 (4th floor,

More information

CptS 360 (System Programming) Unit 6: Files and Directories

CptS 360 (System Programming) Unit 6: Files and Directories CptS 360 (System Programming) Bob Lewis School of Engineering and Applied Sciences Washington State University Spring, 2019 Motivation Need to know your way around a filesystem. A properly organized filesystem

More information

Typical File Extensions File Structure

Typical File Extensions File Structure CS 355 Operating Systems File Systems File Systems A file is a collection of data records grouped together for purpose of access control and modification A file system is software responsible for creating,

More information

Processes. Sanzheng Qiao. December, Department of Computing and Software

Processes. Sanzheng Qiao. December, Department of Computing and Software Processes Sanzheng Qiao Department of Computing and Software December, 2012 What is a process? The notion of process is an abstraction. It has been given many definitions. Program in execution is the most

More information