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

As the system administrator you are always looking for ways

As the system administrator, you are always looking for ways to improve your network. Although there are many different types of operating systems, there are many versions of the operating systems, as well. After much re ...

1 write a shell script lab2q1sh to do the followingacreate

1. Write a shell script (lab2_q1.sh) to do the following: a. Create list1.txt (use echo command) as: Football Basketball Skates Soccer ball Golf ball Shoes b. Create list2.txt (use echo command) as: Football Basketball S ...

Assignment directory treein this assignment students are

Assignment: Directory Tree In this assignment, students are required to implement an operating system command that displays the tree structure of a folder or directory. The program asks the user to enter a folder name. N ...

Questionpick an aspect of an historical operating system ie

Question: Pick an aspect of an historical operating system (IE. Multics) and detail how a modern system supports that function. 10 to 20 lines are enough and please provide citations or references.

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

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

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.

Assignmentin this document of 2-3 pages respond to the

Assignment In this document of 2-3 pages, respond to the following: • Describe the specific security concerns or risks that your chosen operating system is exposed to and how you plan to mitigate the risk that each one p ...

This research paper will focus on issues and concerns with

This research paper will focus on issues and concerns with Patch Management. With the advent of many types of software and systems, patch management is major nightmare. Patching the system may cause the system to crash, ...

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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