Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask Operating System Expert

problem 1) What is the output of the following program? What are the contents of file ‘test.txt’?

# include < stdio.h >
# include < fcntl.h >
Main ( )
{
int fd1, fd2, fd3 ;
fd1 = open ( “test.txt”, O–RDWR | O–TRUNC);
printf ( “ fd1 = %.d\n”, fd1);
prepare ( fd1, “Rose is’’, 7);fd2 = dup (fd1);
Printf ( “fd2 = %d \n”, fd2);
prepare (fd2, “beautiful”,10) ;
Close (0);
fd3 = dup (fd1) ;
Printf ( “ fd3 = %d\n”, fd3) ;
prepare ( 0, “flower”, 7) ;
dup2 (3,2) ;
prepare (2, “!\n” ), 2) ;
}

problem 2) Describe the behaviour and output of the following program:

Main ( )
{
int i ;
char * cp ;
extern char *sbrk ( );
cp = sbrk (10) ;
[3733]-202 3for ( i = 0 ; i < 10 ; i + + )
*cp ++ = ‘a’ + i ;
sbrk ( –10 ) ;
cp = sbrk ( 10 ) ;
for ( i = 0; i < 10 ; i ++)
Printf ( “ char % d = % c \n”, i, * cp ++) ;
}

problem 3) Describe fork swap and expansion swap.

problem 4) Answer in brief:

i) A delayed prepare is different from asynchronous prepare. Illustrate.

ii) Convert logical byte offset 1,25,000 into actual physical byte offset using bmap algorithm. Assume block size 1024 bytes.

problem 5) List and describe the syntax of time related system calls.

problem 6) Which are the actions taken by kernel while unmounting a file system?

problem 7) Consider block size = 512 bytes. Determine the offset, no. of bytes read in each of the following read statement.

Consider the statements are executed in the same process.

read (fd, buffer, 250) ;
read (fd, buffer, 400) ;
read (fd, buffer, 700) ;

Operating System, Computer Science

  • Category:- Operating System
  • Reference No.:- M95298

Have any Question? 


Related Questions in Operating System

Operating system assignmentpart onetopic- operating system

Operating System Assignment Part One Topic- Operating system support for mobile computing Submission Rquirements Project Proposal 1 page 1- Pages - 8 to 10 2- Power point slides 3-The project description document which e ...

Your objective is to create a program that simulates round

Your objective is to create a program that simulates Round Robin CPU scheduling. You may write your program in C, C++, Java, or Python. If you choose C, C++, or Java you must include a Makefile. Your program will be test ...

Scripting the gnulinux shell1 write a script that stores

Scripting the GNU/Linux Shell 1. Write a script that stores the time it takes a command (your choice of command) to run in three variables, real, user, and system, corresponding to the three default times that time print ...

Question moving function outside of the kernel or even

Question: Moving function outside of the kernel or even layering the kernel may provide some benefits. How does virtualization factor into a layered vs. non-layered design discussion? Provide specfic support for your ans ...

Operating systems assignmentwe have just 3 processes p1 p2

Operating Systems Assignment We have just 3 processes, P1, P2 and P3, and they arrive at 1, 15 and 23 milliseconds respectively, and they each have two CPU Burst as follows (there are no I/O Bursts). P1: 10 3 P2: 5 12 P3 ...

Questionwhen designing a kernel with rudimentary

Question: When designing a kernel with rudimentary functionality, what are the required services? Justify your answer and provide an example. provide atleast 15 lines. do the best. need reference which is good.

Discussionmultithreading please respond to the

DISCUSSION "Multithreading" Please respond to the following: • Describe at least one possible effect that multithreading could have on event-driven programming when you are either developing or using a computer program. ...

One of the most useful tools you will use in your role as

One of the most useful tools you will use in your role as an Information Security professional is a hardening checklist. Essentially, it is a document that serves as a guide to configuring a desktop / system security. Pl ...

Operating systemsprogramming assignment- virtual memory

Operating Systems Programming Assignment- Virtual Memory Manager with Paged Segments In this assignment, you will design a virtual memory manager with paged segments, and then simulate its operation for five different pa ...

Problemnbspdescriptionflash back to flash forward see

Problem  Description: Flash Back to Flash Forward (see Chapter 1 Practice Exercise 1.2 and the OS in DevOps Discussion Area) While having a discussion with your OS DevOps team, you are approached with the situation: our ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen