ERODD HOME

Operating Systems CPSC 304
Homework on Components and Program Development (Chapters 1-6)
Earl Rodd erodd@malone.edu Extension 8546 www.malone.edu/erodd

Name: ______________________________________

  1. If an operating system is ported to a new hardware platform, which major component is most likely to need significant change?

    __________________________________________________________________

    Why? ______________________________________________________________

  2. When NTFS was added to Windows NT, what component of the operating system needed to be rewritten?

    _______________________________________________

  3. To add a new I/O type (e.g. the next USB), what component of the operating system needs to be change?

    ________________________________________

  4. In a simple embedded system (e.g. automobile) with no hard drive, which two of the main four operating system components is quite simplified and why?

    Component:_______________________________Why:_____________________________

    Component:_______________________________Why:_____________________________

  5. We have a "C" program called loop.c. The following files exist. The first number is the file size. The date/time is when it was last updated. 12629 May 18 22:51 loop 786 May 22 09:08 loop.c 1384 May 18 22:51 loop.o

    What can you say about the history of changes to this program based on the time stamps?

    _________________________________________________

    _________________________________________________

  6. Now, if these are the time stamps, 13233 May 22 09:09 loop 786 May 22 09:08 loop.c 1543 May 22 09:09 loop.o

    What can you say about the history of changes to this program based on the time stamps?

    _________________________________________________

    _________________________________________________

  7. For a java program, consider these files: -rw-r--r-- 1 earl users 911 2007-06-06 11:52 nano.class -rw-r--r-- 1 earl users 514 2007-06-01 08:07 nano.java

    What can you say about the history of changes to this program based on the time stamps?

    _________________________________________________

    _________________________________________________

  8. A program we will use in a lab later in the course has both a LINUX and a Windows version. The executable sizes are:

    The "C" source is the same in both cases. What could account for the difference? Hint: The difference is not "caused" by the operating system, but by something we have learned about. Other programs might be smaller in Windows.

    ________________________________________________________

    ________________________________________________________

    ________________________________________________________

  9. Would you expect the object file sizes to be much different in LINUX and Windows? Why?

    _________________________________________

  10. In lab, we will use a compiler called "g++", the GNU open source C++ compiler. For these commands, write the main INPUT file and OUTPUT file (don't consider the listing files or libraries). INPUT (filename) Command OUTPUT (filename) _____________ g++ -c P1.c __________________________ _____________ g++ P1.o __________________________ _____________ g++ -o P1 P1.o __________________________ _____________ g++ P1.c __________________________

  11. Mark the portability of the following files between LINUX, Solaris UNIX or Windows. Portable means the file can be processed (compiled or linked) without any changes. Mark either: (U)nchanged, (P)orted - needs modest changes, or X for cannot be used at all on another system.

    1. ___ prog1.java

    2. ___ prog2.c

    3. ___ prog2.o

    4. ___ prog2.exe

    5. ___ prog1.class (Java byte code)

  12. Which of the following are "executables"? Mark X for the ones which are.

    1. ___ prog2.exe

    2. ___ javac (in LINUX)

    3. ___ WORD.EXE

    4. ___ file10.o

    5. ___ prog1.java

    6. ___ prog2.c

    7. ___ The java virtual machine (run with the java command in LINUX)

  13. In C:\WINDOWS\SYSTEM32, we see several DLL's with what seems to be a vendor name. What might these be?

    ___________________________________________

  14. If 4 programs are running in LINUX, all of which use libcrypt.so, how many copies of libcrypt.so are loaded into memory? _________