• Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us

Global Guideline - Interviewer and Interviewee Guide.

Links
  • Home
  • Interview Questions
  • Online Quiz Tests
  • Blog
  • Contact Us
  1. Interviews
  2. Operating System Linux
  3. Linux Operating System Management

Linux OS Management Question:

Which function can be used instead of the dup2 to duplicate the file descriptor?
a) read()
b) open()
c) stat()
d) fcntl()

Linux Operating System Management Interview Question
Linux Operating System Management Interview Question

Answer:

d) fcntl()


Previous QuestionNext Question
If one of the thread in multi-threaded process is blocked on an I/O, which of the following is true?
a) The entire process with block if their is no kernel supported threads
b) Other threads of the process will continue to execute even if there is no kernel supported threads
c) It depends on specific implementatation
d) All of the above
Below is the code:

int main() {
int fd1, fd2;
struct stat buff1, buff2;
fd1 = open("1.txt", O_RDWR);
fd2 = open("2.txt", O_RDWR | O_APPEND);
lseek(fd1, 10000, SEEK_SET);
write(fd1, "abcdefghij", 10);
write(fd2, "abcdefghij", 10);
fstat(fd1, &buff1);
fstat(fd2, &buff2);
printf(" %d %d", buff1.st_size, buff2.st_size);
return 0;
}

Before running the program, the file 1.txt and 2.txt size is 20 each. What is the output?
a) 30 30
b) 100020 20
c) 100030 30
d) 100010 30

Interview Categories:

    • Awk Programming
    • Linux Administrator
    • Linux Bash Arithmetic Expressions
    • Linux Commands
    • Linux Debugging
    • Linux Device Drivers
    • Linux Editors
    • Linux Environment
    • Linux GCC Compiler
    • Linux General
    • Linux IPC
    • Linux Operating System Management
    • Linux OS
    • Linux OS Systems
    • Linux Shell
    • Linux Shutdown and Startup
    • Linux Signal Handling
    • Linux Socket Programming
    • Linux Sysfs
    • Linux System Calls
    • Linux Threads
    • Makefile
    • Proc Filesystem
    • Search Pattern
    • Static and Shared Libraries

Most Popular Quiz Categories:

Java AWT And SwingHTMLSQLOOAD (Object Oriented Analysis and Design)SAT (Scholastic Aptitude Test) Sentence CorrectionBiology Aptitude TestStatistics Aptitude TestNetworkingChemistry Aptitude TestManagement

Most Popular Interviews

  • Business and Economy
  • Networking
  • Computer Programming
  • Operating System
  • Computer Hardware

Most Popular Quizzes

  • Information Technology
  • Networking
  • Engineering
  • Accounting
  • Java

Keep in touch with us

 

Copyright © 2007 - 2025 globalguideline.com

all rights reserved.
  • About Us
  • Contact Us
  • Blog
  • Terms of use
  • Privacy Policy