(other than for about 5 students) the marking of all projects and exams is now complete. Results are still to be approved by a Board of Examiners' meeting, and will be released on Nov 28th.
The summaries and histograms of our unit's components appear...
ANONYMOUS wrote
I'm afraid I can't answer why, but if you email me to indicate who you are....
The anticipated, though not required, code appears in the sample solution https secure.csse.uwa.edu.au run help2002?p np opt B1146
(Most, 337) marks for the 2nd project are now available.
The average of submitted projects was 74.4 , the average of all (including not-submitted) 66.4
Congratulations to the 57 337 students receiving 45 50 or higher. 316 students have a passing mark,...
ANONYMOUS wrote
We're still marking -) Still waiting on the 'manual marking' from one of our 3 markers.
There are 20 projects (from 26 students) that have so many errors that we've "put them aside", and they won't be released along with the other 22...
ANONYMOUS wrote
A stack should only be used by pushing and popping items from the top of the stack, and not by 'peeking' at the 2nd or 3rd... element.
In contrast, depending on your use for it, a list may have items added and removed from its head, f...
ANONYMOUS wrote
I doubt that your notes will taken from you, but you may not be permitted to use anything other than your standard reading-glasses to read them. Just a pessimistic thought.
ANONYMOUS wrote
There's no definition of a trojan-horse that you need to detect in your code.
You're being asked to find report any command names that each appear more than once in the directory names indicated by the value of PATH variable. If any p...
All very good questions, for which I have no answers.
I've been on this "Lab Compute Modernisation Working Group" as our PMC ENG academic rep., and have been asking closely related questions for months. We've been shown a video and a basic demo of th...
A total of 360 students submitted the 2nd project, 119 individual submissions and 121 in pairs.
162 submissions compiled without error (with -Wall -Werror); 82 did not (what is going on??)
A common question has been "how many source files did student...
ANONYMOUS wrote
It's just a programming question, and doesn't actually require any standard-library calls or system-calls.
From an era before questions became more 'authentic' to the theme of the unit.
ANONYMOUS wrote
Yes - just like exams in every other unit.
On the front page of thee exam answer booklet it even requires you to "List all questions in the order attempted".
ANONYMOUS wrote
yes (as answered on this forum this week).
You do not have to (re)write any of the standard C or POSIX functions, nor any functions that a question says you don't have too write.
But if you choose for your function to use, say, a linked...
ANONYMOUS wrote
Thanks, great answer.
The OP should also review Lecture 9, particularly p6 https teaching.csse.uwa.edu.au units CITS2002 lectures lecture09 06.html
ANONYMOUS wrote
While a structure is a possible solution, there are others without one.
The spreadsheet described has rows and columns, with each cell element being a string.
You can think of the spreadsheet as a 2D array of strings, or a 3D array of c...
"A survey of 500 developers .... found more than two-thirds (67 ) admitted they pushed code into a production environment without testing, with more than a quarter (28 ) acknowledging they do so on a regular basis.
More troubling still, 60 also admit...
(a reminder than there's many different ways to implement a hashtable)
But if you wished to follow an implementation requiring, say, add to list, then, yes, you'd need to write that too.
You can rely of there being standard library functions, such as f...
ANONYMOUS wrote
If you're really stuck during the exam then, yes, outlining a plan to address the problem (perhaps as a big comment) is better than writing nothing.
BUT, please do not see this as a viable approach to passing questions - it would pro...
ANONYMOUS wrote
Some of these were discussed in the final lecture on the 2022 exam paper.
- There is no requirement to provide comments, but they may assist the markers' understanding if your answer is unclear.
- Constants are always preferred over 'ma...
ANONYMOUS wrote
You are confusing terms. In this context, 'free'ing memory is the activity of deallocating memory previously allocated with malloc() .
If you didn't malloc it (or realloc it, or strdup it...) then you don't free ...
ANONYMOUS wrote
For students between 2nd and 3rd year, the summer break is the 'perfect' time for an internship.
Though you may be a little late for this summer.
When the CSSE department is informed of opportunities, they are posted here https secur...
ANONYMOUS wrote
Keep in mind that make does not understand (or perform) any compiling or linking - it simply determines (reads) what relationships exist, and then executes actions (shell commands). There's not even any requirement that the act...
ANONYMOUS wrote
Hi, near the top of that page it states "certain files depend on others and, if one changes, it triggers the "rebuilding" of others".
In our example if, say, calcmarks.h changes, it does not trigger the rebuilding of calcmarks.c, and ...
You won't be required to write a Makefile for any of the (single file) programs or functions that you're asked to develop, but you can be asked about the make utility and their Makefiles.
ANONYMOUS wrote
3 of the 6 Leaving Outcomes of this unit explicitly mention the C programming language.
All 6 Learning Outcomes are assessed in the final exam.
Using pseudo-code, in place of C, does not demonstrate your understanding of C.
All students ...
ANONYMOUS wrote
The Exams' information page - https teaching.csse.uwa.edu.au units CITS2002 examinations.php - provides links copies of the past 3 years of exam papers. Going back much beyond that gets you 'in trouble' as the unit's materials chan...
There'll be an extra Catch-Up session on Thursday 26th, from 1pm-3pm, in CSSE Rm 2.07
Please bring along your questions about this year's exam, or about questions from the past 3 year's papers, either programming or non-programming questions.
Preferen...
If concerned about the automated marking procedure for the 1st project, you may download the marking script and its test files.
Download the Zip archive from https teaching.csse.uwa.edu.au units CITS2002 projects markme1.zip
- expand the Zip archiv...
ANONYMOUS wrote
Thanks for that feedback.
We've tried this year to give students greater opportunity to ask more questions about the 'theory' topics, and to not solely focus on programming-based material, by holding our weekly 2 hour Catch Up sessions...
ANONYMOUS wrote
Given that certain regions of memory contain very frequently required instructions or data, does it make sense that hardware and an operating-system would attempt to automatically, or 'cleverly', ensure that those frequently accessed...
ANONYMOUS wrote
Hey.
Yes, exam questions on those more recent topics could involve you writing some coded statements, but will not ask you to write whole (short) programs or functions as the programming-focussed questions do. Agreed, we haven't had ...
ANONYMOUS wrote
Each of the non-programming questions are different, no single rubric covers them all, and there's no single correct answer or approach to answering a question.
Each is a short-answer question which, not surprisingly, receives the high...
ANONYMOUS wrote
For this exam (format), you're welcome to write your functions (there will be at most 2 or 3 per question) in any order you choose.
Start each on a different page of your exam booklet if you wish.
I don't mind if you use pencil, but tak...
ANONYMOUS wrote
I don't believe that you can, other than by repeating what execv() does from within your own code. As you've suggested, using the stat permissions only check if a permission bit is set - you could, for example, set execute permi...
Hello Henry,
While your mysync.c file may not export an API (which make sense, as it will only call out to other files), there is the convention that, as the whole project is named mysync, that we have a common header file named mysync.h to provide co...
ANONYMOUS wrote
You're overthinking this.
Yoru project will be tested with standard directories and files, with standard names, some identified with absolute pathnames, others with relative pathnames. There's no trickery.
Yes, devote time to studying f...
My motivations for not releasing sample exam solutions are
(many years ago, when I did release some solutions) students became 'obsessed' with those solutions, to the point of rote learning those answers, in the hope that those questions would be rep...
ANONYMOUS wrote
The intention is that each test is independent of the others, so you won't be penalised multiple times for the same mistake, but some tests do involve 2 or 3 options, in combination.
All students' projects will be tested using the same...
ANONYMOUS wrote
You earn marks for providing the correct header files for the problem.
It's reasonable that you may provide one or two extra ones that are not required, but if you simply provide a long list of header files, most of which are not requ...
ANONYMOUS wrote
It is your responsibility to submit what you want to be marked, either by the deadline or after the deadline but receiving the same campus-wide penalties that apply in all units.
Your most recent submission is the one that is marked.
ANONYMOUS wrote
A few lines not compiling means the whole project doesn't build.
You should make the decision - but it's not the markers' job to correct your project.
ANONYMOUS wrote
As discussed here https secure.csse.uwa.edu.au run help2002?p np opt B969
it could be for any number of reasons.
The problem has likely occurred well before calling fopen() but then fopen() just triggers the detection and...
(Most) marks for the 1st project are now available.
Congratulations to the 15 students receiving 50 50, and to the 38 students receiving 46 50 or higher. 274 students have a passing mark, so far.
UPDATE, Sat 21st - average mark after some remarks cor...
Your understanding is incorrect.
We are synchronising files and, if a file requires copying from one (sub)directory to another, then the full path to the new copy must (first) exist, or be created.
ANONYMOUS wrote
There's no required format for any of the verbose output, and it will be ignored during the automatic marking, but the project sheet does say "The -v option requests that mysync be more verbose in its output, reporting its actions ...
ANONYMOUS wrote
Yes, you may keep (re)submitting right up to the '7-day-limit' when a standard 35 penalty kicks in.
cssubmit only retains one copy of each named file, the most recent one, and that's the one that gets marked.
ANONYMOUS wrote
Your project should be able to handle both absolute and relative top-level directory names
(I don't believe it's a "theoretical" matter, and am unsure how why you'd be treating them differently).
I'm not sure what you mean by an incorr...
ANONYMOUS wrote
It's a good practice, but there is probably nothing that we can do if an error is detected.
Keep in mind that the files might not be text source files, and so the notion of a 'line' may make no sense.
Hello,
I don't understand how the Subject line relates to your questions, but...
ANONYMOUS wrote
. mysync -r -a -i dir1 dir2
There is no wildcard, but dir1 is a valid pattern.
Then ' .h' is being provided as a (valid) directory name.
'0 ' is a pos...
Coders For Causes (CFC) would like to share information about their summer projects. CFC is a student-run club focusing on building software and generating technical solutions for charities and not for profit organisations.
Participating in the CFC pr...
ANONYMOUS wrote
Firstly, we have said that your project will not be tested with cases where any particular filename appears in below the same location of multiple top-level directories, and with identical modification times. That case would certainl...
Hello Ashkaan,
It's almost impossible to diagnose the problem from your description, alone.
Each process has a single heap, and that heap is shared by all (many) functions used in your program.
We're aware of malloc realloc .... that directly manage ou...
University IT will be performing critical maintenance between 5.30am and 6.30am on Friday 20 October.
Between 5.30am and 6am all network and internet (wired and Wi-Fi) connections both on campus and remote will be unavailable.
Then, from 6am to 6.30am...
ANONYMOUS wrote
Using the casual definition of a 'hidden file' as one whose name begins with a '.', then patterns will only match hidden files, if the patterns also begin with a '.'
Try ls -l . in your home directory.
Also, (the)read the very fi...
ANONYMOUS wrote
As discussed here - https secure.csse.uwa.edu.au run help2002?p np opt U937
you shouldn't (need) to use chmod() , but are welcome to if necessary.
ANONYMOUS wrote
No; your project may be tested with an absolute pathname - they are standard ways of naming directories (and files), and all(?) utilities handle them.
Don't forget that your project will be tested on Linux, and not Windows.
ANONYMOUS wrote
It does not say "only".
You can use open() or fopen() to open any type of file, and then use the appropriate read write close functions.
ANONYMOUS wrote
A "usage" message is printed when a program is invoked incorrectly.
It is not printed if the running program later detects an error as it is executing.
ANONYMOUS wrote
Which is consistent with what the project sheet has always said.
There's no real need to free memeory on termination - https secure.csse.uwa.edu.au run help2002?p np opt U711
nor to close files or directories unless you need to flush ...
ANONYMOUS wrote
Start here https secure.csse.uwa.edu.au run help2002?p np opt U838 hl open 20fopen
The rest of your question would be a good exam question -)
You should use 0666 and 0777 when creating new items. Those values will then be modified by the umask of the process creating the items, which may be a person's shell invoking the command from the command-line or, in our case, a web-server invoking t...
ANONYMOUS wrote
Marking is not about losing marks, there is no 'negative marking', it's about awarding marks for (in our projects) things that work correctly, as required. I appreciate that you've described your situation, but I can't really see a r...
ANONYMOUS wrote
There certainly are more complicated implementations of hashtables that 'grow' as the number of their elements pass some threshold.
Extending the initial vector of pointers to the lists is the easy part, but then you also have to deter...
You and your friend may have different values of umask set in your shells.
https www.geeksforgeeks.org umask-command-in-linux-with-examples
The umask is used to modify the initial permissions of any newly created file or directory, to set i...
ANONYMOUS wrote
Hi, thanks for reporting the problem, and sorry that I didn't initially read your post clearly enough.
I believe that the bug is now fixed.
Good luck,
ANONYMOUS wrote
Yes, if the function requires things declared in header files, you'll need to include the header files.
If you didn't attend, please watch today's lecture recording.
ANONYMOUS wrote
I have a great Algorithms textbook named Compared to What? - https www.amazon.com.au Compared-What-Introduction-Analysis-Algorithms dp 071678243X r
Is 7579 bytes a lot? Compared to what?
When any process terminates the operating syste...
ANONYMOUS wrote
They have different roles.
The more familiar fprintf() allows you to print anything you want.
In contrast, perror() prints system-level error messages in a standard and consistent format. But it can only do that if the curre...
ANONYMOUS wrote
I'm unsure why (it's very notable that) this case has generated as much discussion confusion as it has. Yes, it's a valid reasonable case that could be assessed.
Here is a shellscript of commands to build a set of test directories and...
ANONYMOUS wrote
Hello,
As was announced in yesterday's lecture and in a lecture last week (are you attending lectures?), we don t know the exact date, but I'm hopeful of tomorrow (Wed 18th).
One of our project markers, who was marking the projects of...
ANONYMOUS wrote
It may be that you're zipping up things by providing their full absolute pathnames, and those pathnames cannot (will not) be created on the server. It would be quite a security nightmare if you could indicate where you'd like your fi...
ANONYMOUS wrote
Whether this approach is described as working silently, stealthily, or convoluted, you'd surely have to agree that it's inelegant? I can't think of many (any?) tasks in computing where we perform an activity, and then undo it later o...
ANONYMOUS wrote
It really looks like there's an error in your Makefile, though we can't tell what it is.
As marks will be awarded for an error-free Makefile and its ability to build your project, you should definitely get rid of those errors.
At this morning's lecture I was surprised that so few students had any knowledge of the changes occurring within computing labs, across campus, from 1st semester 2024.
I have just checked, and this information was sent to all enrolled students, and po...
ANONYMOUS wrote
That's correct - if -n is requested, no actual synchronisation is performed and, thus, there are no (new updated) files requiring their modification times changed.
That's correct, if the same command is run twice (with -p both times), ...
ANONYMOUS wrote
That is an unusual approach.
By default, make looks for a file named makefile or then Makefile in the current directory.
The name Makefile is preferred because it appears near the top of an alphabetical listing ...
ANONYMOUS wrote
(Politely) I have run out of ways to paraphrase an answer to this same question that keeps being asked.
- the project requires you to synchronise files.
- the project does not require you to synchronise empty directories.
- the project d...
ANONYMOUS wrote
Your program will be tested on a contemporary Linux distribution, such as the Ubuntu distribution in the CSSE labs.
I suggest that you try it on one of those machines.
Just seconds.
Someone asked previously about the st mtim (without the...
ANONYMOUS wrote
There's nothing special about the file .DS Store - https en.wikipedia.org wiki .DS Store text In 20the 20Apple 20macOS 20operating,Services 20Store 2C 20reflecting 20its 20purpose
Your code should not be explicitly looking for i...
ANONYMOUS wrote
the answer is the same to this one https secure.csse.uwa.edu.au run help2002?p np opt B858
I'm unsure what webpage you've read, or if you're misunderstood it, but try this command
touch .hidden ; ls -ld.hidden ; sleep 65 ; touc...
ANONYMOUS wrote
I've (just) posted of how the sample solution handles this https secure.csse.uwa.edu.au run help2002?p np opt B855
Yes, unfortunately, because the sample solution requires you to upload the distinct top-level directories, it current...
ANONYMOUS wrote
I strongly suggest that you review what those '.' and '..' entries are (Lecture 15).
Reviewing what those '.' and '..' entries are will answer your question.
Running the sample solution shows the correct 'treatment' of those entries.
ANONYMOUS wrote
This has (just) been answered here - https secure.csse.uwa.edu.au run help2002?p np opt B856 year 2023
and has been stated multiple times on this forum.
How (any) solution works is not a property of the chosen data-structure. The cont...
ANONYMOUS wrote
The sample solution is correct in that it syncs copies files (term them regular files if it helps) and does not sync directories, empty or otherwise.
If you are creating syncing empty directories it will be a problem in marking as the ...
ANONYMOUS wrote
I can see that the outcomes should be the same - you make the file copies, and then extend a dynamic data-structure to remember what has been performed. In contrast, the sample solution builds its dynamic data-structure to define wha...
ANONYMOUS wrote
Hello - you posted something at "6 54pm Thu 12th Oct", and then sent me a follow-up at "11 12pm Thu 12th Oct"?
(I receive a copy of every post via email, and can also see them via the 'NEW" menu item, above)
With your approach, I'm wond...
ANONYMOUS wrote
Thanks for the suggestion.
The output currently produced by the sample solution is printed as the program executes, reporting its actions as a hint (of one way) that the project can be constructed, and doesn't perform any additional pr...
ANONYMOUS wrote
Yes, you may use those (or any other) C11 functions that you choose. The list of functions on the project page states - "It is anticipated that a successful project will use..." - it's just providing a big hint, but not being restric...
ANONYMOUS wrote
There are many different ways to implement hashtables, and all sorts of information may be used as their keys, and stored in them.
The example code provided in our workshop is just one example, but should be able to store all values le...
ANONYMOUS wrote
At the top of the unit's Schedule
"All source code provided in lectures, laboratories, and workshops is released under the Creative Commons CC BY-NC-SA 4.0 license. CITS2002 students may use the materials in assessed work without attr...
There is now a web-based sample solution available at https secure.csse.uwa.edu.au run mysync-sample
Hopefully this will allay some of the (surprising amount of) confusion about the command-line options and what should be synchronised.
It's a little ...
ANONYMOUS wrote
Marks will be awarded for your choice and implementation of data structures.
Even if correct, the use of a single array of all information is not the best possible choice.
Using a hashmap (hashtable, dictionary,....) is a better choice ...
ANONYMOUS wrote
The project doesn't require you to detect locked files, and there's no required interactivity once the program is running.
I don't believe that you can easily detect if another process has a file open (??)
ANONYMOUS wrote
The project description says "Filenames matching the indicated pattern..."
Filenames are the names of files.
Directory names are not filenames.
ANONYMOUS wrote
Clearly it makes no sense to create infinitely long directory chains (no utilitiy program would correctly do that).
It sounds like you're creating things before you determine whether you need to.
We are just synchronising files.
However, files can't existing 'by themselves' - they must be in a directory that, itself, is in other directories.
So if you need to create the file dir2 a b c d e f g h filename.txt then you'll need to ensure that al...
ANONYMOUS wrote
Not convinced that there's no support, and it would be good to hear from some WSL users.
I found
https devicetests.com accessing-usb-drive-wsl-ubuntu
https devblogs.microsoft.com commandline connecting-usb-devices-to-wsl
ANONYMOUS wrote
If the second case was the required way of doing it, would thing2 be a pattern or a directory in this example
. mysync -i thing1 thing2
We are only synching files, not directories.
(I don't believe that testing for and synching empty directories would add a 'layer of complexity', maybe 20 lines??)
"Even though very few of the early players in technology still exist, we use their creations to this day. Bell Labs created the transistor and Unix , and Fairchild Semiconductor created the integrated circuit, but neither company is still around. So...
Sorry, but I'm not following your question.
Without the -r option you do not investigate any (sub)directories - resulting in you only considering the files in the top-level directories provided on the command-line.
(and you can't know that a dire...
ANONYMOUS wrote
If a filename under consideration matches any of the -i options then it is ignored.
If a filename under consideration matches any of the -o options then it is accepted.
Using the -a option requests that all files, rega...
ANONYMOUS wrote
The goal of the project is to ensure that two or more directories each have the latest copy of the same files.
If you find a file that exists below one top-level directory, but not others, then it'll need copying to those other directo...
ANONYMOUS wrote
That's a general statement that different shells will support slightly different syntaxes to offer filename expansion.
The function glob2regex() provided for this project supports only a very basic subset of what shells broadly s...
ANONYMOUS wrote
Just try it.
You won't be able to make a recursive loop in your file-system by just making directories and copying files.
But you may accidentally make an 'infinitely' long chain of directories.
But you can always interrupt the executio...
ANONYMOUS wrote
The project marking won't be measuring the time taken, a data-structure (or combination) that avoids
But get it to work first, and then determine where your program may be spending a lot of time.
A linked list provides about the worst c...
Hi Ethan,
I've tried mixing up the order of the header files, but I can't replicate your problem.
My system
gcc version 12.3.0 (Ubuntu 12.3.0-1ubuntu1 23.04)
In the file usr include x86 64-linux-gnu bits struct stat.h
around line 75, you should h...
ANONYMOUS wrote
Please read the project description - it describes exactly what -a is for, and has been discussed and clarified many times on this forum already.
ANONYMOUS wrote
You don't copy the subdirectory to the destination, but you may first need to make the subdirectory.
NO, NO, NO.
How many more times do I need to stay that -a has nothing to do with this?
ANONYMOUS wrote
As the project description states, we are matching filenames not pathnames .
Your program will not receive the single, or double, quotation characters.
Also see the difference between these two commands
echo ' HOME'
echo " HOME"
...
ANONYMOUS wrote
We are synchronising files , which may have any name.
From the perspective of the directory entries, we are only considering (regular) files and (possibly) subdirectories.
- By default, we do not consider directory entries with a lea...
ANONYMOUS wrote
You may choose any data-structures, or a combination of data-structures, that you wish.
I really don't know what "two chunck of memories" means, but there's no need to explain.
ANONYMOUS wrote
I'm assuming that you meant "-r isnt used..."
So, if not processing recursively, how why did you get 'down to' SubDirA in the first place?
Keep recursing until you run out of subdirectories to descend into.
Hello Ethan,
Very strange that there's a difference (or that you're not seeing many other differences).
Could you please let us know the order of the files you're includ-ing ?
Are you manually defining any specific constants, perhaps involving X...
??
I believe that the reason for 2 such similar constants is their historic origins - MAXPATHLEN originally from the Unix world, and MAX PATH from the Windows world.
I do most of my work on both Linux and macOS, ensuring that my code compiles with mini...
Firstly, getopt() is not defined by the C standards (it's not a concern of the language), but is defined by POSIX standards (it's a concern of the portability of the OS interfaces).
And because unistd.h is not a standard-C header file (https ...
The CS Honours (4th year) and Masters of Data Science (5th year) students will be presenting their research project seminars this Friday 6th. If you have been wondering about either Honours or the MDS, or just have an interest in what research stude...
"It's the 150th anniversary of the QWERTY keyboard, and Marcin Wichary has put together the kind of history and celebration this totemic object deserves. Shift Happens is a two-volume, 1,200-plus-page work with more than 1,300 photos, researched over...
Hi Nicholas,
You have a misunderstanding here.
Requesting -n does not "ask" for anything (there's nothing interactive about the mysync program once it has started).
Providing the -n option requests that everything occurs in the standard way, except that...
ANONYMOUS wrote
Yes, that is correct.
The goal is to synchronise the files (in indicated directories), not to synchronise directories.
But your storyline doesn't make sense - we have no way of knowing what dir1 and dir2 used to have, or how they cam...
As stated in the project description, anything that cannot be performed is an error, and as soon the first error is detected, your program should report the error and terminate. The system-calls will provaide all necessary support to detect report t...
ANONYMOUS wrote
Spaces may occur in any names, directories or files.
It's only the shell, not your C code that will consider a name with spaces as 2 arguments, so we need to use the syntax of the shell to keep the 'pieces' as one argument
' media U...
ANONYMOUS wrote
Your understanding is correct, a terminating process's memory is returned to the OS for other processes (existing and new) to use.
So any allocated memory use in for long-term data structures need not be freed.
However, as a general pra...
ANONYMOUS wrote
You may wish to check the common meaning of insinuating -)
As with the mkdir situation, you should not write your own program (and you've already been given file-copying code in lectures).
Hello Hugo,
Yes, you may assume that the file-patterns provided for testing will be valid one
(checking those is not a focus of the project and, yes, we could write a better glob2regex() function, but...)
Nothing gets deleted in the project.
We are syncing files, either from the top-level directories or sub-directories if using -r.
We are not actually syncing directories, or their contents, but (as a side-effect) will need to create corresponding direct...
We can trivially call a command-line utility from within a C program by using for() and execl() .
But the mkdir program does little more than call the mkdir() system-call, which we can do from within our own program.
If the actio...
Yes, that's what the project specifies, so please have your project do that
(and it'll likely assist the amrking).
There's many ways that things could be done.
The project is consistently requiring that the very first error found results in the progra...
ANONYMOUS wrote
I'm unsure of the context of your question.
Do you mean the permissions passed as an argument to the chmod system-call?
You have a computer on which you typed your question. You cna use that as an experimental tool to write very ...
ANONYMOUS wrote
There is a program (utility program) named mkdir , which you may not use.
But there's also a system-call named mkdir() which you may use.
The exact same is true for chmod and getopt .
ANONYMOUS wrote
No answer for the 2nd question.
I started to write a small clarification for it, but then realised that there is no correct answer. For example, in determining which of two files we should copy (from) - we presume that 2 candidate fil...
An interesting, older, SO discussion which is now 'obsoleted' by the inclusion of strdup() in C23
https stackoverflow.com questions 32944390 what-is-the-rationale-for-not-including-strdup-in-the-c-standard
Hmmm, I've just remembered the getconf program on both Linux and macOS.
On my Ubuntu system, getconf ARG MAX reports 2097152,
and on my shiny new macOS M2 it reports 1048576.
But don't try to determine or use those values - dynamically alloc...
ANONYMOUS wrote
Without -r we only consider the files (not directories) in each top-level directory provided on the command-line.
With -r we consider all files and sub-directories in and below the top-level directories.
With -n we don't have to print ...
Hi Hugo,
I strongly suspect that you're asking for this information because you want to define fixed-sized arrays. However, that's the wrong approach for this project.
Firstly, there are no guaranteed upper-bounds on these values (but one), and even tr...
While -a and -r may be provided in the same command, as can -a and -R for ls , they are otherwise unrelated.
Similarly, -a and -p (and many other combinations) are unrelated.
The -a option asks your program to 'pay attention to' all directory entries, including those that begin with a '.'
It is analogous to running ls -a .
The -r option asks your program to recursively process any (sub)directories it finds.
It is analo...
ANONYMOUS wrote
As you'll see in Monday's lecture, or if you read ahead, the getopt() function detects such problems, but it'll be up to your code to report any errors.
ANONYMOUS wrote
The function strdup() has never been defined in a C standard, until its appearance in the new C23 standard (though why release it on 1st April ?) https www.open-std.org jtc1 sc22 wg14 www docs n3096.pdf
But strdup() has ...
The file dirA a b c thing1 will be copied to dirB a b c thing1 if
- dirB a b c thing1 does not exist, or
- dirA a b c thing1 is newer than dirB a b c thing1
If a file is renamed, we have no record of what its original name was, and the contents of...
Details of the 2nd project are available from https teaching.csse.uwa.edu.au units CITS2002 projects project2.php
Please post requests for clarification about any aspect of the project to help2002 so that all students may remain equally informed. S...
ANONYMOUS wrote
Firstly (as we're discussing C), we speak of functions, not methods.
Header files should contain globally-required preprocessor tokens and macros, and declarations of functions and variables. These simply inform the files that in...
You may find a copy of the 1st project's sample solution from https teaching.csse.uwa.edu.au units CITS2002 projects myscheduler-solution.c
Please review the sample; it's written with (only) arrays and structures, and (as promised) does not employ ...
ANONYMOUS wrote
Hello,
Our 1st project was originally due 5pm Fri 15th Sept, and submissions closed 7 days later, at 5pm 22nd Sept, to account for all students with approved extensions.
Did you attempt to submit your project after that Friday deadline...
"Where do UNIX manpages come from? Who introduced the section-based layout of NAME, SYNOPSIS, and so on? And for manpage authors where were those economical two- and three-letter instructions developed?"
https manpages.bsd.lv history.html
"On September 27, 1983, a computer scientist named Richard Stallman announced the plan to develop a free software Unix-like operating system called GNU, for "GNU's not Unix." GNU is the only operating system developed specifically for the sake of use...
ANONYMOUS wrote
As the announcement says - "The final lecture, on Tues 17th October, will discuss how the exams are marked, and look at questions from last year's final examination." so, yes, we'll be looking at how the marking is done.
There is no ...
Details about our final exam https teaching.csse.uwa.edu.au units CITS2002 examinations.php
Please email me with any questions you have about its format, etc.
The final lecture, on Tues 17th October, will discuss how the exams are marked, and look a...
Up until the end of Sunday 17th, we have 229 project submissions, 122 of them from teams of 2. 25 submissions required some minor changes to get them to compile correctly (suggesting that they were not previously compiled with the required options t...
There is no rounding performed in the sample solution.
All times are in integers and the final calculation of the utilization is performed in integers 100 total time on CPU total time;
ANONYMOUS wrote
Asked and answered (somewhere) previously.
The process's sleep time occurs simultaneously with the transition time (RUNNING- SLEEP), so by the tiem the transition has occured, the request to sleep for 10usecs has been satisfied.
When submitting your 1st project, please ensure that
- you've had a final read through the Clarifications
- you've taken heed of the 'big hints' in the manual-marking section of the Rubric
- your single C11 source-code file is named mysched...
ANONYMOUS wrote
As we are not striving for any efficiency, highly readable code is greatly preferred over long sequences of code that, often, are longer than the screen you're reading from. For example, The Clarifications define the order of schedul...
ANONYMOUS wrote
Depends on your implementation - you may increment advance the time by any amount, though just be careful not to 'miss' any events if you advance it along way into the future. If you ever find a need for time to go backwards, it stro...
ANONYMOUS wrote
I'm pretty sure that this has been discussed previously, but I can't find it.
The 'belief' is that '246 idle' should not be reported, but it happens because the final reporting debugging code at the end of each microsecond just prints...
ANONYMOUS wrote
After the process has spent 5usecs on the CPU performing some computation, its time-quantum expires and it's removed from the CPU.
It does not "look into the future" to see what system-call is coming next, and then perform it if it hap...
ANONYMOUS wrote
This project does not require a multi-threaded solution, so I'm afraid I can't see the purpose of any worker threads (unless you're meaning something other than the traditional meaning of worker threads??)
ANONYMOUS wrote
I don't understand what you mean "...in a for loop". You'll only ever be creating one new process at any one time, so I'm unsure what role a loop has. ??
Only the single process running on the CPU can create a new process, by calling ...
ANONYMOUS wrote
I'm not sure what you mean by 'my program will be overwhelmed'.
All output will be ignored except the last line, so it doesn't matter how much there is.
When the CPU is idle, at time T, is awakens all sleeping processes that should wa...
ANONYMOUS wrote
Yes, that's the correct interpretation, and is intended to use as the maximum size of arrays and queues.
In hindsight it should have been named MAX CURRENTLY LIVING PROCESSES, or something( ), as, of course, only one process can only e...
ANONYMOUS wrote
No. You're either overthinking things, or have some misunderstandings.
If a process is in the middle of writing something (actually, the device that the process requested to write something is writing), the process is not on the CP...
ANONYMOUS wrote
Unsure what you mean. In the attached image the process requests to sleep for 5 usecs, the whole transition takes 10usecs, and so the process's sleeping request occurs during the transition.
Correct.
ANONYMOUS wrote
Whenever a process moved from READY- RUNNING it gets a new timequantum.
In your 1st example, this is reported when the process's transition is complete, and the process is now able to (continue) executing.
In your 2nd example, the proce...
ANONYMOUS wrote
(from the perspective of the process) if a process wishes to sleep for 15usec, then it wishes to stop sleeping 15usec into the future. It doesn't care what happens when it is sleeping. So the actual time sleeping, can include (overl...
ANONYMOUS wrote
Firstly, a data-bus is a physical thing , it's not a verb, or an event, or an action, and in our simple system there's only one of them which connects the CPU, devices, and RAM together. Only one device can perform a data-transfer a...
"... claims the UNIX OS was written in only 13K lines of code. Which seems a remarkably low number. Is it true, and if so how did they manage it? Seems completely antithetical to the monolithic monstrosities we know operating systems to be today."
...
ANONYMOUS wrote
Sorry, I can't reply as fast as you can cut-and-paste the same question.
The ceil() function is in the standard C maths library, which is why you'll need the -lm linker option on Linux. Yes, you may use it.
On macOS, Apple h...
ANONYMOUS wrote
If the true time taken is 66.66666, then it will not be finished by 66.0 but will be finished by 67.0
We can't 'do the next thing' until the I O has finished.
ANONYMOUS wrote
Yes, that's correct.
Those time values are not consumed performed by the individual processes, but by the OS or a device.
So they do not add to the processes' time on the CPU, and thus have nothing to do with the timequantum .
Hi Hugo,
It's safe to assume that all sysconfig files will define timequantum
(you may be overthinking things but, in this and similar cases, if the better 'solution' is only a couple of lines, I'd provide the better solution, even if not require...
ANONYMOUS wrote
There's no extra usec to add, as has been discussed and resolved in a few threads here, already. Please read through those.
Following the scheduling order listed in the Clarifications, everything happens consistently in that order.
Hello Leon,
I've now read and replied to your email.
Sorry for the slow reply, but it's been the teaching break and I rarely work Saturdays, and people just need to get away from computers occasionally.
ANONYMOUS wrote
Allowed? certainly, and 'essential'.
Asked and answered previously here https secure.csse.uwa.edu.au run help2002?p np opt U213
Also, check the marking rubric https teaching.csse.uwa.edu.au units CITS2002 projects project1-rubric....
ANONYMOUS wrote
The time-quantum doesn't affect any system-call.
After a process makes any system-call the process is removed from the CPU.
If that process exits, obviously it won't get back to the CPU.
Otherwise, every process is given a new 'full' t...
ANONYMOUS wrote
In Labs 2.03 and 2.05 you should first reboot the machine if it is running Windows.
When given the menu to choose which OS to boot, choose Linux Ubuntu.
There may be some setup difference between different computers in the same lab, so ...
It is not meaningful to say "This is practically 0 in the program".
If something starts at, say, t 10 and takes 0.0006666, then you can't say it finishes at t 10.
Moreover, if we're only using integers to represent time, then we have to say that it ha...
Any debug printing statements will be ignored when your project is marked, so only you will know which debug printing is still valuable for your understanding of your code.
Hope this helps,
Hello Luyang,
If you run the sample solution in 'verbose mode', it will display (and hopefully explain) the times when each activity commences and finishes.
Have you tried that?
"...all 14 Toyota assembly plants in Japan faced an unexpected stoppage on August 29. It was all thanks to a breakdown of a key computer system responsible for ordering vehicle parts for Toyota factories. The cause of the problem? A full hard drive.
....
ANONYMOUS wrote
Yes, this.
Your project should be able to spawn an infinite number of processes( ), though at most MAX RUNNING PROCESSES will ever be running at any one time.
ANONYMOUS wrote
Now linked 'everywhere' - https teaching.csse.uwa.edu.au units CITS2002 projects project1-rubric.php
Please report anything in it that appears unexpected.
(a marking rubric identifies what will be assessed; a marking sheet indicates t...
Now linked 'everywhere' - https teaching.csse.uwa.edu.au units CITS2002 projects project1-rubric.php
Please report anything in it that appears unexpected.
ANONYMOUS wrote
They are constants defining the characteristics limits of the computer system we're emulating. You will likely choose to use the values to define the maximum size of the data-structures that you define for your project.
The project de...
And just to make it clear for everyone - our project's requirement that certain lines begin with a TAB is not just there to make your life difficult. It is a very common feature of system configuration files that certain lines begin with a TAB, or ...
ANONYMOUS wrote
A process calling wait will be blocked until all of its child processes (that it has spawn ed) have terminated.
The project sheet says
"waits for all processes that it has spawned to terminate (at which time the process is...
ANONYMOUS wrote
A few things
- there is no state named 'DATABUS' - the data-bus is a 'wire', so a process cannot be 'in' it.
- your process would move from RUNNING- BLOCKED.
- a process waiting to acquire the data-bus does not have wait for the READY q...
With 12 commands, your command-file is not a valid one.
Your program (unfortunately) does not crash because there may be 'nothing important' in positions 10 and 11 , and your code just keeps adding to the array with only 10 elements.
It is still not working because you still have not inserted a TAB character. You have inserted 8 spaces instead of the single TAB character.
Run the command od -c command-file from the command-line and you'll see a sequence of spaces, but no TAB...
There is no contradiction ( ).
A process calling spawn is not blocked; it is placed back on the READY queue.
A process calling wait is blocked if it has (running) child processes, otherwise it is placed back on a READY queue.
A process does ...
In the files you've posted I can see the 4 spaces. If you had a TAB, it'd likely be indent by 8 spaces.
Also, your 2 input files are not C (programming language) files, so I suggest not giving them a ".c" extension.
No relation but if someone was interested in an Apple desktop machine for home, this Gumtree sale seems like a bargain. Of course, make sure you sight the receipt to ensure that it's not stolen
https www.gumtree.com.au s-ad clarkson desktops m...
Yes, thanks.
And just to clarify this (c.f. another student's email), only the very first character needs to be a TAB.
You may provide either spaces or TABs between the words on each line.
Yes, thank you lab fac.
We don't get enough chance to discuss this in our lectures, and rushed over it because there's so many different types of devices and how they interact with the data-bus (and, in fact, modern systems will have several data-buse...
ANONYMOUS wrote
Firstly, thanks for explaining your confusion misunderstanding in such great detail, it helps to provide an answer knowing what you don't understand or what you've overlooked.
What you and a number of other students have described as '...
ANONYMOUS wrote
A process that is sleeping is blocked (for a period of time), so the transition time for Ready- Blocked applies.
If you review the 5-state model, https teaching.csse.uwa.edu.au units CITS2002 lectures lecture07 09.html there is only ...
ANONYMOUS wrote
As given, just a simple FIFO queue.
A process's time on the CPU has no 'meaning' for the READY queue, unless you're suggesting the processes that haven't used the CPU much in the past should be given greater future access to the CPU (...
(sorry, I can't find the original comment that identified this)
Thanks for identifying this confusion. I've modified the sample solution, and added this to the Clarifications "If a process calls the 'wait' system-call when it has no children, it sh...
I believe the problem reporting negative I O times has been corrected. Please report any problems.
The arithmetic was being performed using a standard int (4 bytes), which overflowed with larger (faster) I O speeds.
If you're having similar probl...
I believe the problem reporting negative I O times has been corrected. Please report any problems.
The arithmetic was being performed using a standard int (4 bytes), which overflowed with larger (faster) I O speeds.
If you're having similar probl...
The Evolution of Computing From 8-bit to 64-bit
"In the early days of computing, the alignment of bit lengths to powers of two wasn't always a given. Nonetheless, many early computers embraced these dimensions. The highest value a CPU could address i...
ANONYMOUS wrote
Yes, that 1st IDLE should not be reported there.
It's not a bug in the logic of what's happening, just in where it's reported by the debug printing.
I'll correct it.
ANONYMOUS wrote
Please re-read the (online) project sheet - you may be reading quoting from a printed copy.
When a number of changes were made yesterday, that requirement was also removed (to make things much simpler).
ANONYMOUS wrote
There's only been two versions of the sample, one a few days after Workshop 5, and the second installed yesterday and described in the Clarifications.
The second was the result of students reporting problems with the first, and but bo...
ANONYMOUS wrote
The above.
You first unblock any sleeping processes that finish at the current time.
If there are multiple such sleeping processes, they are unlocked in the order in which they started sleeping.
The same holds for each of the following b...
Solutions to our 2 items of formative assessment are available from https teaching.csse.uwa.edu.au units CITS2002 formative.php
(of note, not a single student asked about any of the questions; unsure what to conclude from that)
I believe that that is covered in the Clarifications which list the order in which different event-types result in things being unblocked.
In your example, any sleeping processes would be unblocked before the blocked-on-I O process.
ANONYMOUS wrote
Yes, exactly what it means.
I cannot see where the perceived complexity comes from
- if we're talking about the queue of SLEEPING processes, because it's a queue , any sleeping processes that wake-up at the same time will all be at th...
Sorry, but I cannot understand your description or reasoning here.
I'm wondering if there's confusion because multiple 'things' are sometimes reported at happening at the same (integral) time?
For example, if a process has spent a 5 full usecs computin...
ANONYMOUS wrote
Between the values of, say, 10usecs and 50usecs we assume that the process on the CPU is performing some calculation computation requiring the CPU. Have a look at that in the sample solution (verbose) and let me know if that's not cl...
ANONYMOUS wrote
Thanks Yes, very likely a bug through only testing with too-small values. A negative time quickly suggests a problem with overflow in the calculation of time required. Will look into it.
Please read the updated Clarifications page https teaching.csse.uwa.edu.au units CITS2002 projects project1-clarifications.php (4th September) which defines the process scheduling order.
The revised sample solution schedules the processes by followi...
ANONYMOUS wrote
This is very likely because the line 50usecs exit does not begin with a TAB character.
The revised sample solution will check for and announce this (your) error, although your solution may assume that the input files are corr...
ANONYMOUS wrote
We'll be sticking with the project description - that the request for the fastest reading device received the data-bus next.
For any combination of read and write speeds, and the order of requests, it's (probably) possible to construct...
The sample solution clearly does not meet many students' expectation of what they expect to see.
Yes, it will be changed and explained clarified, particularly with regard to how and when state transitions are implemented.
The goal is to define, and req...
"Replacing a sort algorithm in the FreeBSD kernel has improved its boot speed by a factor of 100 or more and although it's aimed at a micro-VM, the gains should benefit everyone.
MicroVMs are a hot area of technology R D in the last half decade or ...
Great reply - thanks. It's almost as if induction is involved
Yes, a process may spawn another process whose definition has already appeared, or is yet to appear, in the commands file.
"Computers are no longer getting faster. Future improvements in speed will come less from better hardware and more from faster, more efficient programming."
"Programs written with Python are notoriously slow - up to 60,000 times slower than code writt...
Hi Jacob,
I understand (most of) your question, but there's no general one-size-fits-all answer. The best choice is going to be specific for a particular program - number of variables and functions, required degree of sharing between functions and, if...
ANONYMOUS wrote
Hi, yes all values in the 2 files are integers.
The space-or-tab separated words in the files, such as "200usecs", can easily be captured with an expression such as int x atoi(word); because the atoi() function will retur...
ANONYMOUS wrote
The decision to determine if the 'waiting' process has any children to wait for is made by the OS.
The OS requires the use of the CPU to execute code to make that decision.
The process invoking the 'wait' needs to be placed somewhere so...
Hello Amanda,
There's no single correct answer, and it may be a property characteristic of a particular OS, or even a configurable attribute of an OS that is read and then used after the whole OS boots.
In the 1980s and 90s there was a lot of research ...
ANONYMOUS wrote
Yes; the workshop was intended as a Q A session, to provide explanation, and to demonstrate that there would be a web-based sample solution available. It wasn't intended for that demonstration to be used as a definitive example. Ple...
ANONYMOUS wrote
I'm afraid that I have no helpful suggestions, but the very first thing you need to setup when you have it working again is to establish a regular backup routine for your files - using either a simple USB key, to a cloud-drive such a...
ANONYMOUS wrote
There is a limit to how many processes are ever supported. An attempt to exceed this limit would be an error (such as in a real OS, a call to fork() for fail). The project sheet states that there will be no errors in the input files,...
"Vannevar Bush, a professor at MIT Massachusetts Institute of Technology wanted to solve differential equations. Now, remember, in those days there weren t computers like we have today. Everything had to be done by hand or with mechanical devices...
"Every era of computing has its standout stars. The brains behind our beloved machines, the Central Processing Units (CPUs), have shaped technological advancement. Here's our list of the ten most influential CPUs that have left their mark on history ...
ANONYMOUS wrote
There's a single CPU, and it can be used by either users' executing processes, or the OS (performing state transitions). Before the CPU can be used by the OS, or at the very beginning of the OS's actions, the executing user process's ...
I'm presuming that you're storing your value sin integers, 32-bit or 64-bit. From wherever that 875523205136 value came from, it will occupy the same amount of storage, in the same variable, as a value of zero. ??
Setting an integer value to zero, wi...
ANONYMOUS wrote
We tend to use the word 'blocked' to mean that a process is waiting for a resource (such as I O), or a time interval (sleeping), but not when simply waiting for its turn on the CPU.
When a running process's time quantum expires, the pr...
ANONYMOUS wrote
Your thinking and the stated numbers are correct, but the statement '...which is very slow' is not true.
How long will it take to perform 5 million (integer) comparisons on a laptop capable of 2 billion instructions per second?
Your la...
ANONYMOUS wrote
Oops, sorry about that - I was thinking about the state transition time, not the timequantum.
You are correct - the TQ will have no affect on a process sleeping.
This is the sort of question where the best answer is "if you know what would make your program better, why not do it?".
We know that the format of the input files is correct, and their data consistent, so most of those 'difficult' errors won't occur....
ANONYMOUS wrote
The actions necessary to perform a state transition are executed by the OS, using the single CPU. Thus only one state transition can occur at one time.
Very likely that it has a setting to insert 'soft tabs', instead of 'hard tabs', by inserting the appropriate number of spaces to reach the next 'tabstop', often a multiple of 8.
And, let's never miss a chance to show this great clip from Silicon Vall...
ANONYMOUS wrote
I suggest that you keep thinking about the problem; the numbers in the command-file, alone, do not reflect the interactions between the processes and the I O devices, both of which affect the total execution time.
ANONYMOUS wrote
It's not clear if you have a question.
Yes, the two input files are text-files, which you can process with fopen() , fgets() , and flclose() .
ANONYMOUS wrote
There's 'always' multiple ways to implementing something. Different (correct) implementation should produce the same results - as long as a process requests something requiring a state transition at a certain time, and ends up at its ...
Yes, and it's realistic, too. From man 3 sleep - "System activity may lengthen the sleep by an indeterminate amount."
You can perform arithmetic in 'doubles' without requiring double variables or managing time with doubles. In the case of findi...
"Just over three decades ago, Linus Torvalds sowed the seeds for Linux by sending an email detailing his plans to develop a free OS"
https www.xda-developers.com on-this-day-in-1991-linus-torvalds-announced-linux
Times are measured in integers.
It makes no sense to think of them as floating-point values, or to consider rounding.
If the 'precise time' is actually 14.2usecs, then it certainly hasn't finished by 14usecs.
A process asking to sleep for some time, is asking for that time on 'the clock on the wall'. If it makes the request to sleep for 10 seconds at time 3 seconds, it expects to be awoken at 13 seconds (but can't expect to run at exactly 13 seconds). T...
Your understanding is pretty complete, other than the "prioritises the processes on which needs the least time to be completed", so I'm unsure why you describe things as "can't make heads or tails of this project"??
I don't believe it's the sort of ...
ANONYMOUS wrote
There's no single 'true' answer, and it may depend on your implementation.
You may not wish to put it in the Ready queue as it's not yet Ready to run,
and you may not wish to keep it in the (a) Blocked queue if that would interfere with...
Hello. I'm wondering if you have a question or are just walking through your understanding, here?
Please use the web-based sample solution, rather than the Workshop 5 recording, for comparison purposes.
Please remember to look at, and attempt, the unit's formative assessment https teaching.csse.uwa.edu.au units CITS2002 formative.php
To get the most benefit from these items of formative assessment, you should attempt them under "test conditions" -...
ANONYMOUS wrote
Yes.
Suggest that you experiment with the sample solution https secure.csse.uwa.edu.au run myscheduler-sample , remembering that even a sleeping process is blocked, too.
ANONYMOUS wrote
You are welcome to change, add to, or extend the starting code in any way you wish.
The sample solution has about 22 functions in addition to the 3 empty ones in the starting code.
Some of the functions are as few as 5 lines long, but t...
A web-based sample solution for Project-1 is available from
https secure.csse.uwa.edu.au run myscheduler-sample
There is NO requirement for your project to reproduce the sample's debug output.
The read and write system-calls are not yet implemented...
An annotated history of some character codes
or
ASCII American Standard Code for Information Infiltration
"This document is about character codes, specifically a history of ASCII(1), the American Standard Code for Information Interchange, and immediate...
The History of the First Computer Shell
"BASH? PowerShell? It all traces back to 1963. And the work of an amazing Frenchman, CTTS, and Multics."
https lunduke.locals.com post 2853097 the-history-of-the-first-computer-shell
ANONYMOUS wrote
The time that a process is on the CPU is accumulated, a statistic of that process. The time taken to make a system-call, or to make a state transition is not performed by the process - it is performed by the OS on behalf of the proces...
ANONYMOUS wrote
You're welcome to change function names, parameters, and return types as you wish (or not even use them).
DO NOT change the numeric preprocessor constants near the top of the file, else your code won't match the sample solution.
It's o...
ANONYMOUS wrote
You gain marks for good practices. There is no 'negative marking', so you do not lose marks for anything.
Marking starts at 0 and goes upwards, not from 100 going downwards.
The use of global variables was discussed in Friday's Works...
ANONYMOUS wrote
That approach may work, but the 'picking apart the times' part is difficult because you must account for the interactions and competition between multiple processes.
As discussed in Friday's Workshop 5, another (I believe much easier...
ANONYMOUS wrote
Yes. Please read https secure.csse.uwa.edu.au run help2002?p np opt U179
I cannot imagine why you would need to call usleep() for this project. It suggests a misunderstanding, which should be addressed by watching today's Work...
command1 and command2 should each be able to spawn each other.
There is no 'ordering' in the commands file (other than the 1st command being the only one automatically executed).
"Ancient civilisations hunted for spice; in the 20th century we fought wars for oil. In 2023, the world s most precious commodity is an envelope-sized computer chip. The H100, a rectangular black maze of circuits with a shimmering microchip at its ...
ANONYMOUS wrote
The format of the commands file is always the same, and your project does not have to check for files with an invalid format.
The command names, such as 'shortsleep' or 'elephant', can be anything, and your project does not need to (...
Let's use the correct terminology (for C), which will keep the questions and answers as clear as possible.
Firstly, we're not 'importing' anything.
Secondly, string.h is not a library - it refers to a text file containing the declaration (not impleme...
The data-bus is used when a process requests some I O (either way), and the use lasts from when that process acquires the data-bus until the transfer of data completes.
While the data-bus is in use by one process, another process can be using the CPU....
ANONYMOUS wrote
A good question.
I'll decide whether the parent or child runs next, and add the 'answer' to the Clarifications.
Yes, the parent only waits for the child if the parent calls wait .
Yes, the ratio of CPU-time-consumed-by-all-processe...
ANONYMOUS wrote
(now not sure how this comment fits in the discussion sequence, but) yes, there's many ways to have multiple processes in the READY queue.
Firstly, let's use the correct terminology. A process whose time-quantum expires is not blocked, it moves from RUNNING to READY.
Your process, above, would run for 100usecs, move to the READY queue, eventually move back to the CPU, run for 100usecs a...
ANONYMOUS wrote
No, that's incorrect.
The commands in the commands-file are akin to all the available executable programs on your laptop's disk. When you boot up your laptop they do not all start running, only the ones you request to run (with spa...
ANONYMOUS wrote
Great. The very first sentence of the project sheets says "...to emulate the scheduling of processes" but I'll change that to "...emulate (or simulate)".
ANONYMOUS wrote
That's a very 'big' question.
I strongly recommend that you find a project partner, have some discussions with them about what you both understand, get along to a lab session to discuss your ideas with the helpful people there, and att...
ANONYMOUS wrote
A single tab character - written with ' t' in C - should appear as the first character on the line.
Unsure what you mean by "modify the file", as the sequence - tab - is only written on the project sheet so that it's clearly there; ...
ANONYMOUS wrote
The answer is 'yes', because that's what the project specification says.
In practice, a system would also introduce a mechanism to avoid what's called "process starvation" - the chance that a process waits indefinitely because there's ...
ANONYMOUS wrote
You will need to create and test your project with a variety of attributes values in those 2 files.
I am unsure what you mean by '...in the main file'.
Review the starting code.
Just in the very standard way.
Suppose a process has (only) 150usecs of computation to perform, before it exits.
When it first gets on to the CPU it runs for the time-quantum of 100usecs, then it is kicked-off the CPU.
It eventually returns to the CPU f...
ANONYMOUS wrote
Not sure what you mena by this question.
Commands have names, just a single word on a line by itself, and every line following that begins with a TAB character after the system-calls executed (in order) by that command.
ANONYMOUS wrote
No, but you'll soon have access to a sample solution against which you may test your own project, for varying input files.
And don't forget to test your project with varying sysconfig files, too, not just command files.
ANONYMOUS wrote
Hi. Nearly everyone in the unit is new to how the internals of an OS work, so you're not alone. However, you do appear to have some serious misunderstandings about the project (as do many others), so I strongly recommend that you fi...
ANONYMOUS wrote
No problems, that's the idea
That process will stay on the CPU over 91, 92, ... usecs. After the process has been on the CPU for 100usecs (exhausted its time-quantum), it will be moved to the Ready queue. When it is next on the CPU,...
Details of the 1st project are available from https teaching.csse.uwa.edu.au units CITS2002 projects project1.php
Please post requests for clarification about any aspect of the project to help2002 so that all students may remain equally informed. S...
There is a (rare) case where you may need to consider their difference
- exit() terminates the current process, no matter where (from which function) it's called. If exit() is called from main() the whole process terminates.
- re...
Career advice for young system programmers
https glaubercosta-11125.medium.com career-advice-for-young-system-programmers-c7443f2d3edf
"If you are interested in the plumbing of our software industry systems level programming, much of the career a...
ANONYMOUS wrote
Unsure if you've read the (original) linked paper, but there's a huge amount of detail on the questions selected
https arxiv.org pdf 2308.02312.pdf
All good reasons, and everyone will have their own reasons and preferences (though ...
Someone emailed me this question and the reply will be of general interest
I don't believe that there's that much history discussed in the lectures (happy to hear others' opinions, too), just some mostly in Lectures 1 and 3. But I feel a bit of hist...
You may remember in the 1st lecture that I stated that new technical developments in operating systems attract far less attention, today, than do changes in the user interface, fonts, and desktop images.
The major development attracting all attention ...
Windows feature that resets system clocks based on random data is wreaking havoc
Windows Secure Time Seeding resets clocks months or years off the correct time.
https arstechnica.com security 2023 08 windows-feature-that-resets-system-clocks-based-on...
ChatGPT answers more than half of software engineering questions incorrectly
You may want to stick to Stack Overflow for your software engineering assistance.
https www.zdnet.com article chatgpt-answers-more-than-half-of-software-engineering-question...
Dear Computer Science Students,
QFin UWA has our biggest event of the year coming up THE QFIN PANEL NIGHT and we'd love to see you all there
Tickets https www.eventbrite.com.au e panel-night-tickets-692141553017
Date 31st of August
Time 6pm - 8p...
Someone sent in this question by email
The main() function may return (to the operating system) by calling the exit() function, simply calling return, or 'dropping off' the bottom curly bracket.
In the last 2 cases, no call to exit() ...
ANONYMOUS wrote
When formatting output with printf() and friends, there really is no difference.
However when scanning parsing input with scanf() and friends, using " i" supports reading in integers in different numeric bases, such as base-10 (decimal...
ANONYMOUS wrote
Actually neither of those possibilities
- project-1 may be undertaken by 1 or 2 people
- project-2 may be undertaken by 1 or 2 people
You may have different partners for each project.
Just "Chris".
Glad that you resolved the problem, even if it took such drastic measures.
I can't imagine how why you'd be seeing the error you did without it also appearing in so many other situations.
This problem has me stumped.
I've tried your code on 2 Apple M2 (Xcode) installations, Ubuntu Linux (gcc), and Redhat Linux (an earlier gcc), and all produced the expected result.
I can't imagine why your installation would produce those weird, large v...
Lots of students emailing with common questions about Project-1, so please read https teaching.csse.uwa.edu.au units CITS2002 projects project1.php
which should answer all of your questions before the project's release. Good luck,
The default installation of vim simply displays its text in monochrome, but by adding
commands to (one of) vim's "startup files", it will add colours to code keywords, comments, ....
To download and add the necessary commands to vim's startup file
pr...
Using foreground background job control in your shell
The traditional (40 year old) way to run the vim editor is inside the
same window that receives your shell commands. I choose to edit files
and compile them in the same window (and in most of my wo...
ANONYMOUS wrote
Yes, the digital certificate expired on Saturday, affecting those on Unify and via the VPN.
UWA-IT have been informed (though, you'd think they would have already been aware of it).
Just "Chris".
I'm afraid that I can't tell from your description alone.
It's likely to be the use of an incorrect datatype or a formatting error - not sure.
As the exercise is not being assessed, please post your code here.
In Friday's workshop we discussed the forthcoming challenge of storing time values in 32-bit integers. Here's a recent article on how Debian Linux is addressing it
Debian looks forward to 2038
https lwn.net Articles 938149
"On January 19, 2038, the...
ANONYMOUS wrote
Have a look at the sample solution for the lab; you'll see that the 'magic calculation' is 1 - firstday;
At the end of the workshop I also asked those attending about the difficulty of the workshop - there was about 100 students there...
Some sample solutions for Labsheet-1 and Workshop-2 are now available from our Schedule page https teaching.csse.uwa.edu.au units CITS2002 schedule.php
Sample solutions will be available each week, but I won't make an announcement, such as this, eve...
Tracing the Lines From the Telephone to Unix
https www.deusinmachina.net p history-of-unix
"Starting in 1925, and still around 98 years later (albeit with a few name changes), Bell Labs has done some incredible things during its lifespan. Propelled ...
This invitation is for the semester 2 meeting of the CS education committee in room 2.07 Computer Science building.
Tuesday 22nd August at 1pm.
This committee meets once a semester (Tuesday 1pm around week 5 or 6 for one hour).
The full committee consis...
Throw away your first draft of your code
https ntietz.com blog throw-away-your-first-draft
"The next time you start on a major project, I want you to write code for a couple of days and then delete it all. Just throw it away."
...
I'm not proposing th...
Western Digital HDD capacity hits 28TB as Seagate looks to 30TB and beyond
https arstechnica.com gadgets 2023 08 western-digital-hdd-capacity-hits-28tb-as-seagate-looks-to-30tb-and-beyond
"After a couple of decades of talk, Seagate announced earlier...
In today's lecture I mentioned a famous keynote talk at an OS conference that had its audience thinking. Found it
Systems Software Research is Irrelevant
http doc.cat-v.org bell labs utah2000 utah2000.pdf
"This talk is a polemic that distills th...
While not an OS topic we focus on, this ArsTechnica article provides a great summary of contemporary mainframes
The IBM mainframe How it runs and why it survives
https arstechnica.com information-technology 2023 07 the-ibm-mainframe-how-it-runs...
Nothing particular that I remember, other than encouragement to read through the webpages outlining Linux and C compiler software before commencing next week's Labsheet-1.
ANONYMOUS wrote
Firstly (because I'm a bit of a pedant about using the correct terminology) it's not WSL that's providing the online manual that you're reading. WSL is a program enabling you to run a Linux distribution 'inside' WSL. Ubuntu is one s...
Thanks.
I'd presumed that they'd already done that, if (hopefully) following the instructions here https teaching.csse.uwa.edu.au units CITS2002 labsheets software.php
But maybe....
The package manpages-posix is correctly named and still exists, https...
You're welcome to use Virtualbox if you prefer it - this unit doesn't require (or assess) any virtualisation software required to give you access to Linux on your own devices.
Thanks Chris; wasn't aware of this.
To others, maybe wondering why this was posted - UWA-IT used to run RHEL on students' lab computers (I think that they only support Linux in CSSE and EECE), but that choice was an annoyance because UWA-IT couldn't g...
While there are no structured lab sessions in Week-1, you may like to start reading some introductory material on using the Linux operating system and the standard C compiler (including the C compiler on your Mac, if that is your chosen platform).
In...
Please complete 2 Student Experience Surveys that UWA is participating in during August
- The national QILT Student Experience Survey (SES), conducted for the Australian Government Department of Education https www.qilt.edu.au surveys student-expe...
ANONYMOUS wrote
Yes, that's what it's reporting in its Table 4.
And from that table, it's easy to explain why - if an equivalent Python program takes 70x longer to execute, and Python is still executing as fast as it can on the same CPU, then it'll ex...
In the 1st lecture, I mentioned that some computing environments, such as cloud-based platforms, are very concerned about their energy consumption (at least to minimise costs), and their environmental impact.
Here's an interesting article on that topi...
It appears that UWA-ITS have corrected their network configuration, and so our unit's webpage teaching.csse.uwa.edu.au units CITS2002 is available without requiring the VPN.
(please report any similar problems if they appear more than just transien...
ANONYMOUS wrote
Yes, I did speak past 9 52 yesterday, but only to say that I have another lecture at 10am (every Monday), and asked students not to rush to the front after the lecture with individual questions (that request was ignored).
There's alway...
Hello,
Pronounced just 'Chris'.
I have no control over the lecture recordings. Recording starts automatically at 8 58 and finishes at 9 52; anything that passes through the microphone or the video projectors is recorded, trimmed, and stored somewhere...